Expand description
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’sRefFrameparent/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 flatVecwith parallelOption<FrameId>parent pointers, which keeps lookups cache-friendly and avoids the pointer chasing of JEOD’s intrusive linked lists.RefFrameState,RefFrameStateTyped,RefFrameTrans,RefFrameRot— the per-node state structs (re-exported fromref_frame_state). Quaternions are JEOD-convention scalar-first, left-transformation, matchingastrodyn_math::JeodQuat. Every node carries a required runtime identity (astrodyn_quantities::frame_descriptor::FrameUid) whoseFrameClassis the runtime taxonomy (issue #664 removed the legacy 3-variantRefFrameKind).
§Earth / Mars / Moon rotation
rotation_j2000,precession_j2000,nutation_j2000,data_nutation_j2000— Earth precession + IAU-1980 nutation series (thedata_nutation_j2000table is the 106-term series ported from JEOD’sRNP_J2000data 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 — every node carries a minted identity:
use astrodyn_frames::{FrameTree, RefFrameState};
use astrodyn_quantities::frame::{Ecef, RootInertial};
use astrodyn_quantities::frame_descriptor::FrameUid;
let mut tree = FrameTree::new();
let root = tree.add_root_typed::<RootInertial>("J2000".to_string());
let _ecef = tree.add_child_uid(
root,
FrameUid::of::<Ecef>(),
"ECEF".to_string(),
RefFrameState::default(),
None,
);
// Both frames live in the arena, addressable by identity.
assert_eq!(tree.len(), 2);
assert_eq!(tree.find(&FrameUid::of::<Ecef>()), Some(_ecef));Re-exports§
pub use frame_storage::common_ancestor;pub use frame_storage::compose_to_ancestor;pub use frame_storage::compute_relative_state;pub use frame_storage::FrameStorage;pub use frame_tree::FrameId;pub use frame_tree::FrameNode;pub use frame_tree::FrameTree;pub use frame_tree::FrameTreeError;pub use orchestration::compute_relative_state_typed;pub use orchestration::frame_origin;pub use orchestration::frame_origin_typed;pub use orchestration::sync_pfix_rotation;pub use ref_frame_state::*;
Modules§
- data_
nutation_ j2000 - IAU 1980 nutation coefficient tables for J2000.
- frame_
storage - Storage-agnostic frame-tree algorithms (Frame-Tree-ECS-Native § 7).
- frame_
tree - Arena-based frame tree: a faithful port of JEOD’s RefFrame hierarchy.
- nutation_
j2000 - J2000 Nutation matrix and equation of equinoxes computation.
- orchestration
- Frame-tree orchestration helpers.
- precession_
j2000 - J2000 Precession matrix computation.
- ref_
frame_ state - Per-node frame state — the untyped storage form used by the
crate::FrameTreearena and the typed siblingRefFrameStateTyped<P, C>used at the public API boundary. - rotation_
j2000 - J2000 GAST rotation and full RNP composition.
- rotation_
mars - Mars rotation model (IAU Pathfinder orientation).
- rotation_
moon - Moon rotation model (IAU 2009 simplified).