import { Engine } from "./chart.js"; export interface LunarEclipse { tMax: number; type: "total" | "partial" | "penumbral"; magUmbral: number; magPenumbral: number; penumbralBegin: number | null; penumbralEnd: number | null; partialBegin: number | null; partialEnd: number | null; totalBegin: number | null; totalEnd: number | null; } export interface SolarEclipse { tMax: number; type: "total" | "annular" | "hybrid" | "partial"; gamma: number; begin: number; end: number; } /** Lunar eclipses in [jdStart, jdEnd] (UT JDs). */ export declare function lunarEclipses(engine: Engine, jdStart: number, jdEnd: number): LunarEclipse[]; /** * Solar eclipses in `[jdStart, jdEnd]`, with global circumstances (not * local visibility). Each new Moon in the window is tested for an eclipse and, * when found, classified by the Moon's shadow geometry. * * @param engine The engine used to evaluate positions. * @param jdStart Start of the window, Julian Day (UT). * @param jdEnd End of the window, Julian Day (UT). * @returns {@link SolarEclipse} records: `tMax` (greatest eclipse, JD UT), * `type` (`"total"`/`"annular"`/`"hybrid"`/`"partial"`), `gamma` (minimum * shadow-axis distance in Earth radii), and the `begin`/`end` JDs. * @example * ```ts * const eclipses = solarEclipses(engine, julianDay(2025, 1, 1), julianDay(2030, 1, 1)); * eclipses[0].type; // e.g. "partial" * ``` */ export declare function solarEclipses(engine: Engine, jdStart: number, jdEnd: number): SolarEclipse[]; /** Geographic point on the Earth's surface (geodetic latitude, east longitude). */ export interface GeoPoint { /** Geodetic latitude in degrees, north positive. */ lat: number; /** Longitude in degrees, east positive, in (-180, 180]. */ lonEast: number; } /** Local circumstances of a solar eclipse seen from one place. */ export interface SolarLocal { /** What the observer sees at maximum: `"none"` when no part of the Sun is * covered from this place. */ type: "total" | "annular" | "partial" | "none"; /** Eclipse magnitude: fraction of the Sun's *diameter* covered at maximum * (can exceed 1 in totality). 0 when `type` is `"none"`. */ magnitude: number; /** Obscuration: fraction of the Sun's *area* covered at maximum, in [0, 1]. */ obscuration: number; /** Time of maximum eclipse at this place (JD UT), or `null` when unseen. */ maxTime: number | null; /** First contact (partial begins), JD UT, or `null` when unseen. */ c1: number | null; /** Second contact (totality/annularity begins), JD UT, or `null`. */ c2: number | null; /** Third contact (totality/annularity ends), JD UT, or `null`. */ c3: number | null; /** Fourth contact (partial ends), JD UT, or `null` when unseen. */ c4: number | null; } /** * Sub-shadow geographic point where the eclipse axis meets the Earth at a * Julian Day (UT): the centre line of totality/annularity at that instant. * Sample it across the eclipse (e.g. between the {@link SolarEclipse} `begin` * and `end`) to draw the ground track. * * @param engine The engine used to evaluate positions. * @param jd Instant to evaluate, Julian Day (UT) -- typically a * {@link SolarEclipse.tMax} for the point of greatest eclipse. * @returns The {@link GeoPoint} on the IAU 1976 ellipsoid, or `null` when the * axis misses the Earth (only a partial eclipse exists anywhere then). */ export declare function solarEclipseWhere(engine: Engine, jd: number): GeoPoint | null; /** * Local circumstances of a solar eclipse as seen from one place: contact * times, magnitude, and obscuration. Topocentric Sun and Moon disks, so it * accounts for lunar parallax (which is what makes the same eclipse total in * one town and partial in the next). * * @param engine The engine used to evaluate positions. * @param jd A time near the eclipse, JD (UT) -- typically a * {@link SolarEclipse.tMax}; the local maximum is found within a few hours. * @param latDeg Observer geodetic latitude in degrees (north positive). * @param lonEastDeg Observer longitude in degrees (east positive). * @param altM Observer height above the ellipsoid in metres (default 0). * @returns {@link SolarLocal}. `type` is `"none"` when the Sun is not eclipsed * from this place at all; `c2`/`c3` are `null` outside totality/annularity. */ export declare function solarEclipseLocal(engine: Engine, jd: number, latDeg: number, lonEastDeg: number, altM?: number): SolarLocal; /** The umbra/antumbra path of a solar eclipse at one instant. */ export interface EclipsePath { /** Central line point (greatest coverage) at this instant. */ center: GeoPoint; /** Northern edge of totality/annularity, or `null` if it runs off the Earth. */ north: GeoPoint | null; /** Southern edge, or `null` if it runs off the Earth. */ south: GeoPoint | null; /** Full path width (km) between the limits, or `null` when a limit is missing. */ widthKm: number | null; } /** * Ground path of a solar eclipse at a Julian Day (UT): the central point and * the north/south limits of totality (or annularity), with the path width. * Marches perpendicular to the shadow's ground track out to the umbra edge -- * where the Moon just fully covers (or is covered by) the Sun. Sample across * the eclipse to trace the full path of totality. * * @param engine The engine used to evaluate positions. * @param jd Instant to evaluate, Julian Day (UT) -- typically a * {@link SolarEclipse.tMax} for the path at greatest eclipse. * @returns The {@link EclipsePath}, or `null` when no central eclipse exists * then (only a partial eclipse, or the axis misses the Earth). */ export declare function solarEclipseLimits(engine: Engine, jd: number): EclipsePath | null; /** Whether a lunar eclipse is up at a place, and how high the Moon stands. */ export interface LunarLocal { /** Moon's true altitude in degrees at the given instant (negative = below * the horizon). */ altitude: number; /** Whether the Moon is above the horizon (the eclipse is visible there). */ visible: boolean; } /** * Local visibility of a lunar eclipse: a lunar eclipse happens at the same * instant for the whole Earth, so "local circumstances" is simply whether the * Moon is up. Pass a contact time (e.g. {@link LunarEclipse.tMax} or a phase * boundary) to learn whether that phase is visible from a place. * * @param engine The engine used to evaluate positions. * @param jd Instant to evaluate, Julian Day (UT). * @param latDeg Observer latitude in degrees (north positive). * @param lonEastDeg Observer longitude in degrees (east positive). * @returns {@link LunarLocal} with the Moon's altitude and a visibility flag. */ export declare function lunarEclipseLocal(engine: Engine, jd: number, latDeg: number, lonEastDeg: number): LunarLocal;