Skip to main content

Crate pleiades_eclipse

Crate pleiades_eclipse 

Source
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 only. No per-observer local circumstances.
  • 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-eclipses gate 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.
EclipseEngine
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.

Enums§

EclipseError
Errors returned by the eclipse engine; all variants fail closed.
EclipseFilter
Selects which eclipse kinds a search returns.
EclipseKind
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).
EclipseType
An eclipse type tagged by kind: either a SolarEclipseType or a LunarEclipseType.
LunarEclipseType
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.
SolarEclipseType
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.