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
//! Reference frames, frame tree, and Earth/Mars/Moon rotation models.
//!
//! Port of JEOD's `models/utils/ref_frames/` (the `RefFrame` tree that is the
//! backbone of every coordinate system in JEOD) and `models/environment/RNP/`
//! (precession, nutation, polar motion). The crate is pure Rust with zero
//! Bevy dependency.
//!
//! ## Frame tree
//!
//! - [`FrameTree`], [`FrameNode`], [`FrameId`] — an arena-based hierarchy
//! that mirrors JEOD's `RefFrame` parent/child links. Each node stores
//! state **relative to its parent** (translation, velocity, orientation,
//! angular velocity); relative states between arbitrary frames are
//! computed by walking to the common ancestor and composing/negating
//! states. The arena is a flat `Vec` with parallel `Option<FrameId>`
//! parent pointers, which keeps lookups cache-friendly and avoids the
//! pointer chasing of JEOD's intrusive linked lists.
//! - [`RefFrameState`], [`RefFrameStateTyped`], [`RefFrameTrans`],
//! [`RefFrameRot`], [`RefFrameKind`] — the per-node state structs
//! (re-exported from [`ref_frame_state`]). Quaternions are JEOD-convention
//! scalar-first, left-transformation, matching `astrodyn_math::JeodQuat`.
//!
//! ## Earth / Mars / Moon rotation
//!
//! - [`rotation_j2000`], [`precession_j2000`], [`nutation_j2000`],
//! [`data_nutation_j2000`] — Earth precession + IAU-1980 nutation series
//! (the `data_nutation_j2000` table is the 106-term series ported from
//! JEOD's `RNP_J2000` data files).
//! - [`rotation_mars`], [`rotation_moon`] — body-fixed rotation models for
//! the Mars and Moon target bodies used by JEOD verification sims.
//!
//! JEOD source: `models/utils/ref_frames/` and `models/environment/RNP/`.
//!
//! ## Example
//!
//! Build a minimal frame tree with one root inertial frame and a
//! planet-fixed child, then look up a frame's state:
//!
//! ```
//! use astrodyn_frames::{FrameTree, RefFrameKind, RefFrameState};
//!
//! let mut tree = FrameTree::new();
//! let root = tree.add_root("J2000".to_string(), RefFrameKind::Inertial);
//! let _ecef = tree.add_child(
//! root,
//! "ECEF".to_string(),
//! RefFrameKind::PlanetFixed,
//! RefFrameState::default(),
//! );
//!
//! // Both frames live in the arena.
//! assert_eq!(tree.len(), 2);
//! ```
pub use ;
pub use ;
pub use ;
pub use *;