pub struct TDB(/* private fields */);Expand description
Barycentric Dynamical Time.
A time scale for solar system barycentric ephemerides. Wraps a split Julian Date for high-precision arithmetic. TDB tracks TT to within ~2 ms over centuries.
Implementations§
Source§impl TDB
impl TDB
Sourcepub fn new(seconds: i64, nanos: u32) -> Self
pub fn new(seconds: i64, nanos: u32) -> Self
Creates TDB from Unix timestamp components.
Converts seconds and nanoseconds since 1970-01-01 to TDB Julian Date.
Sourcepub fn from_julian_date(jd: JulianDate) -> Self
pub fn from_julian_date(jd: JulianDate) -> Self
Creates TDB from a Julian Date.
Sourcepub fn to_julian_date(&self) -> JulianDate
pub fn to_julian_date(&self) -> JulianDate
Returns the underlying Julian Date.
Sourcepub fn add_seconds(&self, seconds: f64) -> Self
pub fn add_seconds(&self, seconds: f64) -> Self
Adds seconds to this TDB instant, returning a new TDB.
Trait Implementations§
Source§impl From<JulianDate> for TDB
Conversion from JulianDate. No transformation applied.
impl From<JulianDate> for TDB
Conversion from JulianDate. No transformation applied.
Source§fn from(jd: JulianDate) -> Self
fn from(jd: JulianDate) -> Self
Source§impl FromStr for TDB
Parses ISO 8601 string as TDB.
impl FromStr for TDB
Parses ISO 8601 string as TDB.
The string is interpreted directly as TDB without any scale conversion.
Source§impl TdbToTcb for TDB
impl TdbToTcb for TDB
Source§fn tdb_to_tcb(&self) -> TimeResult<TCB>
fn tdb_to_tcb(&self) -> TimeResult<TCB>
Convert TDB to TCB by applying the inverse L_B rate correction.
Uses the rate ratio L_B / (1 - L_B) to properly invert the scaling.
First removes the TDB_0 offset, then applies the inverse rate correction.
Applies the correction to the smaller-magnitude JD component for precision.