Third-body Sun and Moon #9

Closed
opened 2026-09-30 11:08:03 -04:00 by connor · 1 comment
Owner

Point-mass third-body perturbations from ANISE ephemerides.

M1.

Point-mass third-body perturbations from ANISE ephemerides. M1.
connor added this to the M1 milestone 2026-09-30 11:24:56 -04:00
connor added the size/S label 2026-09-30 11:24:56 -04:00
Author
Owner

Done. Dynamics::ThirdBody { body }, with the ephemeris coming from the almanac already in Context.

It is not point-mass gravity with a different body. The frame is centered on a body that is itself falling toward the third one, so what perturbs the orbit is the difference between the two attractions:

a = mu * [ (d - r) / |d - r|^3  -  d / |d|^3 ]

Keeping only the first term has the Sun pulling an Earth satellite at 5.9e-3 m/s^2 where the real perturbation is 2.8e-7 — larger by exactly the ratio of the distances, 21000 for the Sun and 55 for the Moon. Wrong in a way that looks like a plausible force rather than like a bug.

Written in Battin's rearranged form, because those two terms are nearly equal and nearly opposite and subtracting them as written discards log10(|d|/|r|) digits — four or five for the Sun seen from low Earth orbit:

a = -mu / |d - r|^3 * ( r + F(q) d ),   q = r . (r - 2d) / |d|^2
F(q) = q (3 + 3q + q^2) / (1 + (1 + q)^(3/2))

F is the series for 1 - (1 + q)^(-3/2) with the cancellation divided out.

Validation, eight tests:

  • The far field against the tidal closed forms, which come from outside the crate: 2 mu r / d^3 outward along the line to the body, mu r / d^3 inward across it. Those fix the magnitude, the sign and the factor of two. The tolerance is 3 r / d, because the tidal field is the first term of an expansion in r/d and the next one is 1.5 r/d of it — 2.7% for the Moon at this altitude, 7e-5 for the Sun.
  • Against the direct difference where that form still has its digits, a tenth to half the way to the body, agreeing to 1e-12. That is the check on the algebra.
  • A spacecraft at the central body feels nothing, which is what the indirect term means.
  • Sun and Moon move a one-day low Earth orbit by about 45 m. Much less than a naive a t^2 / 2 would suggest, because the tidal field turns with the orbit and mostly averages out.
  • The central body as a third body is refused before integrating, and the autodiff path matches central differences.

examples/full.rs now carries both, and reports that of 1026 km of departure from a point mass over a day, 40 m of it is the Sun and Moon.

Done. `Dynamics::ThirdBody { body }`, with the ephemeris coming from the almanac already in `Context`. **It is not point-mass gravity with a different body.** The frame is centered on a body that is itself falling toward the third one, so what perturbs the orbit is the difference between the two attractions: ``` a = mu * [ (d - r) / |d - r|^3 - d / |d|^3 ] ``` Keeping only the first term has the Sun pulling an Earth satellite at 5.9e-3 m/s^2 where the real perturbation is 2.8e-7 — larger by exactly the ratio of the distances, 21000 for the Sun and 55 for the Moon. Wrong in a way that looks like a plausible force rather than like a bug. **Written in Battin's rearranged form**, because those two terms are nearly equal and nearly opposite and subtracting them as written discards `log10(|d|/|r|)` digits — four or five for the Sun seen from low Earth orbit: ``` a = -mu / |d - r|^3 * ( r + F(q) d ), q = r . (r - 2d) / |d|^2 F(q) = q (3 + 3q + q^2) / (1 + (1 + q)^(3/2)) ``` `F` is the series for `1 - (1 + q)^(-3/2)` with the cancellation divided out. **Validation**, eight tests: - The far field against the tidal closed forms, which come from outside the crate: `2 mu r / d^3` outward along the line to the body, `mu r / d^3` inward across it. Those fix the magnitude, the sign and the factor of two. The tolerance is `3 r / d`, because the tidal field is the first term of an expansion in `r/d` and the next one is `1.5 r/d` of it — 2.7% for the Moon at this altitude, 7e-5 for the Sun. - Against the direct difference where that form still has its digits, a tenth to half the way to the body, agreeing to 1e-12. That is the check on the algebra. - A spacecraft at the central body feels nothing, which is what the indirect term means. - Sun and Moon move a one-day low Earth orbit by about 45 m. Much less than a naive `a t^2 / 2` would suggest, because the tidal field turns with the orbit and mostly averages out. - The central body as a third body is refused before integrating, and the autodiff path matches central differences. `examples/full.rs` now carries both, and reports that of 1026 km of departure from a point mass over a day, 40 m of it is the Sun and Moon.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: connor/astrokit#9