pub struct DeltaT;Expand description
Utilities for estimating ΔT (Delta T) values.
ΔT represents the difference between Terrestrial Time (TT) and Universal Time (UT1). These estimates are based on Espenak and Meeus polynomial fits updated in 2014.
Implementations§
Source§impl DeltaT
impl DeltaT
Sourcepub fn estimate(decimal_year: f64) -> Result<f64>
pub fn estimate(decimal_year: f64) -> Result<f64>
Estimates ΔT for a given decimal year.
Based on polynomial fits from Espenak & Meeus, updated 2014. See: https://www.eclipsewise.com/help/deltatpoly2014.html
§Arguments
decimal_year- Year with fractional part (e.g., 2024.5 for mid-2024)
§Returns
Estimated ΔT in seconds
§Errors
Returns error for years outside the valid range (-500 to 3000 CE)
§Example
let delta_t = DeltaT::estimate(2024.0).unwrap();
assert!(delta_t > 60.0 && delta_t < 80.0); // Reasonable range for 2024Auto Trait Implementations§
impl Freeze for DeltaT
impl RefUnwindSafe for DeltaT
impl Send for DeltaT
impl Sync for DeltaT
impl Unpin for DeltaT
impl UnwindSafe for DeltaT
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more