Expand description
GPS Time scale.
GPS Time is the time standard used by GPS satellites. It is synchronized with TAI
but offset by exactly 19 seconds: TAI = GPS + 19s.
§Background
GPS Time started on January 6, 1980 at 00:00:00 UTC. At that moment, GPS and UTC were synchronized, and TAI was already 19 seconds ahead of UTC. GPS does not include leap seconds, so the TAI-GPS offset remains constant while UTC-GPS diverges with each new leap second.
As of 2024, UTC is 18 seconds behind GPS (37 seconds behind TAI).
§Representation
Internally stored as a split Julian Date for nanosecond-level precision.
See JulianDate for details on the two-part representation.
§Usage
use celestial_time::{GPS, JulianDate};
// From calendar date
let gps = celestial_time::scales::gps::gps_from_calendar(2024, 3, 15, 12, 0, 0.0);
// From Julian Date
let gps = GPS::from_julian_date(JulianDate::j2000());
// Arithmetic
let later = gps.add_seconds(3600.0);
let next_day = gps.add_days(1.0);§Conversions
GPS converts to/from TAI via a fixed 19-second offset. See
scales::conversions::gps_tai for the conversion traits.
Structs§
- GPS
- GPS Time representation.
Functions§
- gps_
from_ calendar - Creates GPS time from calendar components.