Skip to content

default_third_bodies

Defined in: setup.rs:93

fn default_third_bodies(body: &arika::body::KnownBody) -> [Result<[Vec<ThirdBodyGravity>](https://doc.rust-lang.org/std/vec/struct.Vec.html), arika::sun::SunPositionError>](https://doc.rust-lang.org/std/result/enum.Result.html)

Return the default third-body perturbations for a given central body.

  • Earth: Sun + Moon
  • Moon: Sun + Earth
  • Sun: none — it is not a third body to its own orbiters
  • Other bodies with an ephemeris: Sun

The Sun’s position is taken relative to the central body. This used to be the geocentric vector for every body, which from Mars in 2026 points up to 176° away from the true direction and scales the tidal term by up to 3.8x.

Fails for a central body with no Sun ephemeris (Uranus, Neptune) rather than returning a set built on a substituted vector.