astroforge.force_models.F_third#
- astroforge.force_models.F_third(r_s, r_p, GM)[source]#
Compute the perturbing gravitational acceleration due to a third body.
Note
There is not a required set of units for this function, but the input units must be consistent. That is, if rs is in units of km, then rp must also be in units of km and GM must be in units of km3 / s2.
- Parameters:
r_s (NDArray[np.float64]) – Satellite position vector, should have shape (3, )
r_p (NDArray[np.float64]) – Perturbing body position vector, should have shape (3, )
GM (float) – Gravitational parameter of perturbing body
- Returns:
a_p – Perturbing gravitational acceleration due to the third body
- Return type:
NDArray[np.float64]
Examples
Compute the perturbing gravitational acceleration due to the Sun for a satellite in a GEO orbit around Earth:
>>> import astroforge as af >>> x = np.array([af.Rgeo, 0.0, 0.0]) array([42164.17236443, 0. , 0. ]) >>> rs = af.R_sun(51720.0) >>> rs array([-9.94416191e+06, 1.39217228e+08, 6.03580553e+07]) >>> GMsun = af.ss_GM["sun"] >>> af.force_models.F_third(x, rs, GMsun) array([-1.57084634e-09, -2.86422805e-10, -1.24179484e-10])