Function lupnt::AccelerationPointMass¶
Defined in File forces.h
Function Documentation¶
-
Vec3 lupnt::AccelerationPointMass(const Vec3 &r, const Vec3 &s, Real GM)¶
Compute the third-body (point-mass) gravitational acceleration on a spacecraft, including the indirect (central-body recoil) term.
Called by
NumericalOrbitDynamics::CalcContribfor each perturbing body that does NOT use a spherical-harmonic gravity field (body.use_gravity_field / == false), e.g. the Sun, Moon, or outer planets perturbing an Earth- or Moon-centered orbit. Implementsa = -GM * (d/|d|^3 + s/|s|^3)whered = r / - s, i.e. the direct attraction on the spacecraft minus the central body’s own acceleration toward the same point mass.- Parameters:
r – Spacecraft position relative to the central body [m]
s – Perturbing point-mass position relative to the central body [m]
GM – Gravitational parameter of the perturbing point mass [m^3/s^2]
- Returns:
Perturbing acceleration on the spacecraft [m/s^2]