C/C++ source code for JPL DE ephemerides

Last updated here 2022 April 13 . The code has moved to GitHub; further updates are described there.

You can download the source code from GitHub.

What this source code does: At present, this source code provides several tools for manipulating and computing positions from JPL DE-xxx binary and ASCII ephemerides. Unlike most other source codes for this purpose, it can handle either "little-Endian" (Intel) or "big-Endian" (PowerPC, SPARC) ephemerides, and can swap between assorted ephemeris versions without needing to be recompiled; instead, when it first reads an ephemeris, the byte order and ephemeris version are determined. It can handle all DE ephemerides as of this writing (August 2016, up to and including DE-435). This includes the very long time span of DE-431, which covers years -13000 to +17000, and the DE-430t and DE-432t ephemerides, which have TT-TDB data. (Both the extensive time span of DE-431 and the TT-TDB data of DE-43xt "broke" the existing DE format, and therefore quite a bit of existing code. The newer ephems also include more than 400 ephemeris constants, which also broke lots of code. So don't assume newer ephemerides will work with older code.)

This code works under DOS/Windows, Linux, FreeBSD, and OS/X (and probably other OSes, but I've only tested the first three and heard of results with OS/X). It works in 32-bit and 64-bit environments. It is based on C source code from Piotr A. Dybczyński, of the Astronomical Observatory of the A. Mickiewicz University; I essentially used the inner details of his code to do computations, and heavily revised the interface to that code. The result now bears only a passing resemblance to the original, though I really did rely heavily on that code in figuring out how JPL ephems work.

Also, the basic ephemeris functions are encapsulated so that you can use them without needing to know a great deal about how the inner portions of the code work. You can just call the functions and use the results. The error handling has been cleaned up; instead of bombing out inelegantly when a file is not opened or some similar error occurs, an error code is returned, and you can then decide what to do about it (notify a user, try another file name, etc.)

Quite a bit of optimization has been added, discussed in the file improve.txt in the source ZIP file. The source is somewhat more readable, with terse variable names replaced with descriptive ones and some comments added.

The code has also been arranged so that it can be made into a Windows DLL. This is not, of itself, especially useful, except that it does make it straightforward to call the functions from languages such as BASIC and Pascal that support calls to DLLs, as well as from some scriptable languages such as Python (though I must confess I'm not too knowledgeable about how that works.)

The extension '.cpp' is used to force the stricter type-checking of C++ compilers. However, you can rename all the sources to '.c' and compile with any C compiler.

I've tested my source with Microsoft 16-bit, 32-bit, and 64-bit compilers, the OpenWatcom 32-bit compiler, MinGW, and with gcc and clang in Linux, on both 32-bit and 64-bit boxes. The source is sufficiently generic that it should port readily to any platform, including ones with byte order opposite to that of the PC (it's been tested on a PowerPC Mac). The source code does not really think in terms of 'little-Endian' and 'big-Endian' byte order. Instead, it checks to see if the ephemerides have a byte order opposite to that of the current computer, and then swaps bytes as needed, on the fly. That's why there's nothing along the lines of an #ifdef BIG_ENDIAN in the source code. (This was necessary to ensure that both types of input files would be handled on both endians of architecture.)

JPL DE basics: Fortunately, I need not write much here, because the Readme file from the JPL Horizons site covers the basics better than I could anyway. Those looking for more information as to the inner workings of DE ephemerides, as well as how to convert their raw output into useful positions, may be interested in the book Fundamental Ephemeris Computations, by Paul J. Heafner, published by Willmann-Bell.

This page, apparently written for folks dealing with the timing issues of pulsars, goes into some of the mathematical/algorithmic details of how DE data is used. Most of it is stuff you do not really need to know if all you want to do is to get positions out of DE files.

JPL DE versions: The ephemerides have gone through three "series": the 100 series, the 200 series, and the 400 series. (Actually, there was a fourth "000" series, but I've yet to see any actual ephemerides, just comments mentioning that such ephemerides once existed.) DE-1xx was referenced to the B1950 ecliptic, and is basically of historical interest only. The DE-2xx series switched to J2000; in fact, DE-200 was nothing more than DE-118 rotated into the J2000 plane. DE-202 included some new data that hadn't been available when the DE-1xx series was created. Most of the versions are described here. The following is based on that, with some comments added by me.

DE102 : Created September 1981; includes nutations but not librations. Referred to the dynamical equator and equinox of 1950. Covers JED 1206160.5 (-1410 APR 16) to JED 2817872.5 (3002 DEC 22).

DE118:: Created ????. I've never actually seen a copy of it, but it is referenced here (a program to recreate it with numerical integration). That page says that DE-200 is essentially the same thing, rotated from B1950 to J2000.

DE200 : Created September 1981; includes nutations but not librations. Referred to the dynamical equator and equinox of 2000. Covers JED 2305424.5 (1599 DEC 09) to JED 2513360.5 (2169 MAR 31). This ephemeris was used for the Astronomical Almanac from 1984 to 2003. (See Standish, 1982 and Standish, 1990).

DE202 : Created October 1987; includes nutations and librations. Referred to the dynamical equator and equinox of 2000. Covers JED 2414992.5 (1899 DEC 04) to JED 2469808.5 (2050 JAN 02).

DE403 : Created May 1993; includes nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 2305200.5 (1599 APR 29) to JED 2524400.5 (2199 JUN 22). Fit to planetary and lunar laser ranging data. (See Folkner et al. 1994).

DE405 : Created May 1997; includes both nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 2305424.50 (1599 DEC 09) to JED 2525008.50 (2201 FEB 20)

DE406 : Created May 1997; includes neither nutations nor librations. Referred to the International Celestial Reference Frame. Spans JED 0625360.5 (-3000 FEB 23) to 2816912.50 (+3000 MAY 06) This is the same integration as DE405, with the accuracy of the interpolating polynomials has been lessened to reduce file size for the longer time span covered by the file.

DE410 : Created April 2003; includes nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 2415056.5 (1900 FEB 06) to JED 2458832.5 (2019 DEC 15). Ephemeris used for Mars Exploration Rover navigation.

DE413 : Created November 2004; includes nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 2414992.5, (1899 DEC 04) to JED 2469872.5 (2050 MAR 07). Created to update the orbit of Pluto to aid in planning for an occultation of a relatively bright star by Charon on 11 July 2005.

DE414 : Created May 2005; includes nutations and librations. Covers JED 2414992.5, (1899 DEC 04) to JED 2469872.5 (2050 MAR 07). Fit to ranging data from MGS and Odyssey through 2003. (See Konopliv et al., 2006.)

DE418 : Created August 2007; includes nutations and librations. Covers JED 2414864.5 (1899 JUL 29) to JED 2470192.5 (2051 JAN 21)

DE421 : Created Feb 2008; includes nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 2414864.5 (1899 JUL 29) to JED 2471184.5 (2053 OCT 09) Fit to planetary and lunar laser ranging data. (See Folkner et al., 2009)

DE422 : Created September 2009; includes nutations and librations. Referred to the International Celestial Reference Frame. Covers JED 625648.5, (-3000 DEC 07) to JED 2816816.5, (3000 JAN 30). Intended for the MESSENGER mission to Mercury. Extended integration time to serve as successor to DE406. Fit to ranging data from MGS and Odyssey through 2003. (See Konopliv et al., 2010.)

DE423 : Created February 2010; includes nutations and librations. Referred to the International Celestial Reference Frame version 2.0. Covers JED 2378480.5, (1799 DEC 16) to JED 2524624.5, (2200 FEB 02). Intended for the MESSENGER mission to Mercury.

DE430 : Created April 2013; includes librations and 1980 nutation. Referred to the International Celestial Reference Frame version 2.0. Covers JED 2287184.5, (1549 DEC 21) to JED 2688976.5, (2650 JAN 25). The DE430t variant includes TT-TDB information. Including this required format changes, so you may have to use "ordinary" DE-430 with some software. The binary files are about 100 MBytes.

DE430 and DE431 are documented in the following document: http://ipnpr.jpl.nasa.gov/progress_report/42-196/196C.pdf

DE431 : Created April 2013; includes librations and 1980 nutation. Referred to the International Celestial Reference Frame version 2.0. Covers JED -0.3100015.5, (-13200 AUG 15) to JED 8000016.5, (17191 MAR 15). The price of this super-long coverage is that (a) the binary file consumes about 2.8 GBytes; and (b) not all software can read it; some programs don't like the idea of negative JDs.

DE432 : Created April 2014; includes librations but no nutations. Referred to the International Celestial Reference Frame version 2.0. Covers JED 2287184.5, (1549 DEC 21) to JED 2688976.5, (2650 JAN 25), as do DEs 433, 434, and 435. DE432 is a minor update to DE430, and is intended primarily to aid the New Horizons project targeting of Pluto. The DE432t variant includes TT-TDB information. Including this required format changes, so you may have to use "ordinary" DE-432 with some software. The binary files are about 100 MBytes.

DE433 : Posted to the JPL site July 2016; includes librations and nutations. Covers the same time range (1550 to 2650) as DE432. There is no inter-office memorandum available for this ephemeris, so I really can't say very much about it.

DE434 : Posted to the JPL site July 2016, created November 2015; includes librations and nutations. Covers the same time range (1550 to 2650) as DE432. It was created to support the Juno mission, with an improved Jupiter ephemeris that includes re-processed data from six spacecraft flybys and some data from the New Horizons flyby.

DE435 : Posted to the JPL site July 2016, created January 2016; includes librations and nutations. Covers the same time range (1550 to 2650) as DE432. It was created to support the Cassini mission, and includes data from that spacecraft up to the end of 2015.

DE440 : Posted to the JPL site February 2022, created June 2020; adds about seven years of new data. Covers the same time range (1550 to 2650) as DE432.

DE441 : Similar to DE440, but covers a much longer time span : JED -3100015.5, (-13200 Aug 15) to JED 8000016.50, (17191 Mar 15). That does bring up the file size from 97.5 MBytes to 2.60 GBytes. Unless you actually need to handle dates before 1550 or after 2650, you might as well stick with DE440.

Unless you need a smaller file or need to replicate a result made with an older ephemeris, I'd recommend one of the DE-44x ephems. The one to use would depend on the file size and time span you want, and your need to work with older software. (Indeed, with some older software, you'll probably be stuck with DE-405 or -406. Which, depending on your application, may be perfectly sufficient.)

Finding DE files: Most people will download pieces of any desired ephemeris from this JPL ftp site. The Linux folder contains ephemerides in the order intended for Intel machines; the SunOS folder contains data for opposite-Endian machines. (Files with either endianness will work with this software. Note that the SunOS folder stops at DE423. The Linux folder currently has all versions, right up to the current DE441. For the purposes of the code on this page, you can really just use the Linux version; if your system is big-Endian, the code will reverse data as needed and carry on as if nothing had happened.) Other folders provide test data, ASCII versions of the ephemerides, and some inter-office memoranda describing each version of the ephemerides. Almost all DE ephemeris versions are available, ranging from the very archaic DE-102 to the "latest and greatest" DE-44x series.

If you lack Internet access, you can purchase a CD-ROM from Willmann-Bell containing the full DE-200, DE-405, and DE-406, for about US $25. As far as I know, this is the only place you can purchase the files on a physical medium.

As stated above, I'd recommend the DE-44x series. These incorporate observations that were unavailable in previous DEs, and give you a choice of download sizes depending on just how many centuries or millennia you're interested in.

Two recent JPL ephemerides, DE-430t and DE-432t, include the time scale transformation TT-TDB; some INPOP ephemerides do as well (though not in a way that's compatible with JPL's files, or with this source code). TT=Temps Terrestriene = time at the geocenter; TDB = Temps Dynamique Barycentric, the time at the barycenter of the solar system. These basically differ by about 1.6 milliseconds, with the sign of the difference varying over the course of a year; but there are some smaller terms in there as well. In theory, you should supply TDB as the argument to JPL ephemerides; they are created with the idea that the rate of "time" matches that of an observer at infinity who is at rest with the solar system barycenter, whereas TT corresponds to time as measured by somebody at rest with the geocenter. However, that 1.6 millisecond difference is completely negligible for almost all purposes except pulsar timing.

Be warned: not all programs can handle DE-430t and DE-432t and above. (The software on this page will do so. The only other software I know of, as of 2016 August, is the FORTRAN source provided by JPL. That was the source to which I referred when attempting to puzzle out how TT-TDB had been added to the DE-4xxt ephems.)

Bolder citizens can download JPL ephemerides in ASCII form from the ascii folder of the above site. Assorted software is available to convert these to binary form, or you can use the asc2eph routine supplied with the source code on this page (which is what I'd recommend; asc2eph is considerably more user-friendly than the alternatives, in my admittedly prejudiced opinion.) In at least a few cases, the "pre-built" binary ephemerides in the Linux and SunOS folders don't have the full range of the source ephemerides. In such cases, you may want to download ASCII ephemerides and make your own. This also allows you to make an ephemeris file covering a specific range. If, for example, you know you'll only be dealing with data between years 2000 and 2012, you can make a much smaller binary ephemeris covering only those years. (For the DE-43x ephemerides, you'll need about 100 KBytes per year.)

You can click here for documentation of these ephemerides.

The following are mostly of historical interest, or perhaps of interest if one is looking for smaller downloads. Note that FTP won't work with most current browsers (disabled over security concerns). You'll have to use an ftp client such as Filezilla in such cases.

Steve Hutcheon kindly pointed me to this ZIPped DE file (about 50.8 MBytes), supplied as part of the OCCULT software for computing occultation data.

Interestingly, the IMCCE (formerly known as the Bureau des Longitudes) in Paris is now providing ephemerides in the same format as JPL. (Note that these ephemerides have something of a flaw: the ranges start at noon instead of midnight, which can lead to small errors for almost all ephemeris code. I made some small revisions to my own code -- look for comments about IMCCE in jpleph.cpp for details -- that allow it to get around this problem; but other software may not have been modified yet to allow reading of IMCCE files.)

Also, note that IMCCE offers files that give the difference TT-TDB, much as JPL's DE-430t and DE-432t do. However, I don't think the format is the same as that used by JPL. So you should stick with their "Binary files compatible with the JPL DExxx ephemeris file format (without the time scale transformation TT-TDB or TCG-TCB)".

You can click here for the download page, which offers ephemerides covering roughly 1900 to 2100 (about 18 MBytes) and an ephemeris file covering years 1000 to 3000 (about 180 MBytes). These files will work with the software on this site, and with most other JPL ephemeris software... but not all other software; there are a few subtle differences in these files that may throw software that isn't expecting them, and the aforementioned flaw is probably a show-stopper for most uses. You can click here for the paper describing how these ephemerides were created.

If you have a copy of Guide 8.0, you already have a large chunk of DE. On the second CD-ROM, the jpl_eph directory contains the file sub_de.406. This gives ephemerides for years 1800 to 2200, and is provided courtesy of Willmann-Bell.

If you have a copy of the Guide 9.0 DVD, you'll find both the sub_de.406 and jpl_eph.422 in the jpl_eph directory. jpl_eph.422 covers years -3000 to +3000, and is about 557 MBytes.

All of these provide ephemerides in big-Endian byte order, suitable for PowerPCs and Sparc. However, the source code provided on this site, including the Find_Orb orbit determination software will read such ephemerides anyway. The ephemeris files have extensions such as .200, .405, or .406, depending on which DE they're from.

Note that the ftp sites and the Willmann-Bell CD-ROM also provide DE data in ASCII form. None of my software (at least right now) makes use of ASCII DE (and it wouldn't be very useful to do so anyway). Instead, the asc2eph program converts them to the more usual binary form. (And eph2asc can do the reverse conversion, though it's hard to come up with cases where that would be useful.)

Steve Preston has pointed out to me that the folks behind the OrbFit orbit calculation software have posted some pieces of DE-405 on their ftp site. You can get pieces of DE-405 in either Intel or big-Endian format. According to the documentation on the site, the (big-Endian) de405.dat file covers years 1970 to 2020. The Intel-order de405_win.dat file covers the years 1960 to 2020. However, the file sizes seem to indicate that the range of the latter could be about 150 years. I've not investigated to find out what it really is.

Assorted pieces of DE-200, 202, 403, 405, and 406 are also available here (though this site is currently unavailable).

Other DE source code: Truthfully, I think rather well of the JPL ephemeris source code described on this page. But there are a lot of implementations of these functions, and you may find that you prefer one of them, especially if C is not your cup of tea.

In addition to Piotr Dybczyński's C source code (the basis for the source code on this page, though it's almost completely changed now), there are (at least) two other versions of C source code to access DE ephemerides mentioned on the JPL site, as well as source codes in FORTRAN and Java. Almost all of the C source code versions have a testeph.c program that reads a 'testpos.###' file, where '###' is the ephemeris version number, and checks to ensure that the code functions correctly. The versions from this site is no exception; the test program is supplied, and also serves as an example of how to use the functions. Note, though, that they've not been updated in a long time; with the exception of the Fortran version, they probably don't work with "modern" ephemerides.

The ephemeris.com implementation looks to be an improvement on the original routines; it is available here. It looks as if the author has made many of the same changes I did to produce a "saner" set of routines.

Alan W. Irwin has fixed some problems with the ephemeris.com code and added a Fortran interface and a modern build system. He has released his ephcom2 version as ephcom-2.0.1; click here for details.

There is also yet another version of C++ source code to access DE ephemerides on this site. Documentation appears to be extensive, but in Spanish, and I therefore can't say much about this code.

Shinobu Takesako has posted this page of C source code for reading DE files. It includes a potentially very useful program to convert from the UNIX format to the DOS one, and vice versa. This is of no real help if you're using the code provided on this site, which handles either format. But most software out there is not so flexible, and requires DE files in the platform-specific format.

Also, the book Fundamental Ephemeris Computations includes source code in both PowerBasic and C, which goes beyond the basic "get rectangular coordinates for this object" to higher-level functions.

Some utilities for manipulating DE data: On the JPL ftp site, DE is provided in 'chunks' of a few megabytes. It can be nice to be able to merge two or more together to make a single ephemeris file covering a longer time span. In the other direction, persons with the Willmann-Bell CD, containing DE ephemerides as single files of up to 200 MBytes, might like a means of making a "sub-ephemeris" covering only a few years.

The source code provided on this site includes C source for both utilities (about 44 KBytes). Run the programs without command-line arguments, and each will give a summary of how it is to be used. Both will work with either byte order (if fed Intel-order files, they will create Intel-order output; if fed UNIX-order files, they will create UNIX-order output.) The sub_eph.cpp function requires the basic astronomical function library provided elsewhere on this site (just so that it can do date conversions). The merge_de.cpp program is a "standalone" beast.

Also provided with this code is an eph2asc utility, which is the reverse of asc2eph: it reads in binary JPL ephemerides and creates ASCII ones. The usefulness of this is, at best, questionable.

Another utility of possible interest is Shinobu Takesako's code to convert DE files from Intel to UNIX byte order, or vice versa.

Why this source code exists: As mentioned above, there are at least least three different, freely-available C sources for DE access, plus FORTRAN and Java sources, and one could question the need for a fourth. However, I've revised Find_Orb and Guide to use DE ephemerides. (Both can compute planetary/lunar positions using analytic Poisson series, a sort of hybrid of the familiar Taylor power series and trigonometric series. This isn't bad, but there are reasons to use DE rather than analytic series, which is why Find_Orb and Guide can now use DE when available.)

The current C sources are suitable if you're writing your own software and can do a lot of your own programming, to craft them to your project of choice, for a program that won't be redistributed to others. But people using Find_Orb or Guide will not wish to recompile every time they swap ephemeris versions, or get a new ephemeris with a different byte order. They may want to switch to different ephemeris files: I now supply DE-422 on the Guide 9 DVD, for example, but people may use subsets to cover short time frames with smaller files. Or they may get DE from ftp sites, or purchase it on CD-ROM. Or they may need to use an older DE ephemeris such as DE-200 or DE-102 to recreate old results. (For example, DE-200 was used for years in the Astronomical Almanac, and people may want to replicate results from that publication.)

Reasons to use JPL DE rather than analytic series: Much current astronomy software (including my own, in some situations) can use analytic series instead of DE. For computing planetary ephemerides, I've used PS-1996 for high precision and VSOP-87 where only lower precision is needed. For lunar ephemerides, I've used ELP-82. All of these were developed at the Bureau des Longitudes in Paris, and both are really sufficient for most purposes. They express lunar and planetary positions as the sum of a series of trigonometric terms, some multiplied by powers of time (a Poisson series). I've written and posted C source code to compute PS-1996 positions and C source code to compute ELP-82 positions on this site.

On the plus side, these analytic series are convenient in that you have a small file of a few hundred KBytes with which to deal, and their use is well-documented in books such as Meeus' Astronomical Algorithms. You can also throw away small terms if you don't really need immense accuracy. In some places in my code, I've just added up the first few terms of VSOP to get a "ballpark" (within a few arcminutes) position (see sm_vsop.cpp in the Find_Orb source code.)

However, there are a few things favoring DE use. ELP and VSOP are based on DE-200, which is essentially obsolete with the availability of DE-4xx ephemerides. PS-1996 is a little better off, being based on DE-403; it provides an extremely accurate match, right down to the milliarcsecond level. However, DE-403 has been supplanted by DE-405 and DE-406, and since by a series of still better ephemerides. And the time range of PS-1996 is limited to 1900 to 2100 (except for Neptune and Pluto, which extend back to 1850 and 1700 respectively.) For more distant dates, and for anything involving the moon, all we've got are DE-200 based results.

Also, computing a position from DE is much faster than doing so from an analytic series. Users of my Find_Orb orbit determination software may have seen it slow down on long integration runs, primarily because it computes thousands of positions using ELP-82 and PS-1996. Switch over to use of DE (which Find_Orb can do), and you see quite a speedup. (The problem is so bad that if Find_Orb doesn't find a DE file, it warns you about it and links you to a page describing how to fix the problem.)

What this source code should eventually do: I'd like to revise the source code a bit so that it can also read ASCII ephemerides. (Admittedly of limited utility, since one can and should convert ASCII ephemerides to binary anyway.) It could then read all three of the basic ephemeris flavors: little-Endian binary, big-Endian binary, and ASCII. It would be able to do so without needing adjustment by the user; it would simply open the file and determine the type of ephemeris, and the inner details would be of no concern to the user (or the programmer).

Once it could do so, it would be relatively straightforward to provide code to write out a new DE binary ephemeris. That is, one might use the code to open up a DE ephemeris (of any of the three flavors), and ask that a smaller ephemeris covering a particular time span be written out, in any of the three flavors.

Of somewhat lesser importance, I'd like the program to be able to process other JPL ephemerides preceding DE-200. These are mostly of historical interest only, since they're in the B1950 system (DE-2xx ephemerides are in J2000, and DE-4xx are in ICRF) and are not as accurate in any case. Also, they are not as readily available as the later ephemerides. However, such historical interest does exist (say, when one needs to replicate an older result), and I have some interest as well in Steve Moshier's DE118i source code. This code takes initial state vectors and does the numerical integration, using the same physical model as an older JPL ephemeris, to create a "DE-118i" ephemeris. I can't say this is high on my agenda... if it turns out, though, that one can supply new state vectors and some new constants to create something very close to DE-4xx, my interest will increase greatly. (To do so, I would need to compute Chebyshev polynomial coefficients, but this is not especially difficult.) One could then compute, for example, a DE-405-level accuracy ephemeris covering the full time span of DE-406; or make a DE-formatted ephemeris covering tens or hundreds of millennia, perhaps at lower precision. At the very least, it would let you download a small program and use it to generate an enormous multi-hundred-MByte ephemeris, rather than requiring you to download that enormous ephemeris.

Copyright/legal issues: This code is released under the GPL (General Public License).

Changes:

• (2016 August 1) Updated documentation to describe DEs 433, 434, 435, and to point to the GitHub project page for the source code. Future modifications to the source code will be documented on GitHub.

• (2014 May 13) The code now handles all ephemerides up to DE-432t, and will correctly handle ephems with TT-TDB info. I revised testeph to use tighter, more logically derived tolerances. asc2eph now uses the JPL scheme for handling more than 400 ephemeris constants; it's also able to figure out the various schemes used for five-digit years in the input ASCII file names.

Also, the makefile now allows you to define CLANG=1 to switch to use of the clang compiler, which should allow compilation on OS/X and other OSes that usually lack gcc. You can also define MSWIN=1 to compile with MinGW on DOS/Windows.

Also, the code now computes not just the position and velocity of the solar system barycenter, but its acceleration; and the acceleration of other quantities could be easily computed if desired (all I need as yet is the acceleration of the SSB).

• (2011 Dec 27) Revised jpleph.cpp with a couple of surprisingly significant speed improvements, and found and cleaned up some confusing and hard-to-maintain pieces of code left over from the original version. (The parts in question worked Just Fine, but were more convoluted than appears to be necessary. I also revised some of my own code to make it easier to read and understand.)

• (2011 Dec 27) Also, added a new jpl_init_error_code( ) function which returns some finely-grained error checking info if jpl_init_ephemeris( ) fails.

• (2011 Dec 27) Also, added eph2asc, software that is (logically enough) the reverse of asc2eph: given a binary JPL ephemeris, it can create ASCII JPL ephemerides.

• (2011 Dec 27) Also, added mention of the new DE-424.

• (2011 Oct 8) Sped up asc2eph by about a factor of four. (Not that it was terribly slow to begin with, but I was curious as to why it wasn't faster. It turns out that converting ASCII floating-point values to binary is somewhat slow when using the "usual" C library strtod( ) or atof( ) functions. See comments in asc2eph.cpp and f_strtod.cpp for details of what I found out and fixed.)

• (2011 Oct 4) Tatjana Jaksic pointed out that asc2eph failed badly on 64-bit systems, as well as needing fixes for Linux. This is all fixed; also, you get a progress bar and better error checking. See comments in asc2eph.cpp for details. Also improved some error checking in loading JPL ephemerides, making sure (for example) that the file is actually a JPL ephemeris one.

• (2011 Aug 31) Added mention of the ephcom2 source code for reading JPL ephemerides.

• (2011 Mar 28) Revised jpleph.cpp to handle IMCCE ephemerides. These differ from JPL ephemerides in that they are aligned to noon instead of midnight; that necessitated some small changes. See jpleph.cpp for details.

• (21 Apr 2010) Some minor user-friendliness improvements... also, I realized that some of the utility functions couldn't handle the new DE-423 files, so I revised them to do so. While I was about it, I also made them more "future-proof", so that future DE-xxx files ought to work without my having to revise the code.

• (15 Apr 2009) The code should now work properly on 64-bit compiles. The error checking is a little better. There is now a dump_eph.cpp program which shows some of the header data from a binary JPL ephemeris, and which can also compute state vectors for a range of dates specified on the command line. Also provided is an asc2eph.cpp routine (essentially that of Piotr A. Dybczyński, with some improvements to make it more user friendly and able to handle different DE numbers without needing to be edited and recompiled.) Also, there's a makefile for the OpenWatcom compiler. The linmake makefile for Linux has been tested with MinGW, and appears to work with that system as well.