Welcome to Orime!
The Math of Divination
When you generate a natal chart, a library called Swiss Ephemeris calculates where every planet was at the exact moment of your birth.
It's accurate to 0.001 arcsecond — a precision that would be absurd for most purposes, and essential for this one.
What it is
Swiss Ephemeris was developed by Astrodienst in Zürich, first released in 1997. It's built on top of NASA's Jet Propulsion Laboratory planetary ephemeris — specifically the DE406 dataset, and newer versions use DE431.
That dataset was computed by numerically integrating the equations of motion for the solar system over millennia. Swiss Ephemeris wraps it into a library any software can call — it is the industry standard for serious astrology applications.
The pipeline
Julian Date
Convert birth date + time to a single precise number.
Chebyshev lookup
Evaluate the polynomial for this moment to get the raw planet position.
Corrections
Apply light-time delay, aberration, nutation, and precession.
Ecliptic longitude λ
Project onto the ecliptic plane — a value between 0° and 360°.
Sign + degree
Divide by 30° for the sign; the remainder is the degree. e.g. 13.4° Gemini.
Every planetary position calculation follows this sequence. You don't see it — it runs in under a millisecond — but each step is doing real astronomical work.
The Julian Date is the entry point. Without it, there's no way to specify a moment in time precisely enough for the rest of the pipeline to function.
The Chebyshev trick
The JPL ephemeris doesn't store a planet's position for every moment in time — that would require infinite storage. Instead, it stores Chebyshev polynomial coefficients for time intervals of a few days.
To find a planet's position at time t, you evaluate the polynomial for the interval that contains t:
Chebyshev polynomials are chosen because they minimize approximation error across an interval — they're the mathematically optimal choice for this kind of compact representation.
The result: a file that fits on a USB drive, covering the entire solar system from 5400 BCE to 5400 CE, accurate to a fraction of an arcsecond.
Light-time correction
Light from Mars takes between 3 and 22 minutes to reach Earth, depending on where Mars is in its orbit. The apparent position — where Mars looks in the sky — is where Mars was when it emitted that light, not where it is right now.
Swiss Ephemeris computes this iteratively: estimate the travel time, back-calculate the position, refine. The correction is small but matters for precision charts.
Ecliptic to zodiac
After corrections, Swiss Ephemeris outputs each planet's ecliptic longitude λ — a number from 0° to 360° measured along the ecliptic plane, starting from the vernal equinox (0° Aries).
Converting to a zodiac position is simple division:
const sign = Math.floor(longitude / 30); // 0=Aries, 1=Taurus, …, 11=Pisces
const degree = longitude % 30; // 0.0 – 29.9°
// Example: λ = 73.4°
// sign = floor(73.4 / 30) = 2 → Gemini
// degree = 73.4 % 30 = 13.4° → 13°24' GeminiIn this guide