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.

115 lines (114 loc) 4.55 kB
/** * @author Theodore Kruczek. * @license MIT * @copyright (c) 2022-2025 Theodore Kruczek Permission is * hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the * Software without restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell copies of * the Software, and to permit persons to whom the Software is furnished to do * so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import { Minutes, PositionVelocity, Kilometers, Radians } from '../main.js'; import { EpochUTC } from '../time/EpochUTC.js'; import { ClassicalElements } from './ClassicalElements.js'; import { EquinoctialElementsParams } from '../interfaces/EquinoctialElementsParams.js'; /** * Equinoctial elements are a set of orbital elements used to describe the * orbits of celestial bodies, such as satellites around a planet. They provide * an alternative to the traditional Keplerian elements and are especially * useful for avoiding singularities and numerical issues in certain types of * orbits. * * Unlike Keplerian elements, equinoctial elements don't suffer from * singularities at zero eccentricity (circular orbits) or zero inclination * (equatorial orbits). This makes them more reliable for numerical simulations * and analytical studies, especially in these edge cases. * @see https://faculty.nps.edu/dad/orbital/th0.pdf */ export declare class EquinoctialElements { epoch: EpochUTC; /** The semi-major axis of the orbit in kilometers. */ a: Kilometers; /** The h component of the eccentricity vector. */ h: number; /** The k component of the eccentricity vector. */ k: number; /** The p component of the ascending node vector. */ p: number; /** The q component of the ascending node vector. */ q: number; /** The mean longitude of the orbit in radians. */ lambda: Radians; /** The gravitational parameter of the central body in km³/s². */ mu: number; /** The retrograde factor. 1 for prograde orbits, -1 for retrograde orbits. */ I: 1 | -1; constructor({ epoch, h, k, lambda, a, p, q, mu, I }: EquinoctialElementsParams); /** * Returns a string representation of the EquinoctialElements object. * @returns A string representation of the EquinoctialElements object. */ toString(): string; /** * Gets the semimajor axis. * @returns The semimajor axis in kilometers. */ get semimajorAxis(): Kilometers; /** * Gets the mean longitude. * @returns The mean longitude in radians. */ get meanLongitude(): Radians; /** * Calculates the mean motion of the celestial object. * @returns The mean motion in units of radians per second. */ get meanMotion(): number; /** * Gets the retrograde factor. * @returns The retrograde factor. */ get retrogradeFactor(): number; /** * Checks if the orbit is prograde. * @returns True if the orbit is prograde, false otherwise. */ isPrograde(): boolean; /** * Checks if the orbit is retrograde. * @returns True if the orbit is retrograde, false otherwise. */ isRetrograde(): boolean; /** * Gets the period of the orbit. * @returns The period in minutes. */ get period(): Minutes; /** * Gets the number of revolutions per day. * @returns The number of revolutions per day. */ get revsPerDay(): number; /** * Converts the equinoctial elements to classical elements. * @returns The classical elements. */ toClassicalElements(): ClassicalElements; /** * Converts the equinoctial elements to position and velocity. * @returns The position and velocity in classical elements. */ toPositionVelocity(): PositionVelocity; }