UNPKG

ootk

Version:

Orbital Object Toolkit including Multiple Propagators, Initial Orbit Determination, and Maneuver Calculations.

100 lines (99 loc) 3.7 kB
/** * @author @thkruz Theodore Kruczek * @description Orbital Object ToolKit (ootk) is a collection of tools for working * with satellites and other orbital objects. * @license AGPL-3.0-or-later * @copyright (c) 2025 Kruczek Labs LLC * * This class was ported from the python-sgp4 library by Brandon Rhodes. That library * is licensed under the MIT license and he maintains the copyright for that work. * * Orbital Object ToolKit is free software: you can redistribute it and/or modify it under the * terms of the GNU Affero General Public License as published by the Free Software * Foundation, either version 3 of the License, or (at your option) any later version. * * Orbital Object ToolKit is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License along with * Orbital Object ToolKit. If not, see <http://www.gnu.org/licenses/>. */ import { OmmParsedDataFormat } from '../interfaces/OmmFormat.js'; import { Sgp4OpsMode } from '../enums/Sgp4OpsMode.js'; import { GreenwichMeanSiderealTime, SatelliteRecord, StateVectorSgp4, Vec3Flat } from '../types/types.js'; export declare enum Sgp4GravConstants { wgs72old = "wgs72old", wgs72 = "wgs72", wgs84 = "wgs84" } export declare enum Sgp4Methods { NEAR_EARTH = "n", DEEP_SPACE = "d" } export declare class Sgp4 { private static angle_; private static asinh_; static createSatrec(tleLine1: string, tleLine2: string, whichconst?: Sgp4GravConstants, opsmode?: Sgp4OpsMode): SatelliteRecord; static createSatrecFromOmm(omm: OmmParsedDataFormat, whichconst?: Sgp4GravConstants, opsmode?: Sgp4OpsMode): SatelliteRecord; private static cross_; static days2mdhms(year: number, days: number): { mon: number; day: number; hr: number; min: number; sec: number; }; private static dot_; static gstime(jdut1: number): GreenwichMeanSiderealTime; static invjday(jd: number, jdfrac: number): { year: number; mon: number; day: number; hr: number; min: number; sec: number; }; static jday(year: number | Date, mon?: number, day?: number, hr?: number, min?: number, sec?: number, ms?: number): { jd: number; jdFrac: number; }; private static mag_; private static newtonnu_; static propagate(satrec: SatelliteRecord, tsince: number): StateVectorSgp4; static rv2coe(r: Vec3Flat, v: Vec3Flat, mus: number): { p: number; a: number; ecc: number; incl: number; omega: number; argp: number; nu: number; m: number; arglat: number; truelon: number; lonper: number; }; /** * Determines the sign of a given number. * @param x - The input number to evaluate. * @returns `-1.0` if the input number is less than `0.0`, otherwise `1.0`. */ private static sgn_; /** * Computes the hyperbolic sine of a given number. * * The hyperbolic sine is calculated using the formula: * sinh(x) = (e^x - e^(-x)) / 2 * @param x - The input number for which to calculate the hyperbolic sine. * @returns The hyperbolic sine of the input number. */ private static sinh_; private static dpper_; private static dscom_; private static dsinit_; private static dspace_; private static getgravconst_; private static initl_; private static sgp4init_; }