## Hazardous and Benign Space Objects: Solving Kepler's Equation

Following on from my previous post about Near Earth Objects, today we are going to solve Kepler’s Equation to find the eccentric anomaly, which is the next step towards plotting the positions of these NEOs relative to Earth.

## The Eccentric, True and Mean Anomalies

The relationship between the eccentric and true anomalies are depicted in the figure below (courtesy of Wikipedia). We are thinking about the object located at P, which is moving along an elliptical orbit (the red curve). The true anomaly, $\theta$, is the angular position of P measured around the focus of the orbit (the location of the Sun in this case) relative to the direction of periapsis (the extension to the right of the line CF). The eccentric anomaly, E, is measured relative to the same line, but the angle is taken at the centre of the ellipse. The mean anomaly, M, does not have a direct geometric interpretation. Although it has a value between 0 and $2\pi$, it is not an angle. The mean anomaly relates position and time via Kepler’s Second Law, and is proportional to the area swept out by the line FP.

## Kepler’s Equation

The eccentric anomaly, mean anomaly and orbit eccentricity are related by Kepler’s Equation:

This is a transcendental equation, meaning that it does not have an analytical solution. So we will need to use numerical techniques to solve it.

## Solving Kepler’s Equation

Recall that our NEO orbital data look like this:

We are going to use the Newton-Raphson method via nleqslv() to solve Kepler’s Equation for each record.

## Plotting the Results

We will plot the resulting relationship between the mean and eccentric anomalies using colour to indicate eccentricity.

As one would expect, when the eccentricity is zero (a circular orbit) the relationship between the two anomalies is linear.

## Finding the True Anomaly

Now it is a simple matter to get the true anomaly as well.

## The Next Step

Now that we have the eccentric anomaly, we can calculate the Cartesian location of the objects in their respective orbital planes. We will then transform from the numerous orbital planes to a single reference frame.