UNPKG

ootk-core

Version:

Orbital Object Toolkit. A modern typed replacement for satellite.js including SGP4 propagation, TLE parsing, Sun and Moon calculations, and more.

23 lines (22 loc) 744 B
/** * Improved error handling for SGP4 */ export declare enum Sgp4ErrorCode { NO_ERROR = 0, MEAN_ELEMENTS_INVALID = 1,// ecc >= 1.0 or ecc < -0.001 or a < 0.95 er MEAN_MOTION_NEGATIVE = 2,// mean motion less than 0.0 PERT_ELEMENTS_INVALID = 3,// pert elements, ecc < 0.0 or ecc > 1.0 SEMI_LATUS_RECTUM_NEGATIVE = 4,// semi-latus rectum < 0.0 EPOCH_ELEMENTS_SUBORBITAL = 5,// epoch elements are sub-orbital SATELLITE_DECAYED = 6 } export declare class Sgp4Error extends Error { code: Sgp4ErrorCode; constructor(code: Sgp4ErrorCode, message?: string); static getDefaultMessage(code: Sgp4ErrorCode): string; } export interface Sgp4Result<T> { success: boolean; value?: T; error?: Sgp4Error; }