Skip to main content

NutationIAU2000B

Struct NutationIAU2000B 

Source
pub struct NutationIAU2000B;
Expand description

IAU 2000B nutation calculator.

A simplified nutation model using 77 lunisolar terms plus fixed planetary bias corrections. Provides ~1 mas accuracy, suitable for applications not requiring the full precision of NutationIAU2000A.

§Example

use celestial_core::nutation::NutationIAU2000B;

let nut = NutationIAU2000B::new();
// Compute nutation for J2000.0 (two-part JD: 2451545.0 + 0.0)
let result = nut.compute(2451545.0, 0.0).unwrap();

// delta_psi and delta_eps are in radians
println!("Δψ = {} rad", result.delta_psi);
println!("Δε = {} rad", result.delta_eps);

Implementations§

Source§

impl NutationIAU2000B

Source

pub fn new() -> Self

Creates a new IAU 2000B nutation calculator.

Source

pub fn compute(&self, jd1: f64, jd2: f64) -> AstroResult<NutationResult>

Computes nutation angles for a given Julian Date.

§Arguments
  • jd1 - First part of two-part Julian Date (TDB). Typically the integer part or J2000 epoch (2451545.0).
  • jd2 - Second part of two-part Julian Date (TDB). Typically the fractional part or offset from jd1.

The two-part representation preserves precision. The split is arbitrary; jd1 + jd2 must equal the desired Julian Date.

§Returns

Returns a NutationResult containing:

  • delta_psi: Nutation in longitude (radians)
  • delta_eps: Nutation in obliquity (radians)

Both values are IAU 2000B approximations with ~1 mas accuracy.

Trait Implementations§

Source§

impl Default for NutationIAU2000B

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.