astrodynamics
astrodynamics is a pure Rust numerical astrodynamics library for orbit
propagation, force models, and future flight-dynamics tooling.
The current crate focuses on a clean propagation foundation:
- Cartesian inertial state representation
- Two-body gravity
- J2 perturbation
- Fixed-step RK4
- Adaptive Dormand-Prince 5(4) (
DP54) - Oracle tests for Kepler invariants and J2 secular RAAN drift
This is a deliberately scoped 0.5.0. It is a propagation core, not yet a
complete flight-dynamics platform. Dense output, event detection, richer
contexts, estimation, maneuvers, and higher-fidelity force models are planned
future work.
Units and conventions
- Position: kilometers
- Velocity: kilometers per second
- Time: seconds
- State frame: inertial Cartesian state
Example
use ;
use ;
use ;
use CartesianState;
let initial = new;
let mut forces = new;
forces.add;
forces.add;
let dynamics = OrbitalDynamics ;
let integrator = DP54;
let ctx = default;
let opts = IntegratorOptions ;
let result = integrator
.propagate
.expect;
let final_state = result.final_state;
assert!;
Validation
The current test suite includes:
- circular-orbit full-period return checks
- elliptic-orbit energy and angular-momentum invariants
- analytical J2 secular RAAN drift comparison
Status
This crate is currently a focused propagation foundation, not yet a complete mission-analysis suite. It provides inertial Cartesian state propagation with RK4 and adaptive Dormand-Prince 5(4), plus two-body and J2 force models, with additional flight-dynamics capabilities planned over time.
License
MIT