astrodynx.prop.OrbDynx#
- class astrodynx.prop.OrbDynx(terms: ODETerm, args: PyTree[Any] = {'mu': 1.0}, event: Event = None)[source]#
Orbital dynamics configuration for Cowell’s method propagation.
This NamedTuple encapsulates the essential components needed for orbital propagation using Cowell’s method, including the differential equation terms, static arguments, and optional event detection.
- terms#
The differential equation terms defining the orbital dynamics. Typically an ODETerm containing the vector field function that computes accelerations from gravitational and perturbation forces.
- args#
Static arguments passed to the differential equation. Common arguments include gravitational parameter (mu), perturbation parameters (J2, R_eq), and event thresholds (rmin). Defaults to {“mu”: 1.0}.
- event#
Event detection configuration for terminating propagation early when specific conditions are met (e.g., ground impact, apogee passage).
Notes
This class is designed to work with the ODE solver. The terms should define the complete orbital dynamics including all relevant forces and perturbations.
The args parameter uses JAX’s PyTree structure, allowing for efficient compilation and automatic differentiation of the propagation process.
Examples
Basic two-body orbital dynamics:
>>> import jax.numpy as jnp >>> from astrodynx import diffeq >>> import astrodynx as adx >>> def vector_field(t, x, args): ... acc = adx.gravity.point_mass_grav(t, x, args) ... return jnp.concatenate([x[3:], acc]) >>> orbdyn = adx.prop.OrbDynx( ... terms=diffeq.ODETerm(vector_field), ... args={"mu": 1.0} ... )
With J2 perturbations and event detection:
>>> def perturbed_field(t, x, args): ... acc = adx.gravity.point_mass_grav(t, x, args) ... acc += adx.gravity.j2_acc(t, x, args) ... return jnp.concatenate([x[3:], acc]) >>> orbdyn = adx.prop.OrbDynx( ... terms=diffeq.ODETerm(perturbed_field), ... args={"mu": 1.0, "J2": 1e-3, "R_eq": 1.0, "rmin": 0.1}, ... event=diffeq.Event(adx.events.radius_islow) ... )