A collection of C code for accessing JPL Ephemerides data along with a few general purpose utility routines can be downloaded from here.. This code includes a python language interface and the necessary make files that show file dependencies. It makes use of the SOFA C code set which may be downloaded from here
The in this set of files are a number utility and test routines that were useful for testing the code, a few of which may be of more general use. Much of this code was written many years ago so the test dates may earlier that the available Almanacs so an update of the code is probably needed before use.
asc2bin The JPL ephemeris is available in binary format, but this may not be compatible with all computing hardware. A more generic approach is to obtain the ASCII version of the ephemeris and convert to binary format for much faster access using a conversion utiliity compiled on your own machine.
These ASCII files are provided in units of 20 years per file, e.g., ascp1960.405 ascp1980.405, etc. These need to be concatenated with the header file from the same data set to create a temporary ASCII file for that includes the date range that you need. In Linux this would be done with the 'cat' command:
$ cat header.405 ascp1980.405 ascp2000.405 > asc_temp.405The ascpxxxxs file must be in order of increasing date. The temporary file is then used as input to the asc2bin conversion routine along with the first and last Julian dates that you want included the binary files as follows.
$ asc2bin asc_cat.405 2450000 2460000The Julian dates do not need to be the same as the beginning and end dates of the concatenated ASCII files as long as the are within the boundaries of these files. The binary file name will be 'DEc' plus the ephemeris version number, e.g., DEc405.
The Julian date for a given month, day, and year may determined with the utility asc2bin, which returns the Modified Julian Date to which 2400000.5 to get the Julian date. For quick reference, the Julian dates for January 1, 1995, 2000, 2005, 2010, 2015, and 2020 are 2449718, 2451544, 2453371, 2455197, 2457023, and 2458849, respectively.
The JPL folks have kindly provided some test results that you can use to test both your ephemeris data and the code you are using to read it. These test results are in the 'test-data/' directory. Download the testpo.405 file.
Last updated January 8, 2010
Rick Fisher's Home Page