Skip to main content

Crate tempoch

Crate tempoch 

Source
Expand description

Time Module

This crate is a façade over tempoch-core and re-exports its public API.

§Core types

§Time scales

The following markers implement TimeScale:

MarkerScale
JDJulian Date
JDEJulian Ephemeris Day
MJDModified Julian Date
TDBBarycentric Dynamical Time
TTTerrestrial Time
TAIInternational Atomic Time
TCGGeocentric Coordinate Time
TCBBarycentric Coordinate Time
GPSGPS Time
UnixTimeUnix / POSIX time
UTUniversal Time (Earth rotation)

§ΔT (Delta T)

The difference ΔT = TT − UT is applied automatically by the UT time scale. Use Time::<UT>::new(jd_ut) for UT-based values, or construct any scale via from_utc() which routes through UT internally. The raw ΔT value (in seconds) is available via Time::<UT>::delta_t().

Structs§

GPS
GPS Time — continuous day count since 1980-01-06T00:00:00 UTC.
Interval
Represents an interval between two instants.
JD
Julian Date — the identity scale.
JDE
Julian Ephemeris Day — dynamic Julian day used by ephemerides.
MJD
Modified Julian Date — JD minus 2 400 000.5.
NonFiniteTimeError
Error returned when a Time value is non-finite (NaN or ±∞).
TAI
International Atomic Time.
TCB
Barycentric Coordinate Time — the coordinate time for the BCRS.
TCG
Geocentric Coordinate Time — the coordinate time for the GCRS.
TDB
Barycentric Dynamical Time.
TT
Terrestrial Time — the basis for astronomical ephemerides.
Time
A point on time scale S.
UT
Universal Time — the civil time scale tied to Earth’s rotation.
UnixTime
Unix Time — seconds since 1970-01-01T00:00:00 UTC, stored as days.

Enums§

ConversionError
Error returned when a period time-scale conversion fails.
InvalidIntervalError
Error returned when constructing an Interval with invalid bounds.
PeriodListError
Error indicating a period list violates sorted/non-overlapping invariants.

Traits§

TimeInstant
Trait for types that represent a point in time.
TimeScale
Marker trait for time scales.

Functions§

complement_within
Returns the gaps (complement) of periods within the bounding outer period.
intersect_periods
Returns the intersection of two sorted, non-overlapping period lists.
normalize_periods
Sort periods by start time and merge overlapping/adjacent intervals.
tai_minus_utc
Look up cumulative TAI−UTC (leap seconds) for a JD on the UTC axis.
validate_period_list
Validate that a period list is sorted by start time and non-overlapping.

Type Aliases§

JulianDate
Julian Date — continuous count of days since the Julian Period.
JulianEphemerisDay
Julian Ephemeris Day — dynamical Julian day used by many ephemeris formulas.
ModifiedJulianDate
Modified Julian Date — JD − 2 400 000.5.
Period
Time-scale period alias.
UniversalTime
Universal Time — Earth-rotation civil time scale.
UtcPeriod
UTC interval alias.