tempoch
Typed astronomical time primitives for Rust.
tempoch provides:
- Generic
Time<S>instants parameterized by time-scale markers (JD,MJD,TT,UT,TAI,GPS,UnixTime, ...). - Built-in UTC conversion through
chrono. - Automatic
ΔT = TT - UThandling for theUTscale. - Generic intervals with
Interval<T>and scale-aware aliasPeriod<S>. - Utility operations like period intersection and complement.
Installation
[]
= "0.1"
Quick Start
use Utc;
use ;
let now_jd = from_utc;
let now_mjd: = now_jd.;
println!;
println!;
Period Operations
use ;
let outer = new;
let a = vec!;
let b = vec!;
let overlap = intersect_periods;
let gaps = complement_within;
assert_eq!;
assert_eq!;
Examples
cargo run --example quickstartcargo run --example periods
Tests and Coverage
Coverage is gated in CI at >= 90% line coverage.
License
AGPL-3.0-only