1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! Low-level astronomical calculations for coordinate transformations.
//!
//! `celestial-core` provides the mathematical building blocks for celestial mechanics:
//! rotation matrices, nutation/precession models, angle handling, and geodetic conversions.
//! It implements IAU 2000/2006 standards in pure Rust with no runtime FFI.
//!
//! # 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) |
//! | [`errors`] | [`AstroError`] and [`AstroResult`] |
//!
//! # Coordinate Transformation Pipeline
//!
//! GCRS → CIRS transformation (CIO-based):
//!
//! ```ignore
//! // 1. Compute precession-nutation-bias matrix
//! let fw = FukushimaWilliamsAngles::iau2006a(tt_centuries);
//! let nutation = NutationIAU2006A::new().compute(jd1, jd2)?;
//! let npb = fw.build_npb_matrix(nutation.delta_psi, nutation.delta_eps);
//!
//! // 2. Extract CIO quantities
//! let cio = CioSolution::calculate(&npb, tt_centuries)?;
//!
//! // 3. Build GCRS→CIRS matrix
//! let matrix = gcrs_to_cirs_matrix(cio.cip.x, cio.cip.y, cio.s);
//! ```
//!
//! # Re-exports
//!
//! Common types are re-exported at the crate root for convenience:
//!
//! ```
//! use celestial_core::{Angle, Vector3, RotationMatrix3, Location};
//! use celestial_core::{AstroError, AstroResult, MathErrorKind};
//! ```
//!
//! # Design Notes
//!
//! - **Two-part Julian Dates**: Functions accepting `(jd1, jd2)` preserve precision by
//! splitting the date. Typically `jd1 = 2451545.0` (J2000.0) and `jd2` is days from epoch.
//!
//! - **Radians internally**: All angular computations use radians. The [`Angle`] type
//! provides conversion methods for degrees/HMS/DMS display.
//!
//! - **No implicit state**: Models like [`NutationIAU2006A`](nutation::NutationIAU2006A)
//! are stateless calculators. Call `compute(jd1, jd2)` with any epoch.
pub use Angle;
pub use ;
pub use ;
pub use Location;
pub use ;