export interface TurboBody { seg_days: number; segments: number[][]; } export interface TurboPack { jd0: number; jd1: number; degree: number; zodiac: string; bodies: Record; } /** * Runtime evaluator for a **turbo pack** — a segmented Chebyshev fit of the * engine's apparent longitude over a fixed range and body set. Evaluating a * longitude costs a couple dozen multiply-adds, so a century-scale transit scan * that calls it tens of thousands of times runs in milliseconds. Construct one * from a pack you minted offline; it does no fitting, no I/O, and needs no * {@link Engine}. * * @example * ```ts * const turbo = new Turbo(pack); // a TurboPack generated for your range/bodies * if (turbo.has("mars")) turbo.longitude("mars", jd); * ``` */ export declare class Turbo { /** Start of the pack's valid Julian Day (UT) range. */ readonly jd0: number; /** End of the pack's valid Julian Day (UT) range. */ readonly jd1: number; private readonly bodies; /** * @param pack A {@link TurboPack}: the fitted segments plus its `jd0`/`jd1` * range, minted offline for your bodies and span. */ constructor(pack: TurboPack); /** * Whether this pack can evaluate a given body. * * @param body Body id to test. * @returns `true` if {@link Turbo.longitude} accepts `body`. */ has(body: string): boolean; /** * Apparent ecliptic longitude (degrees) of a body from the turbo pack, in the * pack's own zodiac. The hot path for bulk scans. * * @param body A body id the pack contains (see {@link Turbo.has}). * @param jd Julian Day (UT), within `[jd0, jd1]`. * @returns Ecliptic longitude in degrees, `[0, 360)`. * @throws Error if the pack lacks `body`, or `jd` is outside `[jd0, jd1]`. */ longitude(body: string, jd: number): number; }