UNPKG

ootk

Version:

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

112 lines (111 loc) 6.13 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 * * Many of the classes are based off of the work of @david-rc-dayton and his * Pious Squid library (https://github.com/david-rc-dayton/pious_squid) which * is licensed under the MIT license. * * 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 { Degrees, DegreesPerSecond, Kilometers, KilometersPerSecond, Radians, RadiansPerSecond } from '../main.js'; import { J2000 } from '../coordinate/J2000.js'; import { AngularDistanceMethod } from '../enums/AngularDistanceMethod.js'; import { Vector3D } from '../operations/Vector3D.js'; import { EpochUTC } from '../time/EpochUTC.js'; /** * Represents a geocentric right ascension and declination observation. * * In geocentric coordinates, observations are considered from the Earth's center. This approach simplifies calculations * for distant celestial objects, as it assumes a uniform observation point that ignores the observer's specific * location on Earth. */ export declare class RadecGeocentric { epoch: EpochUTC; rightAscension: Radians; declination: Radians; range?: Kilometers | undefined; rightAscensionRate?: (RadiansPerSecond | null) | undefined; declinationRate?: (RadiansPerSecond | null) | undefined; rangeRate?: (KilometersPerSecond | null) | undefined; constructor(epoch: EpochUTC, rightAscension: Radians, declination: Radians, range?: Kilometers | undefined, rightAscensionRate?: (RadiansPerSecond | null) | undefined, declinationRate?: (RadiansPerSecond | null) | undefined, rangeRate?: (KilometersPerSecond | null) | undefined); /** * Creates a RadecGeocentric object from the given parameters in degrees. * @param epoch - The epoch in UTC. * @param rightAscensionDegrees - The right ascension in degrees. * @param declinationDegrees - The declination in degrees. * @param range - The range in kilometers (optional). * @param rightAscensionRateDegrees - The right ascension rate in degrees per second (optional). * @param declinationRateDegrees - The declination rate in degrees per second (optional). * @param rangeRate - The range rate in kilometers per second (optional). * @returns A new RadecGeocentric object. */ static fromDegrees(epoch: EpochUTC, rightAscensionDegrees: Degrees, declinationDegrees: Degrees, range?: Kilometers, rightAscensionRateDegrees?: Degrees, declinationRateDegrees?: Degrees, rangeRate?: KilometersPerSecond): RadecGeocentric; /** * Creates a RadecGeocentric object from a state vector in J2000 coordinates. * @param state - The J2000 state vector. * @returns A new RadecGeocentric object. */ static fromStateVector(state: J2000): RadecGeocentric; /** * Gets the right ascension in degrees. * @returns The right ascension in degrees. */ get rightAscensionDegrees(): Degrees; /** * Gets the declination in degrees. * @returns The declination in degrees. */ get declinationDegrees(): Degrees; /** * Gets the right ascension rate in degrees per second. * @returns The right ascension rate in degrees per second, or null if it is not available. */ get rightAscensionRateDegrees(): DegreesPerSecond | null; /** * Gets the rate of change of declination in degrees per second. * @returns The rate of change of declination in degrees per second, or null if not available. */ get declinationRateDegrees(): DegreesPerSecond | null; /** * Calculates the position vector in geocentric coordinates. * @param range - The range in kilometers (optional). If not provided, it uses the default range or 1.0 kilometer. * @returns The position vector in geocentric coordinates. */ position(range?: Kilometers): Vector3D<Kilometers>; /** * Calculates the velocity vector of the celestial object. * @param range - The range of the celestial object in kilometers. If not provided, it uses the stored range value. * @param rangeRate - The range rate of the celestial object in kilometers per second. * If not provided, it uses the stored range rate value. * @returns The velocity vector of the celestial object in kilometers per second. * @throws Error if the right ascension rate or declination rate is missing. */ velocity(range?: Kilometers, rangeRate?: KilometersPerSecond): Vector3D<KilometersPerSecond>; /** * Calculates the angular distance between two celestial coordinates (RA and Dec). * @param radec - The celestial coordinates to compare with. * @param method - The method to use for calculating the angular distance. Default is `AngularDistanceMethod.Cosine`. * @returns The angular distance between the two celestial coordinates in radians. */ angle(radec: RadecGeocentric, method?: AngularDistanceMethod): Radians; /** * Calculates the angle in degrees between two RadecGeocentric objects. * @param radec - The RadecGeocentric object to calculate the angle with. * @param method - The method to use for calculating the angular distance. Default is AngularDistanceMethod.Cosine. * @returns The angle in degrees. */ angleDegrees(radec: RadecGeocentric, method?: AngularDistanceMethod): Degrees; }