UNPKG

aviation-math

Version:

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

22 lines (21 loc) 879 B
import { Degrees, TurnDirection } from "./common"; /** * Returns the delta of inbound and outbound course. * If the turn direction is given, 359 degree turns * are possible at max. If no turn direction is omitted, * less than 180 degree turns are possible. * * @example * let delta = getCourseDelta( * 180, // inbound course * 90 // outbound course * ); * // delta = -90 // left turn, no initial turn direction given * * @param inboundCourse Initial course inbound * @param outboundCourse Eventual course outbound * @param turnDirection Optional direction of turn (left or right) * @returns The delta between inbound and outbound course. Negative results * indicate a left turn, positive results indicate a right turn. */ export declare function getCourseDelta(inboundCourse: Degrees, outboundCourse: Degrees, turnDirection?: TurnDirection): Degrees;