Skip to main content

Crate tempoch

Crate tempoch 

Source
Expand description

Public façade over tempoch-core.

The crate root exposes the redesigned scale-only time model:

  • Time<S> for typed instants on a given scale
  • Scale markers such as TT, TAI, UTC, and UT1
  • unified conversion targets via time.to::<Target>(), try_to, and to_with
  • constats for typed epoch and offset constants

Modules§

constats
Typed epoch and offset constants.
eop
Daily IERS Earth Orientation Parameters from the compiled finals2000A.all series.
scalar
Scalar-value adapter for time scale dispatch.

Structs§

EncodedTime
A typed external representation of a Time<S> instant.
GPS
GPS seconds since the GPS epoch on the TAI/GPS continuous axis.
Interval
Half-open time interval [start, end).
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.
TAI
International Atomic Time. Continuous SI-second clock.
TCB
Barycentric Coordinate Time (IAU 2006 B3). Linear relation to TDB.
TCG
Geocentric Coordinate Time (IAU 2000 B1.9). Linear rate difference to TT.
TDB
Barycentric Dynamical Time.
TT
Terrestrial Time. The dynamical reference scale in this crate.
Time
A point in time on scale S.
TimeContext
Explicit, immutable context for conversions that need one.
UT1
Universal Time 1 — Earth-rotation time axis.
UTC
Coordinated Universal Time.
Unix
POSIX seconds on the UTC civil axis.

Enums§

ConversionError
Conversion error surface.
InvalidIntervalError
Error constructing an Interval with invalid bounds.
PeriodListError
Invariants on a period list.
ScaleKind
Identifies a time scale or scalar encoding for dispatch.
TimeDataError
Error surface for runtime time-data operations.

Constants§

DELTA_T_PREDICTION_HORIZON_MJD
MJD of the last compiled ΔT prediction point.
EOP_END_MJD
EOP_OBSERVED_END_MJD
EOP_START_MJD
GPS_EPOCH_JD_TAI
GPS epoch expressed as a Julian Day on the TAI axis.
GPS_EPOCH_JD_UTC
GPS epoch as a Julian Day on the UTC axis: 1980-01-06T00:00:00 UTC.
GPS_EPOCH_TAI_MINUS_UTC
Exact TAI - UTC offset at the GPS epoch.
J2000_TT
J2000.0 epoch as a TT-scale Julian Date (JD(TT) = 2 451 545.0).
JULIAN_YEAR_DAYS
Length of a Julian year in days (exactly 365.25 d).
MODERN_DELTA_T_OBSERVED_END_MJD
UTC_DEFINED_FROM_MJD
First MJD covered by the compiled UTC-TAI segment table.

Traits§

ContextConversionTarget
Unified context-backed conversion target for Time<S>::to_with::<T>(&ctx).
ContinuousScale
Witness that a scale is both coordinate-bearing and physically continuous.
ConversionTarget
Unified conversion target for Time<S>::try_to::<T>().
CoordinateScale
Witness that a scale is continuous and supports direct arithmetic. UTC deliberately does not implement this: it has raw-axis accessors through CoordinateScale, but its civil interpretation remains leap-second-aware and table-driven.
InfallibleConversionTarget
Unified infallible conversion target for Time<S>::to::<T>().
InfallibleRepresentationForScale
Representation witness for scale S with context-free round-trips.
RepresentationForScale
Representation witness for scale S.
Scale
Marker trait for a scientifically distinct time scale.
TimeInstant
Provides arithmetic on Time<S> values via seconds duration.
TimeRepresentation
Marker trait for external time encodings such as JD or Unix time.

Functions§

complement_within
Gaps inside outer that are not covered by any interval in periods.
delta_t_seconds
ΔT = TT − UT1, in seconds, for a Julian Day on the UT1 axis.
delta_t_seconds_extrapolated
ΔT = TT − UT1, in seconds, with quadratic tail-fit extrapolation beyond the last published prediction point.
scalar_add_days
Add a day-valued duration to a scalar in the given scale.
scalar_difference_in_days
Compute the difference between two scalar values in the same scale, in days.
time_tt_from_scalar
Convert a scalar in the given scale to Time<TT>.
time_tt_to_scalar
Convert a Time<TT> value to a scalar in the given scale.

Type Aliases§

GpsTime
EncodedTime<TAI, GPS> convenience alias.
InvalidPeriodError
Backward-compatible alias for period construction validation errors.
J2000Seconds
EncodedTime<S, J2000s> convenience alias.
JulianDate
EncodedTime<S, JD> convenience alias.
ModifiedJulianDate
EncodedTime<S, MJD> convenience alias.
Period
Typed time period on a given scale.
UnixTime
EncodedTime<UTC, Unix> convenience alias.