ThreeBodyGravity#
- class ThreeBodyGravity(state_vector: StateArray, pnt_masses: list, base_frame: Frame)#
Bases:
DynamicModelModels third-body gravitational perturbations from one or more point masses.
For each listed point mass, the acceleration follows the standard three-body formulation:
\[\mathbf{a}_{3b} = \mu_i \left( \frac{\mathbf{r}_{\mathrm{body} \to i}}{\|\mathbf{r}_{\mathrm{body} \to i}\|^3} - \frac{\mathbf{r}_{\mathrm{origin} \to i}}{\|\mathbf{r}_{\mathrm{origin} \to i}\|^3} \right)\]If a third body is propagated in the
StateArray(i.e., its position is a dynamic state), its position is taken fromcurrent_staterather than from SPICE, enabling full coupled propagation. Each \(\mu_i\) can also be estimated as a solve-for parameter; when the state vector contains a("gm", spice_id)entry for body \(i\), its value overrides the ephemeris default at each function evaluation.- Parameters:
state_vector (
StateArray) – State vector of the primary spacecraft, used to determine the propagation origin and to identify any propagated third bodies.pnt_masses (
listofstr) – Names of the point-mass bodies (matching keys inscarabaeus.Constants), e.g.["SUN", "MOON"].base_frame (
Frame) – Reference frame in which accelerations are returned.
- Raises:
ValueError – If the gravitational parameter units for any listed point mass are not in km³·s⁻².
See also
scarabaeus.PointMassGravitySingle-body Newtonian gravity.
scarabaeus.ForceModelTranslationAggregator that instantiates this model.
References
Vallado, D. A. Fundamentals of Astrodynamics and Applications, 4th Ed., Microcosm Press, 2013.
- Attributes:
origin_muGravitational parameter of the origin body in km³·s⁻².
origin_nameName of the propagation-origin celestial body.
pnt_massesOrdered list of point-mass body name strings (Constants keys).
ref_frameReference frame in which third-body accelerations are returned.
Methods
compute_acceleration(position, ...)Compute third-body gravitational acceleration.