**by Phill Edwards**

It took me a long time to get there, but I was wondering how we managed to get spacecraft to the Moon and other planets given the appalling information I had found so far. I then discovered that the NASA Jet Propulsion Laboratory publish data giving the positions of the Solar System bodies in sets of data files spanning 100 years. The data sets are called DE4xx and a recent publication is DE430. The only problem with using this data is that the documentation is hard to find and interpret. One useful document is here.

The first issue I found concerned the coordinate system of the data. The problem is that it is hard to find a coordinate system which doesn't move over time. As everything in the Solar System is moving something else is required.

The International Celestial Reference System (ICRS) has been defined to give a fixed coordinate system. The XY plane is defined as to be the Earth's mean equatorial place at the J2000 epoch - 2001-01-01 12:00:00. The X axis is the intersection of the Earth's equatorial plane with the ecliptic plane at the J2000 epoch. This is also known as the direction of the reference Vernal Equinox. The actual directions are defined in terms of the positions of very distant quasars whos positions are effectively fixed.

DE430 data is borken into a series of data files. There is a header file header.430_572 which defines an number of constanst and the indexes which separate components of the actual data. The actual data files each contain 100 years of numeric integration data. I initially used the data file ascp1950.430 as this contains the current and near future dates. The files contain the data for the Sun, Moon and all 8 major planets. The Data takes the form of Chebyshev polynomials for the X, Y and Z coordinates in the ICRS with the origin at the Solay System Barycentre. The lunar positions have their origin at the Earth's centre.

The Chebyshev polynomials work as follows.

The data for each body is divided into up to 14 terms. The data is divided into 32 day intervals. Each interval is divided into 1, 2, 4 or 8 sub-intervals depending on the body. The header file defines the number of terms and the number of sub-intervals for each body.

When the location of a body is required, the Julian date of the required time needs to be transformed into a number in the range t = [-1.0,1.0] where -1.0 corresponds to the start of the sun-interval and 1.0 corresponds to the end of the sub-interval. A Chebyshev series is then generated which has the correct number of terms for the body -\upto 14. The Chebyshev terms are defined to be:

T_{1}=1, T_{2}=t, T_{n}=2tT_{n-1}-
T_{n-2}

The derivative of the body coordinate can also be calculated by differentiating the Chebyshev series with respect to time to give the velocity terms:

V_{1}=0, V_{2}=1, T_{3}=4t,
V_{n}=2tV_{n-1}+2tT_{n-1}-V_{n-2}

The body positions consist of x, y and z coordinates. Each of these is calculating by summing the product of the body terms and the corresponding Chebyshev terms.

Many calculations are based on the Earth's ecliptic coordinates. This measn that transformations have to be applied to the DE430 calculated positions. The DE430 calculations need to be performed for the Sun, Moon an and Earth for each position as a function of time. The Sun's position needs to be subtracted from the Earth's position to get the Earth's position relative to the centre of the Sun. The coordinates then need to be rotated aroun dthe X axis by the earth's axial tilt and then rotated around the Z axis by the value of the vernal Equinox position at the calculation time. The values of the axial tilt and Vernal Equinox precession are obtained from precession data.

To facilitate the calculation of orbital parameters, the ecliptic position of the Earth is calculated and stored for every day over an interval of several decades.

The time and distance of perihelion is required for many calculations. During the calculation of Earth's position over several decades, each two day period is examined. If the middle day Earth-Sun distance is less than the distance for the previous and next day, then perihelion must occur within that two day period. The actual time and distance of perihelion can then be determined by a binary search iteration over the period.

The mean anomaly is simply the number of days since periapsis divided by the number of days in a calendar year. This is 365.24 for Earth.

The true anomaly is the angle which the current planet makes with the reference X axis plus the value of the Vernal Equinox precesssion for the time of calculation.