Low-level astronomical calculations for coordinate transformations.
Pure Rust implementation of IAU 2000/2006 standards for celestial mechanics: rotation matrices, nutation/precession models, angle handling, and geodetic conversions. No runtime FFI.
[dependencies]
celestial-core = "0.1"| Module | Purpose |
|---|---|
angle |
Angle types, parsing (HMS/DMS), normalization, validation |
matrix |
3×3 rotation matrices and 3D vectors |
nutation |
IAU 2000A/2000B/2006A nutation models |
precession |
IAU 2000/2006 precession (Fukushima-Williams angles) |
cio |
CIO-based GCRS↔CIRS transformations |
obliquity |
Mean obliquity of the ecliptic (IAU 1980, 2006) |
location |
Observer geodetic coordinates, geocentric conversion |
constants |
Astronomical constants (J2000, WGS84, unit conversions) |
use celestial_core::nutation::NutationIAU2006A;
use celestial_core::constants::J2000_JD;
// Compute nutation at J2000.0
let nutation = NutationIAU2006A::new().compute(J2000_JD, 0.0).unwrap();
println!("Δψ = {:.6}″", nutation.delta_psi * 206264.806); // radians to arcsec
println!("Δε = {:.6}″", nutation.delta_eps * 206264.806);serde— Enables serialization forAngleand other types
- Two-part Julian Dates: Functions accept
(jd1, jd2)to preserve precision. Typicallyjd1 = 2451545.0(J2000.0) andjd2is days from epoch. - Radians internally: All angular computations use radians. The
Angletype provides conversion methods for degrees/HMS/DMS display. - Stateless models: Nutation and precession calculators have no internal state. Call
compute(jd1, jd2)with any epoch.
Licensed under either of:
- Apache License, Version 2.0
- MIT License
See the repository for contribution guidelines.