# Interplanetary Trajectory Calculation

 Mentor P: 15,202 Arc length along an ellipse is calculated by an elliptical integral (and now you have a term to google). Elliptical integrals are not the way to solve this problem, however. You need to solve for time of flight and and an angle called true anomaly. This is the angle between the directed line from the ellipse focus (e.g., the Sun) to the periapsis point and the directed line from the focus to the current point on the orbit. There is a related angle called eccentric anomaly. True anomaly ν (Greek nu, but sometimes written as θ, and other times f) and eccentric anomaly E are related by the orbital eccentricity e via $$\tan\frac{\nu} 2 = \sqrt{\frac{1+e}{1-e}}\tan\frac E 2$$ Why this new term E? The answer is Kepler's equation, which relates eccentric anomaly E and yet another "anomaly" called mean anomaly M by $$M = E - e\sin E$$ So what's this M? The reason for using the mean anomaly is that it grows linearly with time: $$M(t) = M(t_0) + n (t-t_0)$$ That n is called the mean motion. It is given by $n=2\pi/T$, where T is the orbital period. Another equation for the mean motion is $n=\sqrt{GM/a^3}$, where this M is the mass of the central object. Yet another equation is $n=\sqrt{\mu/a^3}$, where $\mu=GM$ is the standard gravitational parameter for the central object. Word of advice: Use μ (mu) rather than G*M. This disambiguates the meaning of M (is it mean anomaly or central mass?) and it is more accurate. We only only G to 4 decimal places or so, and the same for the mass of the sun. Compare that to the ten decimal places to which we know product G*M for the sun. In fact, the mass of the sun is determined by dividing the sun's gravitational parameter by G. Calculating the mean anomaly M at some time is a straightforward calculation if you know the true anomaly at that same time or if you know the mean motion and you know the mean anomaly at some other time. Calculating the true anomaly if you know the mean anomaly isn't so simple. You will have to calculating the eccentric anomaly and then calculate the true anomaly from the eccentric anomaly. The problem is that there is no nice simple formula that is the inverse of Kepler's equation. There is no such formula in the elementary functions. One widely used approach is to use Newton-Raphson iteration to solve Kepler's equation for E given M and e.