UNPKG

ootk

Version:

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

224 lines (223 loc) 10.1 kB
import { Degrees, EcefVec3, EcfVec3, EciVec3, EnuVec3, GreenwichMeanSiderealTime, Kilometers, LlaVec3, Radians, RaeVec3, Sensor, SezVec3, RfVec3, RuvVec3, RfSensor } from '../main.js'; /** * Converts ECF to ECI coordinates. * * [X] [C -S 0][X] * [Y] = [S C 0][Y] * [Z]eci [0 0 1][Z]ecf * @param ecf takes xyz coordinates * @param gmst takes a number in gmst time * @returns array containing eci coordinates */ export declare function ecf2eci<T extends number>(ecf: EcfVec3<T>, gmst: number): EciVec3<T>; /** * Converts ECEF coordinates to ENU coordinates. * @param ecf - The ECEF coordinates. * @param lla - The LLA coordinates. * @returns The ENU coordinates. */ export declare function ecf2enu<T extends number>(ecf: EcefVec3<T>, lla: LlaVec3): EnuVec3<T>; /** * Converts ECI to ECF coordinates. * * [X] [C -S 0][X] * [Y] = [S C 0][Y] * [Z]eci [0 0 1][Z]ecf * * Inverse: * [X] [C S 0][X] * [Y] = [-S C 0][Y] * [Z]ecf [0 0 1][Z]eci * @param eci takes xyz coordinates * @param gmst takes a number in gmst time * @returns array containing ecf coordinates */ export declare function eci2ecf<T extends number>(eci: EciVec3<T>, gmst: number): EcfVec3<T>; /** * EciToGeodetic converts eci coordinates to lla coordinates * @variation cached - results are cached * @param eci takes xyz coordinates * @param gmst takes a number in gmst time * @returns array containing lla coordinates */ export declare function eci2lla(eci: EciVec3, gmst: number): LlaVec3<Degrees, Kilometers>; /** * Converts geodetic coordinates (longitude, latitude, altitude) to Earth-Centered Earth-Fixed (ECF) coordinates. * @param lla The geodetic coordinates in radians and meters. * @returns The ECF coordinates in meters. */ export declare function llaRad2ecf<AltitudeUnits extends number>(lla: LlaVec3<Radians, AltitudeUnits>): EcfVec3<AltitudeUnits>; /** * Converts geodetic coordinates (longitude, latitude, altitude) to Earth-Centered Earth-Fixed (ECF) coordinates. * @param lla The geodetic coordinates in degrees and meters. * @returns The ECF coordinates in meters. */ export declare function lla2ecf<AltitudeUnits extends number>(lla: LlaVec3<Degrees, AltitudeUnits>): EcfVec3<AltitudeUnits>; /** * Converts geodetic coordinates (latitude, longitude, altitude) to Earth-centered inertial (ECI) coordinates. * @variation cached - results are cached * @param lla The geodetic coordinates in radians and meters. * @param gmst The Greenwich Mean Sidereal Time in seconds. * @returns The ECI coordinates in meters. */ export declare function lla2eci(lla: LlaVec3<Radians, Kilometers>, gmst: GreenwichMeanSiderealTime): EciVec3<Kilometers>; /** * Calculates Geodetic Lat Lon Alt to ECEF coordinates. * @deprecated This needs to be validated. * @param lla The geodetic coordinates in degrees and meters. * @returns The ECEF coordinates in meters. */ export declare function lla2ecef<D extends number>(lla: LlaVec3<Degrees, D>): EcefVec3<D>; /** * Converts LLA to SEZ coordinates. * @see http://www.celestrak.com/columns/v02n02/ * @param lla The LLA coordinates. * @param ecf The ECF coordinates. * @returns The SEZ coordinates. */ export declare function lla2sez<D extends number>(lla: LlaVec3<Radians, D>, ecf: EcfVec3<D>): SezVec3<D>; /** * Converts a vector in Right Ascension, Elevation, and Range (RAE) coordinate system * to a vector in South, East, and Zenith (SEZ) coordinate system. * @param rae The vector in RAE coordinate system. * @returns The vector in SEZ coordinate system. */ export declare function rae2sez<D extends number>(rae: RaeVec3<D, Radians>): SezVec3<D>; /** * Converts a vector in Right Ascension, Elevation, and Range (RAE) coordinate system * to Earth-Centered Fixed (ECF) coordinate system. * @template D - The dimension of the RAE vector. * @template A - The dimension of the LLA vector. * @param rae - The vector in RAE coordinate system. * @param lla - The vector in LLA coordinate system. * @returns The vector in ECF coordinate system. */ export declare function rae2ecf<D extends number>(rae: RaeVec3<D, Degrees>, lla: LlaVec3<Degrees, D>): EcfVec3<D>; /** * Converts a vector from RAE (Range, Azimuth, Elevation) coordinates to ECI (Earth-Centered Inertial) coordinates. * @variation cached - results are cached * @param rae The vector in RAE coordinates. * @param lla The vector in LLA (Latitude, Longitude, Altitude) coordinates. * @param gmst The Greenwich Mean Sidereal Time. * @returns The vector in ECI coordinates. */ export declare function rae2eci<D extends number>(rae: RaeVec3<D, Degrees>, lla: LlaVec3<Degrees, D>, gmst: number): EciVec3<D>; /** * Converts a vector in RAE (Range, Azimuth, Elevation) coordinates to ENU (East, North, Up) coordinates. * @param rae - The vector in RAE coordinates. * @returns The vector in ENU coordinates. */ export declare function rae2enu(rae: RaeVec3): EnuVec3<Kilometers>; /** * Converts South, East, and Zenith (SEZ) coordinates to Right Ascension, Elevation, and Range (RAE) coordinates. * @param sez The SEZ coordinates. * @returns Rng, Az, El array */ export declare function sez2rae<D extends number>(sez: SezVec3<D>): RaeVec3<D, Radians>; /** * Converts Earth-Centered Fixed (ECF) coordinates to Right Ascension (RA), * Elevation (E), and Azimuth (A) coordinates. * @param lla The Latitude, Longitude, and Altitude (LLA) coordinates. * @param ecf The Earth-Centered Fixed (ECF) coordinates. * @returns The Right Ascension (RA), Elevation (E), and Azimuth (A) coordinates. */ export declare function ecfRad2rae<D extends number>(lla: LlaVec3<Radians, D>, ecf: EcfVec3<D>): RaeVec3<D, Degrees>; /** * Converts Earth-Centered Fixed (ECF) coordinates to Right Ascension (RA), * Elevation (E), and Azimuth (A) coordinates. * @variation cached - results are cached * @param lla The Latitude, Longitude, and Altitude (LLA) coordinates. * @param ecf The Earth-Centered Fixed (ECF) coordinates. * @returns The Right Ascension (RA), Elevation (E), and Azimuth (A) coordinates. */ export declare function ecf2rae<D extends number>(lla: LlaVec3<Degrees, D>, ecf: EcfVec3<D>): RaeVec3<D, Degrees>; export declare const jday: (year?: number, mon?: number, day?: number, hr?: number, minute?: number, sec?: number) => number; /** * Calculates the Greenwich Mean Sidereal Time (GMST) for a given date. * @param date - The date for which to calculate the GMST. * @returns An object containing the GMST value and the Julian date. */ export declare function calcGmst(date: Date): { gmst: GreenwichMeanSiderealTime; j: number; }; /** * Converts ECI coordinates to RAE (Right Ascension, Azimuth, Elevation) coordinates. * @variation cached - results are cached * @param now - Current date and time. * @param eci - ECI coordinates of the satellite. * @param sensor - Sensor object containing observer's geodetic coordinates. * @returns Object containing azimuth, elevation and range in degrees and kilometers respectively. */ export declare function eci2rae(now: Date, eci: EciVec3<Kilometers>, sensor: Sensor): RaeVec3<Kilometers, Degrees>; /** * Calculates the inertial azimuth of a satellite given its latitude and inclination. * @param lat - The latitude of the satellite in degrees. * @param inc - The inclination of the satellite in degrees. * @returns The inertial azimuth of the satellite in degrees. */ export declare function calcInertAz(lat: Degrees, inc: Degrees): Degrees; /** * Calculates the inclination angle of a satellite from its launch azimuth and latitude. * @param lat - The latitude of the observer in degrees. * @param az - The launch azimuth angle of the satellite in degrees clockwise from north. * @returns The inclination angle of the satellite in degrees. */ export declare function calcIncFromAz(lat: number, az: number): number; /** * Converts Azimuth and Elevation to U and V. * Azimuth is the angle off of boresight in the horizontal plane. * Elevation is the angle off of boresight in the vertical plane. * Cone half angle is the angle of the cone of the radar max field of view. * @param az - Azimuth in radians * @param el - Elevation in radians * @param coneHalfAngle - Cone half angle in radians * @returns U and V in radians */ export declare function azel2uv(az: Radians, el: Radians, coneHalfAngle: Radians): { u: number; v: number; }; /** * Determine azimuth and elevation off of boresight based on sensor orientation and RAE. * @param rae Range, Azimuth, Elevation * @param sensor Radar sensor object * @param face Face number of the sensor * @param maxSensorAz Maximum sensor azimuth * @returns Azimuth and Elevation off of boresight */ export declare function rae2raeOffBoresight(rae: RaeVec3, sensor: RfSensor, face: number, maxSensorAz: Degrees): { az: Radians; el: Radians; }; /** * Converts Range Az El to Range U V. * @param rae Range, Azimuth, Elevation * @param sensor Radar sensor object * @param face Face number of the sensor * @param maxSensorAz Maximum sensor azimuth * @returns Range, U, V */ export declare function rae2ruv(rae: RaeVec3, sensor: RfSensor, face: number, maxSensorAz: Degrees): RuvVec3; /** * Converts U and V to Azimuth and Elevation off of boresight. * @param u The U coordinate. * @param v The V coordinate. * @param coneHalfAngle The cone half angle of the radar. * @returns Azimuth and Elevation off of boresight. */ export declare function uv2azel(u: number, v: number, coneHalfAngle: Radians): { az: Radians; el: Radians; }; /** * Converts coordinates from East-North-Up (ENU) to Right-Front-Up (RF) coordinate system. * @param enu - The ENU coordinates to be converted. * @param enu.x - The east coordinate. * @param enu.y - The north coordinate. * @param enu.z - The up coordinate. * @param az - The azimuth angle in radians. * @param el - The elevation angle in radians. * @returns The converted RF coordinates. */ export declare function enu2rf<D extends number, A extends number = Radians>({ x, y, z }: EnuVec3<D>, az: A, el: A): RfVec3<D>;