Skip to content

fferino/jplasc2eph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

jplasc2eph

C routines to convert ASCII JPL ephemerides into the same binary format created by the JPL asc2eph FORTRAN program.

JPL publishes ephemerides in ASCII form which can be found at ftp://ssd.jpl.nasa.gov/pub/eph/planets/ascii

The ASCII files are not usable by most astronomical software packages but instead must be converted into a platform specific binary format.

To do this, JPL provides a simple FORTRAN program "asc2eph.f" at ftp://ssd.jpl.nasa.gov/pub/eph/planets/fortran to convert an ephemeris ascii file into a binary file.

JPL also provides some software written in C by other people in ftp://ssd.jpl.nasa.gov/pub/eph/planets/C-versions, but neither of these C versions produce files in the same binary format as the FORTRAN asc2eph.f

Unfortunately, some very useful software packages like the Naval Observatory Vector Astrometry Software (NOVAS) (http://aa.usno.navy.mil/software/novas/novas_info.php) requires the binary file in the format generated by asc2eph.f. Although there is C and Python versions of NOVAS in addition to the FORTRAN version, the NOVAS user manual for these languages directs the user to concatenate the ASCII files before processing them with the asc2eph program generated by compiling asc2eph.f

This software was written to allow generation of the proper binary file on systems without a FORTRAN compiler. It generates the same binary format as JPL's asc2eph and its output can be used with NOVAS. The software was tested with both the DE405 and DE430 series of ASCII file.

To use, just compile the single C file jplasc2peh.c into an executable jplasc2eph and generate the binary file by specifying the header file for the JPL ASCII series used followed by the ASCII files to convert.

Example to generate the binary file covering the years 1950-2150 using the DE430 series of JPL ephemerides files:

jplasc2eph header.430_572 ascp2050.430 ascp1950.430 ascp2150.430

Note that contrarily to asc2eph, jplasc2eph does not require prior concatenation of the ASCII files covering the desired years and the ASCII files do not need to be specified in any order. However, jplasc2peh will report an error if there is a gap in the set of years covered by the ASCII files.

About

C routines to convert ASCII JPL ephemerides into the same binary format created by the JPL asc2eph FORTRAN program

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages