9. ThreeBodyGravity#
- class ThreeBodyGravity(state_vector: StateArray, pnt_masses: list, base_frame: Frame)#
Bases:
DynamicModelAttributes
origin_mu
origin_name
pnt_masses
ref_frame
Methods
compute_acceleration(position, ...)Compute third-body gravitational acceleration.
compute_partial_by_position(position, ...)Compute da_3b/dr for third-body gravity.
Compute d a_3b / d r_origin->pm for a specific third body (point mass).
- compute_acceleration(position: ndarray, current_state: dict, epoch: float, body: CelestialBody) ndarray#
Compute third-body gravitational acceleration.
If a third body is propagated in the state vector, its position is taken from
current_state; otherwise SPICE is used.
- compute_partial_by_position(position: ndarray, current_state: dict, epoch: float, body: CelestialBody) ndarray#
Compute da_3b/dr for third-body gravity.
Uses propagated third-body positions when available; otherwise SPICE.
- compute_partial_by_third_body_position(position: ndarray, current_state: dict, epoch: float, body: CelestialBody, point_mass_name: str) ndarray | None#
Compute d a_3b / d r_origin->pm for a specific third body (point mass).
Returns 3x3 if that point mass is propagated in the state. Returns None if not propagated (because then origin2pm comes from SPICE, not a solve-for).