astroceleste-engine

Pure Rust · NASA JPL ephemerides · Python & WebAssembly

The same chart,
on every platform.

astroceleste-engine computes complete astrological charts from JPL ephemerides. One core runs on the server, in desktop and mobile apps and in the browser, and every number matches its reference implementation to within 10−9.

  • Rustcargo add astroceleste-engine
  • Pythonpip install astroceleste-engine
  • JSnpm install astroceleste-engine

Experimental (0.0.x): the API may change in any release. Pin an exact version.

Live demo

This page runs the engine compiled to WebAssembly. Nothing is sent to a server: the chart is computed on your device from an 11 MB excerpt of JPL DE440s covering 1950–2050, which is downloaded the first time you compute.

Examples

Times are UTC: convert local time, including daylight saving time, first.

One engine, three languages

The Rust crate, the Python wheel and the npm package share one core and one version. Their results are the same JSON, down to the key order.

Rust
use astroceleste_engine::ephemeris::{Kernel, KernelSet, Spk};
use astroceleste_engine::{calculate_chart, ChartRequest, UtcInstant};

let mut kernels = KernelSet::new();
kernels.push(Kernel::new("de440s.bsp",
    Spk::open("kernels/de440s.bsp")?)?);

let request = ChartRequest::new(
    UtcInstant::parse("1987-05-17T14:30:00Z")?, 41.9, 12.5);
let chart = calculate_chart(&kernels, &request)?;
Python
import astroceleste_engine as ace

engine = ace.Engine(["de440s.bsp"])
chart = engine.chart(
    "1987-05-17T14:30:00Z", 41.9, 12.5,
    house_system="P",
    zodiac_type="sidereal",
    ayanamsa="lahiri",
)
chart["planets"][0]["sign"]   # 'Taurus'
JavaScript
import init, { Engine } from "astroceleste-engine";

await init();
const engine = new Engine();
const res = await fetch("/ephemeris/de440s.bsp");
engine.addKernel("de440s.bsp",
  new Uint8Array(await res.arrayBuffer()));

const chart = engine.chart({
  utc: "1987-05-17T14:30:00Z",
  latitude: 41.9, longitude: 12.5,
});

What it computes

Planets and points

Sun to Pluto, the lunar nodes, Chiron and Black Moon Lilith, with speed and retrograde status, and the Ascendant and Midheaven.

Houses

Eleven house systems (Placidus, Koch, Regiomontanus, Campanus, Topocentric, Alcabitius, Morinus, Porphyry, Equal, Vehlow, Whole Sign) and the house of every point.

Tropical and sidereal

14 ayanamsas, including Lahiri, Fagan-Bradley, Krishnamurti, Raman and Galactic Center.

Aspects and orbs

The five major aspects plus semi-sextile and quincunx, with configurable orbs and moiety methods.

Fixed stars and lots

Fixed-star conjunctions with precession, and the Arabic parts with day and night formulas.

Temperament and Moon

Traditional temperament from the primary qualities, and the lunar phase, illumination, dignity and mansion.

Horary

Planetary day and hour from the actual sunrise and sunset, significators, void of course Moon and considerations before judgment.

Transits, synastry, derived charts

Cross-aspects to a natal chart or between two charts, and charts turned to any house.

Verified, not approximated

JPL ephemerides

Positions come from NASA JPL DE440s (1849–2150) or DE441 (13200 BC–17191 AD), read by a pure-Rust SPK reader. A date outside the loaded kernels is an error, never a guess.

277 golden charts

Every release reproduces the reference implementation's output for natal, horary, transit, synastry and derived charts: floats within 10−9, with the same keys in the same order.

Checked stage by stage

Time scales, precession, nutation, light-time, deflection and aberration are checked against Skyfield, and raw kernel states against jplephem.

Pure Rust with no C code and two dependencies (serde, serde_json). Builds for servers, wasm32-unknown-unknown, Android and iOS. How accuracy is verified →