astro.ThirdBodyGravity#

class hohmannpy.astro.ThirdBodyGravity(third_body_grav_param, third_body, central_body=None, dcm=None, legendre=True, legendre_series_length=10)#

Perturbation caused by a third body’s gravity. This third body can either orbit the central body or orbit another arbitrary fixed point.

Parameters:
  • third_body_grav_param (float) – Gravitational parameter of the third body.

  • third_body (Satellite) – The object which holds the orbit of the third body.

  • central_body (Satellite) – The object which holds the orbit of the central body. If this is not passed it will be assumed the third body orbits the central body. If this is used, the central body must orbit the same focus as the third body. A valid example would be if the central and third body were two of Jupiter’s moons as the focus would then be Jupiter. An invalid example would be if the central body was the Earth and the third body was one of Mars’ moons because the Earth’s focus is the Sun and the Mars’ moon’s focus is Mars.

  • dcm (np.ndarray) – If the central or third body’s orbit is not propagated in the same frame as that of the satellite the DCM needed to transform their positions to the same frame as the satellite must be provided. These can be generated using euler_2_dcm(). An example is if the third body is the Sun which “orbits” the Earth. The Sun’s propagated “orbit” (or more accurately the inverse of the Earth’s orbit about the Sun) will be in the heliocentric frame and so a DCM is needed to transform the Sun’s position into the Earth-centered inertial frame in which the satellite is propagated.

  • legendre (bool) – Whether to use a Legendre polynomial expansion in the computation of the third body’s perturbing effects. Used to avoid small difference numerical accuracy losses from the difference between the two position cubics due to their potential similarities.

  • legendre_series_length (int) – If a Legendre polynomial expansion is used, how many terms to include.

Variables:
  • third_body (Satellite) – The object which holds the orbit of the third body.

  • central_body (Satellite) – The object which holds the orbit of the central body.

  • tb_orbit_spline (scipy.BSpline) – Cubic spline of the third body’s trajectory. Calling it via tb_orbit_spline(time) returns the interpolated orbit at that time.

  • cb_orbit_spline (Union[scipy.BSpline, func]) – Cubic spline of the central body’s trajectory. Calling it via cb_orbit_spline(time) returns the interpolated orbit at that time.

Notes

The following assumptions are made for this implementation:

  1. The third (and potentially central) bodies follow Keplerian orbits.

evaluate(time, state, satellite)#

Computes the perturbing acceleration due to the third body.

Parameters:
  • time (float) – Current time in seconds since propagation began.

  • state (np.ndarray) – Current translational state in ECI coordinates given as (position, velocity).

  • satellite (Satellite) – Unused parameter simply based due to @abstractmethod requirements.

Returns:

acceleration (np.ndarray) – Current translational acceleration in ECI coordinates.