Expand description
Global geocentric solar and lunar eclipse computation for the pleiades
workspace, derived entirely from pleiades’ validated Sun and Moon positions.
§Scope
- Window: 1900-01-01 (JD 2 415 020.5 TDB) through 2100-01-01 (JD 2 488 069.5 TDB), bounded by the packaged ephemeris data. Four NASA-canon eclipses falling in mid/late 2100 are uncomputable with the packaged data and are excluded.
- Coverage: global / geocentric, plus per-observer local circumstances
(contact times, magnitude/obscuration, az/alt, visibility) via
EclipseEngine::local_circumstancesandnext/previous_local_eclipse. - Outputs per eclipse: type, instant of greatest eclipse, magnitude, gamma, Saros series, eclipsed longitude (apparent tropical ecliptic of date; no ayanamsa), and (solar only) geographic location of greatest eclipse. Lunar eclipses have no greatest-eclipse location.
- Validation: the fail-closed
validate-eclipsesgate recomputes every in-window NASA-canon eclipse and compares against ≤ 60 s (time), ≤ 0.01 (magnitude), exact type, exact Saros, and ≤ 1.0″ (eclipsed longitude). Of the 909 in-window NASA-canon rows, 908 pass all five tolerances; one documented knife-edge eclipse (1948-05-09, Saros 137, annular vs hybrid at magnitude ≈ 1.0) is allowlisted for the exact-type check only (its four other tolerances are still verified).
§Example
use pleiades_data::packaged_backend;
use pleiades_eclipse::{EclipseEngine, EclipseFilter};
use pleiades_types::{Instant, JulianDay, TimeScale};
let engine = EclipseEngine::new(packaged_backend());
let after = Instant::new(JulianDay::from_days(2_451_545.0), TimeScale::Tdb);
let next = engine.next_eclipse(after, EclipseFilter::All).unwrap();
assert!(next.is_some());Structs§
- Eclipse
- A single global/geocentric eclipse and its computed circumstances.
- Eclipse
Engine - Searches for global/geocentric eclipses over a chosen
EphemerisBackend. - GeoLocation
- A geocentric sub-shadow point on Earth. Deliberately not
ObserverLocation: the greatest-eclipse point is a position, not an observing site. - Local
Contact - One observer-local contact event: its instant plus the eclipsed body’s
horizontal position and visibility there. A contact that occurs below the
horizon is still timed (
instantpresent) but flaggedvisible == false. - Local
Lunar Circumstances - Local circumstances of a lunar eclipse for one observer. Contact instants are global (shared by all observers); the local content is horizon visibility and the Moon’s az/alt at each contact.
- Local
Solar Circumstances - Local circumstances of a solar eclipse for one observer.
Enums§
- Eclipse
Error - Errors returned by the eclipse engine; all variants fail closed.
- Eclipse
Filter - Selects which eclipse kinds a search returns.
- Eclipse
Kind - Whether an eclipse is of the Sun (Moon between Earth and Sun, at new moon) or of the Moon (Earth between Sun and Moon, at full moon).
- Eclipse
Type - An eclipse type tagged by kind: either a
SolarEclipseTypeor aLunarEclipseType. - Local
Circumstances - A tagged local result: either solar or lunar circumstances.
- Lunar
Eclipse Type - Geometric classification of a lunar eclipse from the Moon’s penetration of Earth’s shadow at greatest eclipse.
- Node
- Which lunar node the eclipse occurs near, derived from the sign of the Moon’s ecliptic latitude change through the syzygy.
- Solar
Eclipse Type - Geometric classification of a solar eclipse at its point of greatest eclipse.
Constants§
- WINDOW_
END_ JD - Last instant of the supported window, Julian Day. This is the end of the packaged backend’s actual Sun/Moon coverage (2100-01-01 TT); the backend has no segments beyond it, so eclipses in the remainder of 2100 are out of range.
- WINDOW_
START_ JD - First instant of the supported window (1900-01-01 TT), Julian Day.