celestial-core
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.
Installation
[]
= "0.1"
Modules
| 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) |
Example
use NutationIAU2006A;
use J2000_JD;
// Compute nutation at J2000.0
let nutation = new.compute.unwrap;
println!; // radians to arcsec
println!;
Features
serde— Enables serialization forAngleand other types
Design Notes
- 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.
License
Licensed under either of:
- Apache License, Version 2.0
- MIT License
Contributing
See the repository for contribution guidelines.