Skip to main content

Crate astroceleste_engine

Crate astroceleste_engine 

Source
Expand description

astroceleste-engine: astrological chart calculation on JPL ephemerides.

One implementation shared by the Astroceleste server (Python bindings), desktop and mobile apps (native) and the web app (WASM), so every platform computes identical charts.

Experimental (0.0.x): the API may change in any release.

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

// Kernels in preference order: the first one covering a date is used.
let mut kernels = KernelSet::new();
kernels.push(Kernel::new("de440s.bsp", Spk::open("kernels/de440s.bsp")?)?);

let mut request = ChartRequest::new(UtcInstant::parse("1987-05-17T14:30:00Z")?, 41.9, 12.5);
request.house_system = "P";
request.zodiac_type = "sidereal";
request.ayanamsa = "lahiri";

let chart = calculate_chart(&kernels, &request)?;
println!("{}", serde_json::to_string_pretty(&chart)?);

Modules§

ephemeris
Ephemeris sources. Everything above this layer (houses, aspects, lots, stars, …) is independent of where planetary positions come from.

Structs§

ApplyingAspect
A Ptolemaic aspect the Moon perfects before leaving its sign.
Aspect
An aspect between two chart points. Fixed-star conjunctions carry no is_major.
Chart
A complete chart (calculate_chart_data); serializes to the API’s JSON.
ChartRequest
What to compute.
CrossAspect
A cross-aspect between an overlay body (transit, partner) and a base body (natal).
Factor
One contribution to the temperament, with its weighted qualities.
FixedStarPosition
A fixed star conjunct a chart point.
HoraryChart
A horary chart: a complete chart plus horary_data (serialized flattened).
HoraryData
The horary-specific part of a horary chart.
HouseCusp
The cusp of one house.
Lot
An Arabic part (lot) placed in the chart.
LunarMansion
One of the 28 lunar mansions (manazil al-qamar).
LunarStatus
Lunar phase, speed, dignity and mansion.
MoonStatus
The Moon’s condition in a horary chart.
ParseError
The text given to UtcInstant::parse is not a supported date-time.
Placement
A planet, lunar point or angle placed in the chart.
PlanetaryHours
Planetary day and hour of a horary chart.
Qualities
The four primary qualities.
Scores
The four temperaments.
SeparatingAspect
A Ptolemaic aspect the Moon has perfected since entering its sign.
Stricture
A consideration before judgement (stricture against judging the chart).
Synastry
Synastry between two charts.
Temperament
Temperament assessment from the chart’s qualities.
TransitChart
Transits to a natal chart (calculate_transit_chart).
UtcInstant
A UTC instant, as microseconds since 1970-01-01T00:00:00Z.

Enums§

EngineError
Why a calculation failed. EngineError::code gives the API error code.

Functions§

calculate_chart
Compute a chart (calculate_chart_data).
calculate_derived_chart
A derived (turned) chart: radix house root (1-12) becomes the first house; cusps, angles and house placements follow, with the meaning of each derived house (calculate_derived_chart_data). Works on a stored chart payload, keeping every field it does not turn.
calculate_horary_chart
A chart for the moment of the question, with its horary analysis (calculate_horary_chart_data).
calculate_synastry
Cross-aspects from chart B (overlay) to chart A (base) (calculate_synastry_chart).
calculate_transit_chart
The sky at req (relocatable), with its cross-aspects to natal_planets (calculate_transit_chart).