Skip to main content

Module format

Module format 

Source
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

Structs§

EncodedTime
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§

FormatForScale
Witness that format F can encode and decode instants on scale S.
InfallibleFormatForScale
Witness that format F can encode scale S without a TimeContext.
TimeFormat
Marker trait for an external time encoding such as JD or Unix time.

Type Aliases§

GpsTime
EncodedTime<TAI, GPS> convenience alias.
J2000Seconds
EncodedTime<S, J2000s> convenience alias.
JulianDate
EncodedTime<S, JD> convenience alias.
ModifiedJulianDate
EncodedTime<S, MJD> convenience alias.
UnixTime
EncodedTime<UTC, Unix> convenience alias.