Expand description
Typed encoded formats of crate::Time.
A format marker specifies how a time instant is externally expressed:
Julian Day (JD), Modified Julian Day (MJD), J2000 seconds (J2000s),
POSIX seconds (Unix), or GPS seconds (GPS). Format is orthogonal to
scale: JulianDate<TT> and JulianDate<UTC> share the same format but
live on different physical time axes, and the compiler treats them as
distinct, incompatible types.
§Main types
TimeFormat— sealed marker trait for format tags (JD,MJD, …).EncodedTime<S, F>— a typed encoded instant;Sis theScaleandFis theTimeFormat.FormatForScale<S>— witness that formatFcan encode scaleS.InfallibleFormatForScale<S>— witness that the round-trip is context-free.
Structs§
- Encoded
Time - A typed external encoding of a
Time<S>instant. - GPS
- GPS seconds since the GPS epoch on the TAI/GPS continuous axis.
- J2000s
- J2000 seconds on the source scale’s coordinate axis.
- JD
- Julian Day on the source scale’s coordinate axis.
- MJD
- Modified Julian Day on the source scale’s coordinate axis.
- Unix
- POSIX seconds on the UTC civil axis.
Traits§
- Format
ForScale - Witness that format
Fcan encode and decode instants on scaleS. - Infallible
Format ForScale - Witness that format
Fcan encode scaleSwithout aTimeContext. - Time
Format - Marker trait for an external time encoding such as JD or Unix time.
Type Aliases§
- GpsTime
EncodedTime<TAI, GPS>convenience alias.- J2000
Seconds EncodedTime<S, J2000s>convenience alias.- Julian
Date EncodedTime<S, JD>convenience alias.- Modified
Julian Date EncodedTime<S, MJD>convenience alias.- Unix
Time EncodedTime<UTC, Unix>convenience alias.