In a satellite-denied environment, a swarm of drones is capable of achieving relative positioning and navigation by leveraging the high-precision ranging capabilities of the inter-drone data link. However, because of factors such as high drone mobility, complex and time-varying channel environments, electromagnetic interference, and poor communication link quality, distance errors and even missing distance values between some nodes are inevitable. To address these issues, this paper proposes a low-rank optimization algorithm based on the eigenvalue scaling of the distance matrix. By gradually limiting the eigenvalues of the observed distance matrix, the algorithm reduces the rank of the matrix, bringing the observed distance matrix closer to the true value without errors or missing data. This process filters out distance errors, estimates and completes missing distance elements, and ensures high-precision calculations for subsequent topology perception and relative positioning. Simulation experiments demonstrate that the algorithm exhibits significant error filtering and missing element completion capabilities. Using the F-norm metric to measure the relative deviation from the true value, the algorithm can optimize the relative deviation of the observed distance matrix from 11.18% to 0.25%. Simultaneously, it reduces the relative positioning error from 518.05 m to 35.24 m, achieving robust topology perception and relative positioning for the drone swarm formation.