precession.dev

About precession.dev

An interactive simulator of Earth’s precession, nutation, and stellar aberration, built from first-principles Newtonian dynamics. It answers one question: setting aside a star’s own motion through space, why does its apparent position drift at all?

Three effects layer together, and the sim pulls them apart. Aberration is about the light: Earth’s orbital velocity makes starlight arrive at a slight slant, so a star looks nudged toward our direction of travel. Precession and nutation are not the star, or even its light. They are us: Earth’s rotation axis slowly wobbles, and the coordinates we pin every star to wobble with it. Precession is the slow, steady swing, one turn every 26,000 years; nutation is the smaller periodic nod riding on top, driven mainly by the Moon over 18.6 years.

It runs entirely in your browser via WebAssembly compiled from a Rust crate. No server, no API calls; switch stars and nothing leaves your machine.

How the physics works

Orbital dynamics

Sun, Earth, and Moon are integrated as three point-mass bodies with pairwise Newtonian gravity. The integrator is IAS15 (Rein & Spiegel, 2015), a 15th-order Gauss-Radau method that conserves energy to roughly over 20 years at default step sizes. Earth’s state is reported in the SSB-ICRF frame.

Earth’s rotation

The Earth’s attitude is a separate rigid-body problem on , with state . The integrator is an RK-MK4 Lie-group step that advances the quaternion by

Keeping the advance in the Lie algebra lets the rotation matrix stay orthonormal to machine precision without renormalization.

Coupling through the MacCullagh torque

Precession and nutation arise because Earth is not a perfect sphere. The dominant non-spherical moment is , which couples to the Sun and Moon through the MacCullagh torque:

where and are Earth’s polar and equatorial moments of inertia, is the rotation-axis direction, is the direction to the perturber (Sun or Moon), and is the distance. The torque changes , which rotates , which changes the torque on the next step. Over millennia this is the 26,000-year lunisolar precession. On top of that the Moon’s nodes regress every 18.6 years, which shows up as the dominant nutation term.

Turning off sets to zero and the torque vanishes, which is why the “Spherical Earth” option produces no precession or nutation at all. The Sun-only and Moon-only options keep on but zero out the chosen perturber’s contribution.

Stellar aberration

A star’s apparent direction shifts toward the direction of the observer’s velocity. To first order,

where is the true direction to the star and is the observer’s velocity in the inertial frame. The maximum magnitude is the aberration constant , reached when is perpendicular to . Over a year Earth’s velocity traces a circle, and the apparent position of the star traces an ellipse whose shape depends on the star’s ecliptic latitude : a circle at the pole, a line segment at the ecliptic, something in between elsewhere.

What each tab shows

  • Aberration only.Apparent shift from Earth’s orbital velocity, holding the rotation axis fixed at J2000.
  • Precession + nutation. Drift of the rotation axis in time, holding the star direction fixed (no aberration).
  • Precession only. The linear secular component of the axis drift. Over decades, the lunisolar precession is close to a straight line in the tangent plane; this is that line.
  • Nutation only.Precession + nutation with the linear trend subtracted. What’s left is the periodic part: the 18.6-year lunar nodal term, plus 0.5-year and 13.66-day harmonics.
  • Combined. All three effects overlaid on the J2000 tangent plane at the star.
  • Time series. The full apparent offset in each tangent-plane coordinate versus time, with the linear precession trend drawn alongside it.

The other views

  • Nutation power spectrum. An FFT of the Newton-integrated pole motion over a 200-year window, with the linear precession trend removed. The 18.6-year lunar-nodal term, the 0.5-year solar term, and the 13.66-day lunar term emerge directly from the dynamics; dotted lines mark the canonical IAU 1980 nutation frequencies for reference.
  • Precession theater.A 3D view of Earth’s spin axis sweeping its 23.4° cone around the ecliptic pole, tracing the 26,000-year precession circle past the pole stars.

Initial conditions

Initial (position, velocity) for the Sun, Earth, and Moon come from the JPL DE440s ephemeris, loaded through the anise crate at build time and baked into the WASM binary. The app integrates from J2000; the crate also bakes in DE440s states for J2010 through J2050. DE440s agrees with the older DE405 to sub-mas at J2000, so comparisons against data processed with either kernel overlap at the arcsecond scale these plots work in.

What’s not included

  • Diurnal aberration from Earth’s rotation (under 0.3″ anywhere).
  • Stellar parallax (stars are treated as at infinity).
  • Atmospheric refraction and any other topocentric effects.
  • Proper motion of the stars themselves.
  • Gravitational light deflection by the Sun.
  • Higher Earth zonal harmonics beyond .
  • Relativistic corrections.

None of these affect the qualitative decomposition on display. Including them would bring the model up to the current IAU precision standard, but the aim of the sim is to show the physics of the dominant effects, not to replicate a production-grade almanac.

Validation

The underlying Rust crate is unit-tested against known analytic results. Highlights:

  • Total energy of the Sun/Earth/Moon system conserved to over 1 year.
  • Angular momentum conserved to over 1 year.
  • Secular precession rate within 0.7% of the IAU 2006 lunisolar value over 37.2 years (two full 18.6-year nutation cycles, so the fit isn’t biased).
  • FFT of the nutation signal shows peaks at 18.6 y, 0.5 y, and 13.66 d, matching the dominant lunisolar frequencies.
  • Rigid-body gyroscopic precession under a constant external torque matches the analytic rate to 1%.

Implementation

The simulator is a Rust crate compiled to WebAssembly via wasm-bindgen. The browser side is Next.js 16 with React 19, Tailwind 4, shadcn/ui for controls, and Plotly (WebGL scattergl) for the charts. The WASM module runs inside a dedicated Web Worker, so a 20 or 50-year sim doesn’t freeze the UI.

References

  • Murray, C. D. & Dermott, S. F. (1999). Solar System Dynamics. Cambridge University Press.
  • Moritz, H. & Mueller, I. (1987). Earth Rotation: Theory and Observation. Ungar.
  • Vallado, D. A. (2013). Fundamentals of Astrodynamics and Applications (4th ed.). Microcosm Press.
  • Rein, H. & Spiegel, D. S. (2015). IAS15: a fast, adaptive, high-order integrator for gravitational dynamics, accurate to machine precision over a billion orbits. MNRAS 446, 1424.
  • Kaplan, G. H. (2005). The IAU Resolutions on Astronomical Reference Systems, Time Scales, and Earth Rotation Models. USNO Circular 179.