astrodynamics 0.14.0

Numerical astrodynamics engine for orbit propagation, force models, and flight-dynamics primitives
Documentation

astrodynamics

astrodynamics is a pure-Rust numerical astrodynamics library: orbit propagation, coordinate frames and time scales, SGP4/TLE, eclipse and pass geometry, and conjunction analysis, held to a bit-exact parity bar against pinned references.

Capabilities

  • Propagation: Cartesian inertial state, two-body and J2 gravity, fixed-step RK4 and adaptive Dormand-Prince 5(4) (DP54).
  • Frames and time: ITRS/GCRS transforms with precession, nutation, and GAST; TT/TAI/UT1 time scales backed by IERS/IAU data tables.
  • SGP4 and TLE: Vallado-parity SGP4 propagation and TLE parsing and formatting.
  • Geometry and events: satellite look angles, pass prediction, and eclipse/shadow geometry.
  • Conjunctions: close-approach screening, collision probability, and RTN-frame covariance.
  • I/O: CCSDS Conjunction Data Message (KVN and XML) and TLE.
  • Foundations: shared vector and linear-algebra kernels, named physical constants, and RF link-budget helpers.

Units and conventions

  • Position: kilometers
  • Velocity: kilometers per second
  • Time: seconds
  • State frame: inertial Cartesian state

The frame and datum are carried in the type system.

Example

use astrodynamics::forces::{CompositeForceModel, J2Gravity, TwoBodyGravity};
use astrodynamics::integrators::{DP54, Integrator};
use astrodynamics::propagator::{OrbitalDynamics, PropagationContext, api::IntegratorOptions};
use astrodynamics::CartesianState;

let initial = CartesianState::new(
    0.0,
    [7000.0, 0.0, 0.0],
    [0.0, 7.54605329, 0.0],
);

let mut forces = CompositeForceModel::new();
forces.add(Box::new(TwoBodyGravity::default()));
forces.add(Box::new(J2Gravity::default()));

let dynamics = OrbitalDynamics { force_model: &forces };
let integrator = DP54;
let ctx = PropagationContext::default();
let opts = IntegratorOptions {
    abs_tol: 1.0e-12,
    rel_tol: 1.0e-12,
    ..IntegratorOptions::default()
};

let result = integrator
    .propagate(initial, 3600.0, &dynamics, &ctx, &opts)
    .expect("propagation failed");

let final_state = result.final_state;
assert!(final_state.position_km.norm() > 6000.0);

Parity bar

The deterministic substrate (frames, time, propagation kernels, SGP4, geometry) is held to bit-exact (0 ULP) parity against pinned references, proven by committed hex-float golden vectors. 0 ULP is certified against a pinned target (OS/arch, libm, toolchain, FMA policy); other platforms run the same algorithms but need their own fixtures.

License

MIT