Eclipses
Browse solar and lunar eclipses over a range of years and inspect local visibility, magnitude, and contact times for any coordinates. Selecting a central solar eclipse plots its path of totality or annularity across Earth.
caelus 0.25.0, embedded tier
totalannular or hybridpartialpenumbralseen from Madrid
Searching.
Searching.
import {
Engine, julianDay, solarEclipses, solarEclipseLocal, solarEclipseLimits, lunarEclipses, lunarEclipseLocal,
} from "caelus";
import { embeddedData } from "caelus/data-embedded";
const engine = new Engine(embeddedData);
const from = julianDay(2026, 1, 1);
const to = julianDay(2029, 1, 1);
for (const e of solarEclipses(engine, from, to)) {
solarEclipseLocal(engine, e.tMax, 40.42, -3.7);
solarEclipseLimits(engine, e.tMax); // the path at greatest eclipse
}
for (const e of lunarEclipses(engine, from, to)) {
lunarEclipseLocal(engine, e.tMax, 40.42, -3.7);
}[]
The search locates every new and full Moon across the date range and evaluates eclipse geometry using the same solar and lunar ephemerides as the chart API, running in two-year increments. For each solar eclipse, local circumstances are calculated at the selected coordinates and filtered by solar altitude to verify that the event occurs above the horizon.
Greatest eclipse times agree with Swiss Ephemeris within 9 seconds, matching every eclipse classification from 1990 to 2030 (92 lunar and 89 solar). Contact times are typically accurate within 15 seconds (wider for grazing paths), and central shadow coordinates stay within 10 km.
These bounds reliably determine local visibility and approximate totality duration, though near the edge of a central track (where a single kilometer can decide totality) consult dedicated Besselian maps. Historical eclipses centuries in the past or future also carry ΔT clock uncertainty, and dates prior to October 15, 1582 use the Julian calendar.