Discrepancy between ephemeride readings in Orekit and JPL Horizons
Position and velocity of the Earth retrieved in Orekit from DE441 ephemerides does not match that of JPL Horizons exactly.
As reference, I am using the following reading of Earth's ICRF position from JPL Horizons:
$$SOE
2460157.500000000 = A.D. 2023-Aug-01 00:00:00.0000 TDB [del_T= 69.183312 s]
XYZ : 9.262412495155303E+07 -1.097336742893849E+08 -4.753366571502377E+07
2.291818900912849E+01 1.678010135905066E+01 7.273858345769444E+00
sigmas: n.a. n.a. n.a. n.a. n.a. n.a.
$$EOE
To match this, I create the Earth CelestialBody
like so:
JPLEphemeridesLoader earthLoader = new JPLEphemeridesLoader("lnxp1990.441", JPLEphemeridesLoader.EphemerisType.EARTH);
CelestialBody earth = earthLoader.loadCelestialBody("Earth");
Then, I create an AbsoluteDate
:
TDBScale TDBscale = TimeScalesFactory.getTDB();
AbsoluteDate date = new AbsoluteDate("2023-08-01T00:00:00.000", TDBscale)
I get the ICRF frame like this:
CelestialBody centralBody = CelestialBodyFactory.getSolarSystemBarycenter();
Frame inertialFrame = centralBody.getInertiallyOrientedFrame();
Finally, if I retrieve Earth's position at my date in the ICRF frame:
earth.getPVCoordinates(date,inertialFrame)
The result is this:
{2023-07-31T23:58:50.81671611069787, P(9.262412495154932E10, -1.0973367428938684E11, -4.753366571502458E10), V(22918.189009133923, 16780.1013590413, 7273.858345764225), A(-0.0035420733727027968, 0.004120276885531439, 0.0017824598561580007)}
If you compare the positions, they differ by about 5 mm, while the velocities differ by a few nm/s. A discussion with @MaximeJ about this is here.