# Calculating time until apoapsis analytically

1. Feb 17, 2015

### ellipsis

Given general information about the current orbit (eccentricity, semi-major axis, apoapsis, etc), as well as positional information (position, velocity, true anomaly) I would like to calculate the time until the smaller body reaches the apoapsis of its orbit. This is a restricted two-body problem, in that the mass of the smaller body is negligibly small.

I have a suspicion that I can use the true anomaly somehow to calculate time between points. However, I cannot find a reference online for it, and I have no idea how to derive it.

I can calculate the orbital period, though, and I know that the orbit of any body sweeps out the same amount of area each equal time interval. I could maybe find a formula to find the area of an arc on an ellipse, then divide that quantity by the total area, then multiply by the orbital period.

It's funny how simply writing out a post comprehensively helps you think better about how to solve a problem. That is probably not a possible way to derive it, though, so you guys tell me how anyway.

2. Feb 18, 2015

### D H

Staff Emeritus
Five easy steps:
1. Calculate the eccentric anomaly $E$ from the true anomaly $\theta$ via
$$\tan\frac E 2 \sqrt{\frac{1-e}{1+e}} \tan \frac \theta 2$$
Note that this will yield a value between -pi and pi if you use the standard definition of arc tangent.

2. Calculate the mean anomaly $M$ from the eccentric anomaly $E$ via Kepler's equation,
$$M = E - e\sin E$$
3. Calculate the change in mean anomaly $\Delta M$ from the calculated value of $M$ to that at apoapsis, which is $\pi$:
$$\Delta M = \pi - M$$
4. Calculate the mean motion $m$:
$$n = \sqrt{\frac{GM}{a^3}}$$
5. Calculate time to apoapsis:
$$\Delta t = \frac{\Delta M}{n}$$

3. Feb 18, 2015

### ellipsis

Thank you so much... I will get to work on this immediately. (I am rather glad, since that derivation idea I had involved integration in polar coordinates, yuck)