JPL has a nice library for computing spacecraft location and pointing, SPICE <https://naif.jpl.nasa.gov/naif/index.html>, with interfaces in Fortran, C, IDL, Matlab, while others have created interfaces in other languages.  Relevant here is the extensive well-tested time conversions <https://naif.jpl.nasa.gov/pub/naif/toolkit_docs/FORTRAN/req/time.html>.  It's important to keep the leap second kernel (LSK) updated (as well as SPK, PCK kernel files).  Although not mentioned explicitly in SPICE, GPS time lags TAI by 19s so conversion is straight forward.

For IDL and IDL users (and some other languages), the Common Data Format (CDF) time conversion routines for CDF_TIME_TT2000 <https://cdf.gsfc.nasa.gov/html/leapseconds.html> can be used for converting between TT and UTC, and GPS is an easy conversion.  Again requires keeping leap second table updated.  A Python library is at <https://github.com/MAVENSDC/cdflib>.

_______________________________________________
LEAPSECS mailing list
LEAPSECS@leapsecond.com
https://pairlist6.pair.net/mailman/listinfo/leapsecs

Reply via email to