keplerian-core
Version:
High-performance TypeScript library for orbital mechanics calculations, providing numerical integration, state propagation, and perturbation modeling for Keplerian orbits.
37 lines (36 loc) • 2.02 kB
TypeScript
import { Vector2D } from 'packages/Keplerian-core/src/types/math';
import { OrbitalState } from 'packages/Keplerian-core/src/types/physics';
/**
* Checks if the spacecraft is at apoapsis (farthest point from central body) in a 2D elliptical orbit.
* For a 2D orbit, apoapsis occurs when the velocity vector is perpendicular to the position vector
* and the distance is at a local maximum.
* @param state The current orbital state (position and velocity).
* @returns True if at apoapsis, false otherwise.
*/
export declare function isApoapsis2D(state: OrbitalState): boolean;
/**
* Checks if the spacecraft is at periapsis (closest point to central body) in a 2D elliptical orbit.
* Similar to apoapsis, periapsis occurs when velocity is perpendicular to position.
* @param state The current orbital state (position and velocity).
* @returns True if at periapsis, false otherwise.
*/
export declare function isPeriapsis2D(state: OrbitalState): boolean;
/**
* Placeholder for ground track event detection (e.g., crossing a specific longitude).
* This would require ECEF coordinates and knowledge of Earth's rotation.
* @param ecefPosition The spacecraft's position in Earth-Centered, Earth-Fixed coordinates.
* @param targetLongitude The longitude to detect crossing.
* @returns True if crossing the target longitude, false otherwise.
*/
export declare function isCrossingLongitude(ecefPosition: Vector2D, targetLongitude: number): boolean;
/**
* Placeholder for eclipse detection.
* This would require positions of the Sun, Earth, and spacecraft, and their radii.
* @param scPosition The spacecraft's position.
* @param sunPosition The Sun's position.
* @param earthPosition The Earth's position.
* @param earthRadius The radius of the Earth.
* @param sunRadius The radius of the Sun.
* @returns True if in eclipse, false otherwise.
*/
export declare function isInEclipse(scPosition: Vector2D, sunPosition: Vector2D, earthPosition: Vector2D, earthRadius: number, sunRadius: number): boolean;