/** * astroengine core -- clean-room ephemeris engine (TypeScript port). * * 1:1 port of the validated Python implementation. Environment-agnostic: * all coefficient data is injected (works in browser via fetch/bundling, * in Node via the loader in node-loader.ts). */ export declare const DEG: number; export declare const ARCSEC: number; export declare const J2000 = 2451545; export declare const LIGHT_TIME_AU = 0.0057755183; /** Python-style modulo: result has the sign of the divisor. */ export declare function mod(a: number, b: number): number; export type VsopSeries = { L: number[][][]; B: number[][][]; R: number[][][]; }; export type MoonSeries = { ta: number[][]; tb: number[][]; }; export type ChebData = { jd0: number; seg_days: number; scale?: number; segments: number[][][]; }; export type KeplerElements = { a: number; e: number; i: number; node: number; peri: number; M0: number; n: number; }; export type KeplerPack = { epoch: number; bodies: Record; }; /** Anything that yields heliocentric ecliptic-J2000 xyz (AU) at a TT jd: * ChebSeries (fitted small bodies) or KeplerOrbit (Uranian bodies). */ export interface XyzSource { xyz(jd: number): [number, number, number]; } export interface EngineData { vsop: Record; nutation: number[][]; moonMeeus: MoonSeries; pluto: number[][]; chiron?: ChebData; moonCheb?: ChebData; /** Interpolated ("natural") lunar apogee pack: geocentric true-ecliptic- * of-date unit vectors, a spline through the Moon's real apogee passages * refit as Chebyshev (concept: Swiss Ephemeris General Documentation, * Dieter Koch; see python/fit_intp_apog.py). Not a chebPacks entry: those * are heliocentric-J2000 and go through the light-time pipeline. */ intpApog?: ChebData; /** Heliocentric ecliptic-J2000 Chebyshev packs by body id (ceres, * pallas, juno, vesta, pholus, ...). Same pipeline as Chiron. */ chebPacks?: Record; /** Heliocentric Earth pack (fit_planet.py earth). Not a chebPacks entry: * Earth is never a chart body, it is the observer. Every geocentric * direction is `body - earth`, so Earth's own VSOP error is a floor under * every other body, amplified by 1/distance -- which is why packing it * lifts the whole chart at once (range-expansion.md Tier C). */ earthPack?: ChebData; /** Hamburg-school (Uranian) constant-element orbits; see fit_uranian.py. */ keplerPack?: KeplerPack; /** Fixed-star catalog (HYG-derived; ICRS J2000 + proper motions). */ fixedStars?: import("./stars.js").StarPack; /** Deep naked-eye star pack (HYG to ~mag 6.5), the complete background field * for SkyView. Opt-in: node-loaded, not in the embedded web bundle. */ deepStars?: import("./stars.js").StarPack; /** Constellation figure lines and labels for SkyView overlays. */ constellations?: import("./stars.js").ConstellationPack; } /** * Convert a UT calendar date and time to a Julian Day (UT) — the time * coordinate the engine consumes. Pass the result to {@link Engine.position}, * {@link Engine.longitude}, {@link Engine.chartAt}, and the event/derived * functions; {@link Engine.chart} takes the calendar fields directly instead. * * Arguments are **UT**, not local civil time — convert a local time to UT * first (see the `caelus-birth` package). Uses the proleptic Gregorian * calendar. * * @param y Year in UT, e.g. `1990`. * @param mo Month, `1`–`12`. * @param d Day of month, `1`–`31`. * @param h Hour, `0`–`23`. Defaults to `0`. * @param mi Minute, `0`–`59`. Defaults to `0`. * @param s Second, `0`–`59`. Defaults to `0`. * @returns The Julian Day in UT (a fractional day count). * @example * ```ts * const jd = julianDay(2025, 6, 1, 12, 0, 0); // 2025-06-01 12:00 UT * engine.longitude("sun", jd); * ``` */ export declare function julianDay(y: number, mo: number, d: number, h?: number, mi?: number, s?: number): number; /** * ΔT (TT − UT1) in seconds at a given instant — the gap between Terrestrial * Time and universal time. Observed IERS values 1955–2025, Espenak–Meeus * polynomials before, and a gentle extrapolation after (Earth's rotation sped * up post-2016). The engine applies this for you; call it directly only for * timescale work. * * @param jdUt Julian Day (UT). * @returns ΔT in seconds. */ export declare function deltaT(jdUt: number): number; export declare function jdTT(jdUt: number): number; /** * Heliocentric Earth of date, preferring `data.earthPack` over VSOP87D. * * The Python side can intercept inside Vsop.heliocentric because it dispatches * on a body name; here vsopHeliocentric takes a series, so Earth's six call * sites go through this helper instead. Same contract as vsopHeliocentric: * ecliptic coordinates OF DATE. Inert until a pack is loaded. */ export declare function earthHeliocentric(data: EngineData, jde: number): [number, number, number]; export declare function vsopHeliocentric(series: VsopSeries, jde: number): [number, number, number]; /** IAU 1980 nutation: [dPsi, dEps] in radians. */ export declare function nutation(data: EngineData, jde: number): [number, number]; export declare function meanObliquity(jde: number): number; export declare function trueObliquity(data: EngineData, jde: number): number; /** Precession of ecliptic coordinates between epochs (Vondrak 2011): * ecliptic-of-from -> J2000 equatorial -> ecliptic-of-to. */ export declare function precessEcliptic(lon: number, lat: number, jdeFrom: number, jdeTo: number): [number, number]; /** Apparent geocentric ecliptic lon/lat (true equinox of date), distance. */ export declare function planetApparent(data: EngineData, name: string, jde: number): [number, number, number]; export declare function sunApparent(data: EngineData, jde: number): [number, number, number]; /** Geocentric Moon, mean equinox of date (Meeus ch.47): lon, lat, dist km. */ export declare function moonGeometric(data: EngineData, jde: number): [number, number, number]; export declare function moonApparentSeries(data: EngineData, jde: number): [number, number, number]; export declare class ChebSeries { jd0: number; seg: number; segments: number[][][]; jd1: number; scale: number; constructor(data: ChebData); private locate; xyz(jd: number): [number, number, number]; xyzVel(jd: number): [[number, number, number], [number, number, number]]; } export declare function moonApparentPrecise(data: EngineData, cheb: ChebSeries, jde: number): [number, number, number]; export declare function trueNodePrecise(data: EngineData, cheb: ChebSeries, jde: number): number; export declare function meanNode(data: EngineData, jde: number): number; /** Osculating node from the series moon (fallback outside Chebyshev range). */ export declare function trueNodeSeries(data: EngineData, jde: number): number; /** Ecliptic lon/lat -> right ascension, declination (all radians). */ export declare function equatorial(lon: number, lat: number, eps: number): [number, number]; /** Mean ayanamsa at J2000.0 (degrees) per mode. Standard epoch anchors * (matched to Swiss Ephemeris 2.10 to 1e-9 deg); propagation uses Vondrak * 2011 ecliptic precession, the same model Swiss Ephemeris uses: * agreement over 1900-2099 is <=0.005 arcsec. */ export declare const AYANAMSA_J2000: Record; /** Mean ayanamsa in degrees. Sidereal longitude = (tropical true-equinox * longitude - nutation in longitude) - ayanamsa: the sidereal zodiac is * anchored to the mean equinox. */ export declare function ayanamsa(jde: number, mode: string): number; /** Mean lunar apogee (Black Moon Lilith) on the inclined lunar orbit: * apparent lon (true equinox) and orbital latitude, radians. */ export declare function meanLilith(data: EngineData, jde: number): [number, number]; /** Osculating lunar apogee (True Lilith) from the Chebyshev moon. */ export declare function oscApogeePrecise(data: EngineData, cheb: ChebSeries, jde: number): [number, number, number]; /** Series fallback outside the Chebyshev range (same finite-difference * state as the true-node fallback). */ export declare function oscApogeeSeries(data: EngineData, jde: number): [number, number, number]; /** Constant-element two-body orbit with the same xyz(jde) interface as * ChebSeries, so chironApparent takes either. */ export declare class KeplerOrbit implements XyzSource { private els; private epoch; constructor(els: KeplerElements, epoch: number); xyz(jde: number): [number, number, number]; } export declare const EARTH_RADIUS_AU: number; /** Diurnal parallax in ecliptic coordinates (Meeus ch. 11/40). * lst = local apparent sidereal time (rad). Returns [lon, lat, distAu]. */ export declare function topocentricEcl(lon: number, lat: number, distAu: number, lst: number, obsLat: number, altM: number, eps: number): [number, number, number]; /** Meeus ch.37 heliocentric Pluto, ecliptic J2000: [l rad, b rad, r AU]. */ export declare function plutoHeliocentric(data: EngineData, jde: number): [number, number, number]; export declare function plutoApparent(data: EngineData, jde: number): [number, number, number]; export declare function chironApparent(data: EngineData, cheb: XyzSource, jde: number): [number, number, number];