brandon-rhodes / python-jplephem

Python version of NASA DE4xx ephemerides, the basis for the Astronomical Alamanac
MIT License
110 stars 29 forks source link

Velocity units #11

Closed astrojuanlu closed 9 years ago

astrojuanlu commented 9 years ago

I found out while playing with DE421 that the velocity units are totally weird:

>>> from jplephem.spk import SPK
>>> segment = SPK.open("/home/juanlu/.poliastro/de421.bsp")[0, 3]
>>> segment.compute_and_differentiate(2455892.12638)
(array([  6.46018928e+07,   1.21419999e+08,   5.26380039e+07]),
 array([-2351289.80926542,  1031820.94826912,   447306.48380103]))

Using a different kernel makes no difference:

>>> segment = SPK.open("/home/juanlu/.poliastro/de430.bsp")[0, 3]
>>> segment.compute_and_differentiate(2455892.12638)
(array([  6.46018929e+07,   1.21419999e+08,   5.26380037e+07]),
 array([-2351289.81068923,  1031820.94419092,   447306.48532802]))

Dividing by 1e5 makes it sensible but that means... centimeters per second? I looked at the original references but found no information about the output units. Looks like a bug to me, what do you think?

brandon-rhodes commented 9 years ago

The JPL ephemerides tend to express velocities per-day, as in the DE430 report itself, where all of the tables seem to assume days as the denominator for velocity:

http://ilrs.gsfc.nasa.gov/docs/2014/196C.pdf

So the native units of the two kernels as published by the JPL would be kilometers and kilometers per day — does that make sense of the numbers you are seeing?

astrojuanlu commented 9 years ago

You are right, table 5 of the DE430 report uses day as the denominator. It is still weird that they use kilometers instead of AU though, but still I will try using days, cross check with HORIZONS and come back with the results.

brandon-rhodes commented 9 years ago

The AU is inconvenient because it keeps changing length as our measurements of the solar system become better, so they had no choice but to use kilometers if they wanted to issue numbers whose meaning would be unambiguous. Hopefully things will be better now that the AU has been discarded and replaced with the “au” which is simply a fixed number of kilometers.

astrojuanlu commented 9 years ago

Oh, I was not aware of the "replacement" of the AU, would you please link a reference about that? :)

I confirmed that the velocity units are kilometer per day, so this can be closed - yet I found another issue that I am opening right now. Thanks!

astrojuanlu commented 8 years ago

Just for future reference, the astronomical unit was redefined in "RESOLUTION B2 on the re-definition of the astronomical unit of length".