import { Engine, BodyId, Zodiac } from "./chart.js"; export type RiseKind = "rise" | "set" | "mtransit" | "itransit"; export interface RiseSetOptions { altM?: number; pressure?: number; tempC?: number; searchDays?: number; /** Rise/set of the disc center instead of the upper limb. */ discCenter?: boolean; } /** * The next rise, set, or meridian transit of a body after `jdStart`, as a * Julian Day (UT). Accounts for the body's apparent radius, atmospheric * refraction, and observer altitude. * * @param engine The engine used to evaluate positions. * @param body A body id from {@link Engine.bodies}. * @param jdStart Search start, Julian Day (UT). The result is the first event * strictly after this instant. * @param latDeg Observer latitude in degrees, north positive. * @param lonDeg Observer longitude in degrees, east positive. * @param kind `"rise"`, `"set"`, `"mtransit"` (upper/meridian transit), or * `"itransit"` (lower transit). Defaults to `"rise"`. * @param opts `altM` (observer altitude, m), `pressure` (hPa), `tempC`, and * `searchDays` (how far ahead to look; defaults to 2). * @returns The event time as a Julian Day (UT), or `null` when it does not * occur in the window (e.g. polar day or night). * @example * ```ts * // Next sunrise over London after 2025-06-01 * const jd = riseSet(engine, "sun", julianDay(2025, 6, 1), 51.5, -0.13, "rise"); * ``` */ export declare function riseSet(engine: Engine, body: BodyId, jdStart: number, latDeg: number, lonDeg: number, kind?: RiseKind, opts?: RiseSetOptions): number | null; /** UT JDs where the body's apparent longitude crosses targetLon (degrees) * in [jdStart, jdEnd]. Retrograde bodies can cross a degree three times; * every crossing is returned in time order. */ export declare function crossings(engine: Engine, body: BodyId, targetLon: number, jdStart: number, jdEnd: number, zodiac?: Zodiac, maxHits?: number): number[]; export type PhaseName = "new" | "first_quarter" | "full" | "last_quarter"; /** * Every principal lunar phase (new, first quarter, full, last quarter) within * `[jdStart, jdEnd]`, sorted by time. Found from the Sun–Moon elongation * crossing 0°/90°/180°/270°. * * @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). * @param maxHits Cap on the number of phases returned. Defaults to 60. * @returns Sorted `[jdUt, phase]` pairs, where `phase` is one of * {@link PhaseName}. * @example * ```ts * const phases = lunarPhases(engine, julianDay(2025, 1, 1), julianDay(2025, 2, 1)); * // [[jd, "new"], [jd, "first_quarter"], ...] * ``` */ export declare function lunarPhases(engine: Engine, jdStart: number, jdEnd: number, maxHits?: number): Array<[number, PhaseName]>; /** Times the body stations (speed crosses zero): [jdUt, direction the body * turns]. Sun and Moon never station. Station timing is ill-conditioned: * expect minute-level differences between ephemerides. */ export declare function stations(engine: Engine, body: BodyId, jdStart: number, jdEnd: number, maxHits?: number): Array<[number, "retrograde" | "direct"]>; /** * The Gauquelin sector of a body (1–36, fractional) from the rise/set times of * the disc centre with refraction (Swiss Ephemeris method 3). Sectors run from * rise: 1–18 above the horizon, 19–36 below. * * @param engine The engine used to evaluate positions. * @param body A body id from {@link Engine.bodies}. * @param jdUt Julian Day (UT). * @param latDeg Observer latitude in degrees, north positive. * @param lonDeg Observer longitude in degrees, east positive. * @returns The sector in `[1, 37)`, or `null` in polar no-rise/no-set * conditions. */ export declare function gauquelinSector(engine: Engine, body: BodyId, jdUt: number, latDeg: number, lonDeg: number): number | null;