# How do you Model Hyperbolic Orbits?

I'm programming an orbital simulator and need some help modeling hyperbolic orbits (or trajectories, whatever you want to call them). So far I can model elliptical orbits with the standard orbital elements (perigee, eccentricity, semi-major axis, mean anomaly, etc); I can calculate the mean anomaly in a few seconds from now, and from that derive the craft's position and velocity. Is there a way to do this for hyperbolic orbits? If you start with just the velocity and position vector of a craft can you predict where it will be every second from now while it is in a hyperbolic orbit/trajectory?

Yes. (It sounds like you are dealing with a two-body problem, which has analytic solutions.)

First off, given the position, $\vec{r}$, the velocity, $\vec{v}$, both in a coordinate system with the central body at the origin at rest, and the GM of the central body, $\mu$, you can readily compute the specific energy (energy per unit mass), which will tell you whether the trajectory is elliptical (negative energy) or hyperbolic (positive energy). Or perhaps parabolic (exactly zero energy), which is however only of mathematical interest. From the energy, you can get the semi-major axis, $a$. Here $v=|\vec{v}|$ and $r=|\vec{r}|$:

$$\mathcal{E}={v^2\over 2}-{\mu\over r}$$

$$a={\mu\over 2\mathcal{E}}$$

You are probably propagating elliptical orbits with sines and cosines. A hyperbolic trajectory is done in a similar way with hyperbolic sines and hyperbolic cosines. You can compute the specific angular momentum from just the position and velocity, and from that get the eccentricity, $e$.

$$\vec{\mathcal{M}}=\vec{r}\times\vec{v}$$

$$e=\sqrt{1+{\vec{\mathcal{M}}\cdot\vec{\mathcal{M}}\over\mu a}}$$

Then a simple form of the trajectory in the $xy$ plane, with closest approach on the $+x$ axis is:

$$x=a\left(e-\cosh\tau\right)$$ $$y=a\sqrt{e^2-1}\sinh\tau$$

where $\tau$ is the eccentric anomaly, related to time, where $\tau=0$ and $t=0$ is at closest approach:

$$t=\sqrt{a^3\over\mu}\left(e\sinh\tau-\tau\right)$$

• Would this work for a mean anomaly greater than 90 degrees? – Nonamee May 24 '16 at 18:04
• The mean anomaly is not an angle in this case. It's a different beast, defined as $M=e\sinh\tau-\tau$ (seen in the equation for time). – Mark Adler May 24 '16 at 22:48