pub struct TCB(/* private fields */);Expand description
Barycentric Coordinate Time.
Wraps a Julian Date interpreted in the TCB time scale. TCB is the proper time for a clock at the solar system barycenter, far from gravitational sources.
Implementations§
Source§impl TCB
impl TCB
Sourcepub fn new(seconds: i64, nanos: u32) -> Self
pub fn new(seconds: i64, nanos: u32) -> Self
Creates TCB from Unix timestamp components.
Interprets the given seconds and nanoseconds as elapsed since Unix epoch (1970-01-01T00:00:00) in the TCB scale.
Sourcepub fn from_julian_date(jd: JulianDate) -> Self
pub fn from_julian_date(jd: JulianDate) -> Self
Creates TCB 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
Returns a new TCB advanced by the given seconds.
Trait Implementations§
Source§impl From<JulianDate> for TCB
impl From<JulianDate> for TCB
Source§fn from(jd: JulianDate) -> Self
fn from(jd: JulianDate) -> Self
Converts a Julian Date to TCB.
Source§impl TcbToTdb for TCB
impl TcbToTdb for TCB
Source§fn tcb_to_tdb(&self) -> TimeResult<TDB>
fn tcb_to_tdb(&self) -> TimeResult<TDB>
Convert TCB to TDB by removing the L_B rate correction.
The correction is computed as: L_B * (TCB - T0) where T0 is the 1977 epoch.
The TDB_0 offset is added to align with TT at the geocenter.
Applies the correction to the smaller-magnitude JD component for precision.
Source§impl ToTCB for TCB
impl ToTCB for TCB
Source§fn to_tcb(&self) -> TimeResult<TCB>
fn to_tcb(&self) -> TimeResult<TCB>
Identity conversion. Returns self unchanged.
Source§impl ToTCGFromTCB for TCB
impl ToTCGFromTCB for TCB
Source§fn to_tcg(&self) -> TimeResult<TCG>
fn to_tcg(&self) -> TimeResult<TCG>
Convert TCB to TCG by removing the L_B rate correction.
Computes: TCG = TCB - L_B * (JD_TCB - T0)
The correction is subtracted because TCB runs faster than TCG. At J2000.0, this removes about 11.25 seconds.
Applies the correction to the smaller-magnitude JD component for precision.