pub struct CioLocator { /* private fields */ }Expand description
Computes the CIO locator angle s for a given epoch.
The locator is model-dependent. Currently only IAU 2006A is implemented, which uses the IAU 2006 precession with IAU 2000A nutation.
§Example
use celestial_core::cio::CioLocator;
// Compute s for J2000.0 + 0.5 centuries (year ~2050)
let locator = CioLocator::iau2006a(0.5);
// X, Y from CIP coordinates (typically from precession-nutation matrix)
let x = 1.0e-7; // radians
let y = 2.0e-7; // radians
let s = locator.calculate(x, y).unwrap();
// s is in radians, typically on the order of 10^-8Implementations§
Source§impl CioLocator
impl CioLocator
Sourcepub fn iau2006a(tt_centuries: f64) -> Self
pub fn iau2006a(tt_centuries: f64) -> Self
Creates a CIO locator using the IAU 2006/2000A model.
§Parameters
tt_centuries- TT (Terrestrial Time) as Julian centuries from J2000.0. Computed as(JD_TT - 2451545.0) / celestial_core::constants::DAYS_PER_JULIAN_CENTURY.
Sourcepub fn calculate(&self, x: f64, y: f64) -> AstroResult<f64>
pub fn calculate(&self, x: f64, y: f64) -> AstroResult<f64>
Computes the CIO locator s given the CIP coordinates.
§Parameters
x- CIP X coordinate in radians (from NPB matrix element [2][0])y- CIP Y coordinate in radians (from NPB matrix element [2][1])
§Returns
The CIO locator s in radians.
§Errors
Returns an error if the epoch is more than 20 centuries from J2000.0, where the series expansion becomes unreliable.
Trait Implementations§
Source§impl Clone for CioLocator
impl Clone for CioLocator
Source§fn clone(&self) -> CioLocator
fn clone(&self) -> CioLocator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CioLocator
impl RefUnwindSafe for CioLocator
impl Send for CioLocator
impl Sync for CioLocator
impl Unpin for CioLocator
impl UnsafeUnpin for CioLocator
impl UnwindSafe for CioLocator
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