tempoch-core 0.3.0

Core astronomical time primitives for tempoch.
Documentation
  • Coverage
  • 96%
    48 out of 50 items documented3 out of 3 items with examples
  • Size
  • Source code size: 115.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 13.1 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 47s Average build duration of successful builds.
  • all releases: 47s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Siderust/tempoch
    2 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • VPRamon

Time Module

This module provides time-related types and abstractions for astronomical calculations.

Core types

  • [Time<S>] — generic instant parameterised by a [TimeScale] marker.
  • [TimeScale] — trait that defines a time scale (epoch offset + conversions).
  • [JulianDate] — type alias for Time<JD>.
  • [JulianEphemerisDay] — type alias for Time<JDE>.
  • [ModifiedJulianDate] — type alias for Time<MJD>.
  • [Period<S>] — a time interval parameterised by a [TimeScale] marker.
  • [Interval<T>] — a generic interval over any [TimeInstant].
  • [TimeInstant] — trait for points in time usable with [Interval].

Time scales

The following markers implement [TimeScale]:

Marker Scale
[JD] Julian Date
[JDE] Julian Ephemeris Day
[MJD] Modified Julian Date
[TDB] Barycentric Dynamical Time
[TT] Terrestrial Time
[TAI] International Atomic Time
[TCG] Geocentric Coordinate Time
[TCB] Barycentric Coordinate Time
[GPS] GPS Time
[UnixTime] Unix / POSIX time
[UT] Universal 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().