# Calculate True Anomaly at future point in time with hyperbolic orbits

Given:

• Semi Major Axis (negative)
• Eccentricity (>1)
• Argument of Periapsis
• Inclination
• Longitude of Ascending Node
• Current True Anomaly
• Mass of Central Body

How can one calculate the true anomaly at a future point in time?

Doing it with elliptical orbits is easy:

• Calculate Eccentric Anomaly (E) from True Anomaly
• Calculate Mean Anomaly (M) with $$M = E - e*\sin(E)$$
• Calculate Mean Motion ($n$) $$n = \sqrt{(G*mass)/a^3}$$
• Add Mean Motion to Mean Anomaly
• Convert new Mean Anomaly back to True Anomaly

However, with hyperbolic orbits:

1. I can't convert the True Anomaly to the Eccentric Anomaly: $$\sin E = \sin(f)*\sqrt{1-e^2}/(1+e*\cos(f))$$

$$\cos E = (e+\cos(f)) / (1+e*\cos(f))$$

$$E = \textrm{atan2}(\sin E,\cos E)$$

• since e is >1 I get a negative square root which is impossible.
• since I cant calculate the Eccentric Anomaly I can't get the Mean Anomaly
2. Since a hyperbolic orbit is "endless" my mean motion is just zero:

• because $n = 2\pi/Period$ → $2\pi/Infinity = 0$
• also hyperbolic orbits have a semimajor axis < 0: $\sqrt{(G*mass)/a^3} = error$

So can someone please help me how I can calculate the true anomaly on a hyperbolic orbit in "x" time, given current true anomaly and all other keplerian elements.

Not surprisingly, one needs to use hyperbolic functions as opposed to trigonometric functions with regard to hyperbolic trajectories. The motivation is simple. Let's start with Kepler's equation, $M = E - e\sin E$. We're going to run into issues (but not impossibilities) with negative square roots. Kepler's equation works quite fine, as is, with hyperbolic orbits so long as one realizes that the sine function can be extended to the trajectories complex plane. That isn't the best way to proceed. A better approach is to use hyperbolic functions. There's a clear relationship between the trigonometric and hyperbolic functions. For example, $\sin(ix) = i\sinh x$ (which will come in very handy).
If you multiple both sides of Kepler's equations by $i$ and substitute $E=iH$, you will find the hyperbolic equivalent of Kepler's equation, $iM = i(e\sinh H - H)$. Meanwhile, the mean anomaly $M$ is also imaginary. The best thing to do is to redefine mean anomaly so that it carries the same real concept for elliptical orbits but is also real for hyperbolic orbits. The end result is that $M = e\sinh H - H$ for hyperbolic orbits, with (once again) $M$ being zero at periapsis.
What about mean motion? Instead of using $n = \sqrt{\frac \mu {a^3}}$, one uses $n = \sqrt{\frac \mu {|a|^3}}$. This has zero effect on elliptical orbits but it has the desired effect of taking mean anomaly for hyperbolic trajectories into the realm of the real numbers. Whether the semi-major axis is positive or negative, mean motion is a simple linear relationship with respect to time, $M(t) = M_0 + n (t-t_0)$. The relationship between hyperbolic anomaly and true anomaly is also quite simple: $$\tanh \left(\frac H 2\right) = \sqrt{\frac {e-1}{e+1}} \tan\left(\frac f 2\right)$$