2
$\begingroup$

I had naively assumed that GPS time and TAI were the same thing until I saw this answer: https://space.stackexchange.com/a/22244/12508

I know that there are differences between Terrestrial Time (TT) and TAI of ~32.184 seconds, but that is only accurate to the millisecond place I think. The differences between TAI and UTC are the usual leap seconds [e.g., see Franz and Harper, 2002], but is that accurate to the nanosecond?

So suppose I am given GPS times and need to convert those to UTC and need to be accurate to the nanosecond. Can I simply use the ~19 second difference mentioned in David's answer to convert to TAI and then add on leap seconds to get UTC?

Must I give in and be forced to learn JPL's SPICE software?

Other relevant but not directly related questions:

References

  1. Franz, M. and D. Harper "Heliospheric coordinate systems," Planet. Space Sci. 50, pp. 217--233, doi:10.1016/S0032-0633(01)00119-2, 2002.
$\endgroup$
4
  • $\begingroup$ The answer to your question is here: en.wikipedia.org/wiki/Global_Positioning_System#Leap_seconds (TAI - GPS = 19 seconds) $\endgroup$
    – Uwe
    Commented Feb 24, 2021 at 17:07
  • $\begingroup$ @Uwe - No, I don't think so. That's only accurate to something like the millisecond place, isn't it? I realize GPS has intrinsic uncertainties of 10s of ns, but if I need to know a time to at least that accuracy, will the 19 seconds be enough of a correction or is it only good to something like milliseconds? $\endgroup$ Commented Feb 24, 2021 at 17:15
  • $\begingroup$ Both TAI and GPS time are extremly precise clocks. Both time scales do not use leapseconds. So if there was a constant offset of 19 seconds in 1980, the offset is today still 19 seconds. If the offset would be different today, at least one time scale would be inprecise. The precision is about 1E-13 seconds, a nanosecond is 1E-9 seconds, a picosecond 1e-12. $\endgroup$
    – Uwe
    Commented Feb 24, 2021 at 17:26
  • $\begingroup$ @Uwe - No, I get all that. I am asking if the offset is indeed 19 seconds down to a nanosecond. $\endgroup$ Commented Feb 24, 2021 at 17:34

1 Answer 1

1
$\begingroup$

According to page 47 of the Explanatory Supplement to the Astronomical Almanac, TT – TAI was exactly 32.184 seconds, by definition, at the instant 00:00:00 TAI on January 1, 1977. Since then, there have been deviations from that exact value due to hardware limitations in the atomic clocks. The supplement says that between 1977 and 1990 (when it was being written), "the deviation probably remained within the approximate limits of ±10 microseconds." Clock quality has improved significantly since then, so the deviation is much smaller now; a footnote in the IAU Standards Of Fundamental Astronomy, "Time Scale and Calendar Tools" documentation, says "GPS time remains forever 19s behind TAI, to submicrosecond accuracy."

The US Naval Observatory says GPS time "during the last several years has been within a few hundred nanoseconds" of UTC(USNO), while UTC(USNO) "has been kept within 26 nanoseconds of UTC[BIPM] during the past year". The GPS performance standard for time transfer accuracy is less than 40 nanoseconds 95% of the time, but the International Earth Rotation Service's Tech Note 36 says "since the eccentricity $e$ for GPS orbits can reach up to 0.02, consequently the amplitude of [the additional relativistic correction needed beyond the one already built into the onboard clocks] can reach up to 46 ns." (page 154).

This shows that if you really need nanosecond timing precision, you must define what you want more exactly, because the uncertainty in comparing each of these time scales with itself is bigger than that! And that's before you start trying to consider ionospheric propagation delay, which can cause hundreds of nanoseconds of error at GPS frequencies, and other similar effects. I strongly recommend learning to use software like SOFA or SPICE, rather than try writing it yourself, unless you do it just as a learning exercise to discover how hard it is to get all these details right. :)

$\endgroup$
4
  • 1
    $\begingroup$ I actually wrote my own ephemeris software to convert between various heliospheric coordinate systems just to avoid learning SPICE (and because I'm stubborn and don't like using "black boxes"). During that several month ordeal, I gained a large appreciation for the nuances and difficulties of converting between different time stamps and the limits of their accuracies. So yes, I agree, none of this is easy. $\endgroup$ Commented Feb 25, 2021 at 14:20
  • 1
    $\begingroup$ @honeste_vivere The ordeal is good for you, and it's important to understand what goes on inside black boxes even if you can't see it directly. Once you have that, however, it is usually best to work with a box that has had lots of beta testing by users other than you, so you can take advantage of all the bugs they reported and somebody else fixed. Also, SPICE and SOFA both distribute the source code, so those boxes aren't actually black. $\endgroup$
    – Ryan C
    Commented Feb 25, 2021 at 15:32
  • $\begingroup$ Oh I agree, sorry I meant to imply that things I do not understand are included in the black box description. If I understood all that fell within the SPICE kernel realm, it would no longer be a black box, I agree. Anyways, so if I am given GPS time and need to convert to UTC, are there open-source resources for this besides SPICE and SOFA or are those the only ones out there? I know the US Navy and Air Force have resources but there are steep paywalls, are there not? $\endgroup$ Commented Feb 25, 2021 at 16:03
  • 1
    $\begingroup$ @honeste_vivere Ah, I see now, thank you. The US Government tools are mainly for official use only; they don't cost money, but there is a very long process of obtaining permission to use them, even if you are another US Government agency. Some of the Air Force stuff has recently been made publicly available. The resources you pay tons of money for are two commercial products (that also sell many copies to the US Government). There are a few other free software options, but quality varies widely. I'll edit the answer in a bit to add links to a bunch of these things. $\endgroup$
    – Ryan C
    Commented Feb 25, 2021 at 16:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.