Skip to main content

Class: RadiusToFixLegCalculator

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:540

Calculates flight path vectors for radius to fix legs.

Extends

Constructors

Constructor

new RadiusToFixLegCalculator(facilityCache): RadiusToFixLegCalculator

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:460

Constructor.

Parameters

ParameterTypeDescription
facilityCacheMap<string, Facility>This calculator's cache of facilities.

Returns

RadiusToFixLegCalculator

Inherited from

TurnToFixLegCalculator.constructor

Properties

circleVectorBuilder

protected readonly circleVectorBuilder: CircleVectorBuilder

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:454

Inherited from

TurnToFixLegCalculator.circleVectorBuilder


facilityCache

protected readonly facilityCache: Map<string, Facility>

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:43

This calculator's cache of facilities.

Inherited from

TurnToFixLegCalculator.facilityCache


geoCircleCache

protected readonly geoCircleCache: GeoCircle[]

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:452

Inherited from

TurnToFixLegCalculator.geoCircleCache


geoPointCache

protected readonly geoPointCache: GeoPoint[]

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:541

Overrides

TurnToFixLegCalculator.geoPointCache


skipWhenActive

protected readonly skipWhenActive: boolean = false

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:43

Whether this calculator will skip calculations for active legs when the leg has already been calculated. False by default.

Inherited from

TurnToFixLegCalculator.skipWhenActive


vec3Cache

protected readonly vec3Cache: Float64Array[]

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:450

Inherited from

TurnToFixLegCalculator.vec3Cache

Methods

calculate()

calculate(legs, calculateIndex, activeLegIndex, state, resolveIngressToEgress): LegCalculations

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:109

Calculates flight path vectors for a flight plan leg and adds the calculations to the leg.

Parameters

ParameterTypeDefault valueDescription
legsLegDefinition[]undefinedA sequence of flight plan legs.
calculateIndexnumberundefinedThe index of the leg to calculate.
activeLegIndexnumberundefinedThe index of the active leg.
stateFlightPathStateundefinedThe current flight path state.
resolveIngressToEgressbooleantrue-

Returns

LegCalculations

The flight plan leg calculations.

Inherited from

TurnToFixLegCalculator.calculate


calculateMagVar()

protected calculateMagVar(legs, calculateIndex): void

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:465

Calculates the magnetic variation for a flight plan leg.

Parameters

ParameterTypeDescription
legsLegDefinition[]A sequence of flight plan legs.
calculateIndexnumberThe index of the leg to calculate.

Returns

void

The number of vectors added to the sequence.

Inherited from

TurnToFixLegCalculator.calculateMagVar


calculateVectors()

protected calculateVectors(legs, calculateIndex, activeLegIndex, state): void

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:477

Calculates flight path vectors for a flight plan leg.

Parameters

ParameterTypeDescription
legsLegDefinition[]A sequence of flight plan legs.
calculateIndexnumberThe index of the leg to calculate.
activeLegIndexnumberThe index of the active leg.
stateFlightPathStateThe current flight path state.

Returns

void

The number of vectors added to the sequence.

Inherited from

TurnToFixLegCalculator.calculateVectors


getLegMagVar()

protected getLegMagVar(leg, point): number

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:81

Gets the magnetic variation, in degrees, to use when calculating a flight plan leg's course. If the leg defines an origin or fix VOR facility, then the magnetic variation defined at the VOR is used. Otherwise the computed magnetic variation for the specified point is used.

Parameters

ParameterTypeDescription
legFlightPlanLegA flight plan leg.
pointLatLonInterfaceThe location from which to get magnetic variation, if an origin VOR is not found.

Returns

number

The magnetic variation, in degrees, to use when calculating the specified flight plan leg's course.

Inherited from

TurnToFixLegCalculator.getLegMagVar


getLegTrueCourse()

protected getLegTrueCourse(leg, point): number

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:100

Gets the true course, in degrees, for a flight plan leg. If the leg defines an origin or fix VOR facility, then the magnetic variation defined at the VOR is used to adjust magnetic course. Otherwise the computed magnetic variation for the specified point is used.

Parameters

ParameterTypeDescription
legFlightPlanLegA flight plan leg.
pointLatLonInterfaceThe location from which to get magnetic variation, if an origin VOR is not found.

Returns

number

The true course, in degrees, for the flight plan leg.

Inherited from

TurnToFixLegCalculator.getLegTrueCourse


getPositionFromIcao()

protected getPositionFromIcao(icao, out): undefined | GeoPoint

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:52

Gets a geographical position from an ICAO string.

Parameters

ParameterTypeDescription
icaostringAn ICAO string.
outGeoPointA GeoPoint object to which to write the result.

Returns

undefined | GeoPoint

The geographical position corresponding to the ICAO string, or undefined if one could not be obtained.

Inherited from

TurnToFixLegCalculator.getPositionFromIcao


getTerminatorPosition()

protected getTerminatorPosition(leg, icao, out): undefined | GeoPoint

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:64

Gets the geographic position for a flight plan leg terminator.

Parameters

ParameterTypeDescription
legFlightPlanLegA flight plan leg.
icaostringThe ICAO string of the leg's terminator fix.
outGeoPointA GeoPoint object to which to write the result.

Returns

undefined | GeoPoint

The position of the leg terminator, or undefined if it could not be determined.

Inherited from

TurnToFixLegCalculator.getTerminatorPosition


getTurnCenter()

protected getTurnCenter(leg): undefined | LatLonInterface

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:544

Gets the center of the turn defined by a flight plan leg.

Parameters

ParameterTypeDescription
legFlightPlanLegA flight plan leg.

Returns

undefined | LatLonInterface

The center of the turn defined by the flight plan leg, or undefined if it could not be determined.

Overrides

TurnToFixLegCalculator.getTurnCenter


getTurnRadius()

protected getTurnRadius(leg, center): undefined | number

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:549

Gets the radius of the turn defined by a flight plan leg.

Parameters

ParameterTypeDescription
legFlightPlanLegA flight plan leg.
centerLatLonInterfaceThe center of the turn.

Returns

undefined | number

The radius of the turn defined by the flight plan leg, or undefined if it could not be determined.

Overrides

TurnToFixLegCalculator.getTurnRadius


resolveIngressToEgress()

protected resolveIngressToEgress(legCalc): void

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:207

Calculates the ingress to egress vectors for a flight plan leg and adds them to a leg calculation.

Parameters

ParameterTypeDescription
legCalcLegCalculationsThe calculations for a flight plan leg.

Returns

void

Inherited from

TurnToFixLegCalculator.resolveIngressToEgress


shouldSkipWhenActive()

protected shouldSkipWhenActive(legs, calculateIndex, activeLegIndex, state): boolean

Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:178

Checks whether vector calculations should be skipped when the leg to calculate is the active leg.

Parameters

ParameterTypeDescription
legsLegDefinition[]A sequence of flight plan legs.
calculateIndexnumberThe index of the leg to calculate.
activeLegIndexnumberThe index of the active leg.
stateFlightPathStateThe current flight path state.

Returns

boolean

Whether to skip vector calculations.

Inherited from

TurnToFixLegCalculator.shouldSkipWhenActive