Third-body perturbations are gravitational effects caused by celestial bodies other than the primary (Earth). The most significant third bodies affecting Earth satellites are the Sun and Moon, but planetary perturbations can also be important for high-precision applications or long-term orbit evolution.
The third-body perturbation is not the direct gravitational attraction of the perturbing body on the satellite, but rather the differential acceleration - the difference between the gravitational pull on the satellite and on Earth's center.
For a satellite at position \(\mathbf{r}\) and a third body at position \(\mathbf{r}_b\):
Simplified analytical expressions provide approximate positions of the Sun and Moon based on time. These models are computationally efficient and suitable for many applications. They also don't require external data files.
For high-precision applications, Brahe supports using JPL's DE440s ephemerides, read directly from NAIF SPICE kernels by brahe's native SPK/PCK reader. See SPICE Kernels for kernel loading, generic NAIF-ID queries, and kernel-scoped queries.
The Development Ephemeris 440s (DE440s) provides high-precision positions of all major solar system bodies using numerical integration over the time span of 1849 to 2150. They provide meter-level accuracy or better for planetary positions, but require downloading and managing SPICE kernel data files. Brahe generally will download and cache these files automatically on first use.
For Mars, Jupiter, Saturn, Uranus, and Neptune, ThirdBody distinguishes the planetary-system barycenter variants (MarsBarycenter .. NeptuneBarycenter, NAIF IDs 4-8, carrying the system gravitational parameters GM_*_SYSTEM) from the planet-center variants (Mars .. Neptune, NAIF IDs 499-899, carrying the planet-only GM_* values). accel_third_body accepts both flavors: barycenter variants resolve from the DE kernel alone — the standard third-body formulation, and the same choice made by *_barycenter_*_spice in Ephemerides and by the accel_third_body_<planet>_spice convenience functions — while planet-center variants use the true body-center position, auto-loading the ~68 MB-1.1 GB satellite ephemeris kernel on first use. The barycenter/body-center position difference (up to a few hundred km for Jupiter and Saturn) is negligible relative to the differential third-body acceleration itself, so the barycenter variants remain the default choice in the built-in force models.