It is sad that there are so many purported authorities on time, but rarely do they agree. There certainly is a great deal of confusion. Which sources, exactly, are correct??
Here is a specific apparent discrepancy between Orekit and NASA:
double gpsSec = 1.312567218e9;
AbsoluteDate ad11 = AbsoluteDate.GPS_EPOCH.shiftedBy(gpsSec);
/* insert code to print ad11 as UTC date with nanosecond precision */
System.out.println(“Julian day=” + formatter.format(ad11.offsetFrom(AbsoluteDate.JULIAN_EPOCH, TimeScalesFactory.getTT())/86400));
results in:
UTC = 2021-08-09 18:00:00.000000000 UTC
Julian day=2459436.2508007404
but NASA, in the form of this online calculator:
says that the Julian Date is 2459436.25 exactly.
The NASA gsfc website says that JD=2459436.2508007404 corresponds to
2021-08-09 18:01:09.184 UTC
or 69.184 seconds difference. That is also the current difference between TT and TAI.
Changing the Java code to:
System.out.println(“Julian day=” + formatter.format(ad11.offsetFrom(AbsoluteDate.JULIAN_EPOCH, TimeScalesFactory.getTAI())/86400));
gives the same result as above.
Also, if I use
AbsoluteDate julianEpoch = new AbsoluteDate(DateComponents.JULIAN_EPOCH, TimeComponents.H12, TimeScalesFactory.getTAI());
(which differs from the value in Orekit by using TAI instead of TT)
and
System.out.println(“Julian day=” + formatter.format(ad11.offsetFrom(julianEpoch, TimeScalesFactory.getTT())/86400));
or
System.out.println(“Julian day=” + formatter.format(ad11.offsetFrom(julianEpoch, TimeScalesFactory.getTAI())/86400))
I get a third value:
Julian day=2,459,436.2504282407
Can anyone help de-confuse this??
Thanks!