9. ThreeBodyGravity#
- class ThreeBodyGravity(state_vector: StateArray, pnt_masses: list, base_frame: Frame)#
Bases:
DynamicModel
Models the gravitational acceleration from multiple third-body sources in a three-body problem. This class computes the total perturbing acceleration due to external gravitational bodies (e.g., Sun, Moon) and its partial derivatives.
- Parameters:
state_vector (
StateArray
) –The state vector of the main spacecraft, containing:
All dynamic and static parameters considered in the simulation (e.g., position, velocity, estimated parameters).
The reference frame in which the state is defined.
The origin body relative to which the state is expressed.
The epoch corresponding to the state.
- pnt_masseslist
A list of third bodies (point masses) whose gravitational effects are considered.
- base_frameFrame
Frame of the propagator.
See also
scarabaeus.StateArray
Represents state vectors with origins and reference frames.
scarabaeus.SpiceManager
Retrieves ephemeris data for celestial bodies.
Notes
Assumes third bodies follow Keplerian motion and do not undergo additional perturbations.
Uses SPICE data for third-body positions relative to the main body.
The acceleration formulation follows the standard third-body perturbation model.
References
Vallado, D. A. (2013). Fundamentals of Astrodynamics and Applications, 4th Ed.
Attributes
The gravitational parameter of the origin body.
The name of the origin body in the system.
List of third-body masses affecting the system.
The reference frame associated with the three-body system.
Methods
compute_acceleration
(position, ...)Computes the acceleration due to third-body gravitational influences.
compute_partial_by_position
(position, ...)Computes the partial derivatives of the third-body accelerations with respect to position.
- compute_acceleration(position: ArrayWUnits, current_state: dict, epoch: float, body) ArrayWUnits #
Computes the acceleration due to third-body gravitational influences.
Iterates through a set of gravitational point masses (third bodies) and sums their contributions to the total acceleration experienced by the spacecraft.
- Parameters:
position (
ArrayWUnits
) – 3x1 position vector of the spacecraft in the reference frame. Expressed in units of kilometers.current_state (
dict
) – Dictionary containing the current state information.epoch (
float
) – Epoch at which the transformation is performed.body (
CelestialBody
) – The celestial body for which third-body accelerations are computed.
- Returns:
acc_vec – The 3x1 total acceleration vector due to third-body gravitational effects. Expressed in units of \(\frac{km}{s^2}\).
- Return type:
- compute_partial_by_position(position: ArrayWUnits, current_state: dict, epoch, body) array #
Computes the partial derivatives of the third-body accelerations with respect to position.
Determines how the acceleration due to third-body gravity changes with respect to variations in the spacecraft’s position.
- Parameters:
position (
ArrayWUnits
) – 3x1 position vector of the spacecraft in the reference frame. Expressed in units of kilometers.current_state (
dict
) – Dictionary containing the current state information.epoch (
float
) – Epoch at which the transformation is performed.body (
CelestialBody
) – The celestial body for which third-body accelerations are computed.
- Returns:
jacobian – The 3x3 Jacobian matrix of third-body acceleration with respect to position. Expressed in units of \(\frac{1}{s^2}\).
- Return type:
- property origin_mu: ArrayWUnits#
The gravitational parameter of the origin body.