UNPKG

aviation-math

Version:

Different methods to calculate distances, bearing and projections for aviation related software

29 lines (28 loc) 1.13 kB
import { Position } from "./position"; export type Radians = number; export type Degrees = number; export type DegreesMagnetic = Degrees; export type DegreesTrue = Degrees; export type Feet = number; export type FeetPerMinute = number; export type Knots = number; export type Latitude = Degrees; export type Longitude = Degrees; export type Metres = number; export type Minutes = number; export type NauticalMiles = number; export declare function clampAngle(angle: DegreesTrue): DegreesTrue; export declare function DegToRad(value: Degrees): Radians; export declare function RadToDeg(value: Radians): Degrees; export declare function robustAcos(value: number): number; export declare function coordinatesToSpherical(location: Position): number[]; export declare function sphericalToCoordinates(spherical: [number, number, number]): Position; export declare const MIN_LAT: Latitude; export declare const MAX_LAT: Latitude; export declare const MIN_LON: Longitude; export declare const MAX_LON: Longitude; export declare const EARTH_RADIUS: NauticalMiles; export declare enum TurnDirection { LEFT = "LEFT", RIGHT = "RIGHT" }