# How to calculate the orbital distance between 2 satellites given the TLEs

I have 2 LEO satellites with the same orbital plane with same inclination & longitude of the ascending node. I have the TLEs for each satellite. How do I calculate the orbital distance between the satellites in terms of time(sec) & space(km)?

I think I can use the time to periapsis for each satellite. I referred to this question about how to calculate time to periapsis but the equation mentioned in the answer requires eccentric anomaly. From the TLE, I only have mean anomaly & according to wikipedia post about eccentric anomaly, there is no straightforward way to calculate eccentric anomaly if mean anomaly is known.

So, how do I know the orbital distance (in secs & km) between 2 satellites in the same orbital plane given TLE? Assume reference time as when TLE is generated. Assume that both TLE's are generated at same time.

• There are programs and python packages that can do this, but are you asking how to do it yourself without using an SGP4 propagator? – uhoh Jun 14 '18 at 8:51
• @uhoh I am using a software called SaVi, and to properly represent the satellite in orbit, I need semi-major axis, eccentricity, inclination, long. of ascending node, arg. of periapsis & time to periapsis. I have everything except the last. I, for the time being, did orbital_period/no. of satellites to approximate the distance between satellites, which may not be correct. So I wanted an equation to find this. If it very complicated then I can use a program to find this. Can you suggest any – KharoBangdo Jun 14 '18 at 8:58
• Oh I see, yes that one needs a bit of math. Have a look at this answer and see if that's helpful, if you can use Python I can rewrite a script and post it here to get the first time of periapsis after the TLE's epoch. – uhoh Jun 14 '18 at 9:05
• @uhoh Oh. OK. If you can provide a python script, it would be good. Also, if you can briefly point me to the concept of finding the distance through equation, that would be wonderful. – KharoBangdo Jun 14 '18 at 9:11
• @uhoh but TLE itself gives mean anomaly value in degrees – KharoBangdo Jun 14 '18 at 9:17

I think I've found the answer to this question. Please correct me if I am wrong as I'm new to this field

As mentioned in the question, time to periapsis might be the key. From the Wikipedia description of Mean Anomaly, I found this equation
$$M = n.(t-\tau)$$
$M$ is Mean Anomaly, $n$ is Mean angular motion, $\tau$ is the time at which the body is at the periapsis. So $(t-\tau)$ is the time to periapsis.

Mean anomaly(degrees) & Mean angular motion(revs/day) is given in the TLE. I just need to convert them into same units.
$$(t-\tau) = \frac{M(deg).(\pi/180)}{n(rev/day).(2\pi/86400)}$$
This will give me time to periapsis in seconds for each satellite. So the distance between them, in terms of time, can be easily found by subtracting the two time to periapsis values.

To find the distance between two satellites in terms of space, I need to find the arc length of an ellipse. The equation provided by the answer is
$$\int_0^{\theta_1} \sqrt{a^2.sin^2(\theta) + b^2.cos^2(\theta)} d\theta$$
$a$ is semi-major axis, $b$ is semi-minor axis & $\theta_1$ is the angle of the arc, which can be easily found using Mean angular motion.

I used WolfRam Alpha to compute the above equation & found the answer to the distance between 2 satellites in terms of space(km). I cross verified it using the general distance-time formula
$$\frac{Orbit \ Circumference}{Orbit \ Period} = \frac{Arc \ Length}{Time \ to \ traverse \ Arc \ length}$$
Orbit Circumference can be found from semi-major, semi-minor axis & eccentricity. I used Google calculator. Orbit period can be found using Mean angular motion, Time to traverse Arc length is difference between time to periapsis for 2 Satellites, so the Distance between 2 Satellites in terms of space(km) is the only unknown.