Home / Work / Ephemeris Engine
CASE STUDY · SCIENTIFIC COMPUTING

Astronomy-grade,
real-time fast.

Astronomical position calculation at the accuracy demanded by observatories and precision instrumentation — not the approximations consumer applications use. The full VSOP87 series, implemented in Rust with SIMD acceleration and complete relativistic corrections.

Domain
Scientific computing
Theory
VSOP87 (heliocentric elliptic)
Models
IAU 2006 precession · IAU 2000B nutation
Accuracy
Sub-arcsecond vs JPL Horizons
Range
2000 BCE – 3000 CE
Performance
All 8 planets in <100µs
<1"
Positional accuracy (arcsec)
8
Planets computed simultaneously
<100µs
Full ephemeris computation
8–12×
SIMD speedup over scalar
/ 01
The Problem

Most open-source astronomical position libraries are either Python-based — too slow for real-time instrumentation — or use simplified models that accumulate errors of several arcminutes over long time spans.

Applications that genuinely require precision cannot tolerate that: telescope mount controllers, satellite tracking, calendar computation, navigation systems. An arcminute is the difference between a target in the field of view and a target that is not.

The challenge was implementing the full VSOP87 planetary theory with correct aberration, nutation, precession and relativistic light-time correction, while achieving throughput suitable for real-time or high-volume computation.

/ 02
The Approach

The full VSOP87 series was implemented in Rust — all eight planets from Mercury to Neptune, with separate L, B and R series for ecliptic longitude, latitude and radius vector. On top of that sit IAU 2006 precession, the IAU 2000B nutation model, and aberration correction using the full Newcomb series.

The inner summation loops are vectorised with portable SIMD intrinsics, evaluating multiple series terms simultaneously. Relativistic light-time iteration converges to the single-precision limit in under four passes for every solar system body.

The engine handles coordinate frame transforms — ecliptic to equatorial to horizontal — topocentric correction for any observer location, and Julian/Gregorian calendar conversion.

/ 03
The Hard Parts
  1. Numerical accuracy across five millennia Series like these degrade at the extremes of their validity range. Verifying sub-arcsecond agreement with JPL Horizons from 2000 BCE to 3000 CE meant testing the far ends, where most implementations quietly diverge.
  2. Vectorising a summation with data dependencies Naive SIMD on a trigonometric series produces wrong answers or no speedup. Restructuring the term evaluation so lanes stay independent is what delivers the 8–12× rather than a rounding-error improvement.
  3. Getting the correction chain in the right order Precession, nutation, aberration and light-time must be applied in a specific sequence in specific reference frames. Any transposition produces results that look plausible and are wrong by arcseconds — the hardest class of bug to notice.
  4. Verification against an external oracle Correctness is defined by agreement with JPL Horizons, not by internal consistency. Building that comparison into the test suite is what makes the accuracy claim meaningful rather than aspirational.
/ 04
The Outcome

Sub-arcsecond accuracy verified against JPL Horizons reference positions across a five-millennium span, with a full eight-planet ephemeris computing in under 100 microseconds on modern hardware.

The SIMD implementation delivers 8–12× throughput over the scalar equivalent, enabling workloads that need thousands of positions per second: trajectory planning, occultation prediction and real-time mount control.

The same kernel — compiled to WebAssembly — is what powers the Nimisha platform entirely inside the browser.

Stack Rust portable_simd VSOP87 IAU 2006 precession IAU 2000B nutation Relativistic corrections JPL Horizons verification Coordinate transforms Numerical analysis

Precision is a claim
you have to be able to prove.

WHEN APPROXIMATE ISN’T ENOUGH

Some problems have a correct answer.
Those are the ones we like.

Contact Us →