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.

86 lines (85 loc) 3.99 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 { GroundPositionParams, Degrees, EcfVec3, EciVec3, Kilometers, LlaVec3, Radians, RaeVec3, Geodetic, BaseObjectParams } from '../main.js'; import { BaseObject } from './BaseObject.js'; import { Satellite } from './Satellite.js'; export declare class GroundObject extends BaseObject { name: string; lat: Degrees; lon: Degrees; alt: Kilometers; constructor(info: GroundPositionParams & BaseObjectParams); /** * Calculates the relative azimuth, elevation, and range between this GroundObject and a Satellite. * @param satellite The Satellite object. * @param date The date for which to calculate the RAE values. Defaults to the current date. * @returns The relative azimuth, elevation, and range values in kilometers and degrees. */ rae(satellite: Satellite, date?: Date): RaeVec3<Kilometers, Degrees>; /** * Calculates ECF position at a given time. * @variation optimized version of this.toGeodetic().toITRF().position; * @returns The ECF position vector of the ground object. */ ecf(): EcfVec3<Kilometers>; /** * Calculates the Earth-Centered Inertial (ECI) position vector of the ground object at a given date. * @variation optimzed version of this.toGeodetic().toITRF().toJ2000().position; * @param date The date for which to calculate the ECI position vector. Defaults to the current date. * @returns The ECI position vector of the ground object. */ eci(date?: Date): EciVec3<Kilometers>; /** * Returns the latitude, longitude, and altitude of the GroundObject. * @returns The latitude, longitude, and altitude as an LlaVec3 object. */ lla(): LlaVec3<Degrees, Kilometers>; /** * Converts the latitude, longitude, and altitude of the GroundObject to radians and kilometers. * @variation optimized version of this.toGeodetic() without class instantiation for better performance and * serialization. * @returns An object containing the latitude, longitude, and altitude in * radians and kilometers. */ llaRad(): LlaVec3<Radians, Kilometers>; get latRad(): Radians; get lonRad(): Radians; /** * Creates a GroundObject object from a Geodetic position. * @param geodetic The geodetic coordinates. * @returns A new GroundObject object. */ static fromGeodetic(geodetic: Geodetic): GroundObject; /** * Converts the ground position to geodetic coordinates. * @returns The geodetic coordinates. */ toGeodetic(): Geodetic; /** * Validates the input data for the GroundObject. * @param info - The GroundPositionParams object containing the latitude, * longitude, and altitude. @returns void */ private validateGroundObjectInputData_; isGroundObject(): boolean; }