While working on Graviton, I discovered a useful system set up by NASA, that provides lots of information about celestial bodies, based on very accurate data (I believe it is also used to guide spaceships). It’s called HORIZONS, and is maintained by NASA’s Jet Propulsion Laboratory.

To get it work, you need to construct a set of parameters that tell it which information is of interest. The homepage of the project is here: ssd.jpl.nasa.gov/?horizons.

For example, I used the following script to obtain the velocity and position vectors of Mercury at March 13th of 2006, at 17:30:59:

!$$SOF EMAIL_ADDR = 'yannbane@gmail.com' START_TIME = '2006-Mar-13 17:30:58' STOP_TIME = '2006-Mar-13 17:30:59' TABLE_TYPE = 'Vector' REF_PLANE = 'Ecliptic' CENTER = '@010' COMMAND = '199' !$$EOF

NASA provides three interfaces: on the website, via telnet, and the email one. I found the email way to be the most useful, as Gmail has a good way of keeping all the information categorized.

Picture of the telnet interface

In order to get the email interface working, you simply need to send a set of parameters as the one above to this email: horizons@ssd.jpl.nasa.gov, with the subject job.

The COMMAND parameter refers to your body of interest, 199 being Mercury, 299 being Venus, 399 being Earth and so on. The CENTER parameter specifies the origin of your coordinate system, in my case, 010 being the Sun (with coordinates of x = 0, y = 0). The TABLE_TYPE parameter specifies how you want your data to be displayed, in my case, it was a table of vectors:

JDCT X Y Z (position) VX VY VZ (vectors) LT RG RR ******************************************************************************* $$SOE 2453808.229837963 = A.D. 2006-Mar-13 17:30:58.0000 (CT) -5.730179611929864E+07 1.963895677831353E+06 5.419068833578369E+06 -1.179887453107446E+01 -4.658790336366766E+01 -2.723342317439525E+00 1.921027750084663E+02 5.759096310840907E+07 9.894693725010404E+00 $$EOE