Abstract Class: AbstractFlightPathLegCalculator
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:18
An abstract implementation of FlightPathLegCalculator.
Extended by
AltitudeLegCalculatorCircleInterceptLegCalculatorCourseToFixLegCalculatorDirectToFixLegCalculatorDiscontinuityLegCalculatorFixToDmeLegCalculatorFixToManualLegCalculatorHeadingToManualLegCalculatorHoldLegCalculatorNoPathLegCalculatorProcedureTurnLegCalculatorTrackFromFixLegCalculatorTrackToFixLegCalculatorTurnToFixLegCalculator
Implements
Constructors
Constructor
new AbstractFlightPathLegCalculator(
facilityCache,canSkipWhenActive):AbstractFlightPathLegCalculator
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:27
Creates a new instance of AbstractFlightPathLegCalculator.
Parameters
| Parameter | Type | Description |
|---|---|---|
facilityCache | FlightPathCalculatorFacilityCache | This calculator's cache of facilities. |
canSkipWhenActive | boolean | Whether this calculator can skip leg calculations when the leg to calculate is the active flight plan leg. |
Returns
AbstractFlightPathLegCalculator
Properties
canSkipWhenActive
protectedreadonlycanSkipWhenActive:boolean
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:29
Whether this calculator can skip leg calculations when the leg to calculate is the active flight plan leg.
facilityCache
protectedreadonlyfacilityCache:FlightPathCalculatorFacilityCache
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:28
This calculator's cache of facilities.
Methods
calculate()
calculate(
legs,calculateIndex,activeLegIndex,state,options):LegCalculations
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:223
Calculates flight path vectors for a flight plan leg and adds the calculations to the leg.
Parameters
| Parameter | Type | Description |
|---|---|---|
legs | LegDefinition[] | A sequence of flight plan legs. |
calculateIndex | number | The index of the leg to calculate. |
activeLegIndex | number | The index of the active leg. |
state | FlightPathState | The current flight path state. |
options | Readonly<FlightPathLegCalculationOptions> | Options to use for the calculation. |
Returns
The flight plan leg calculations.
Implementation of
FlightPathLegCalculator.calculate
calculateMagVar()
abstractprotectedcalculateMagVar(legs,calculateIndex,activeLegIndex,state,options):void
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:363
Calculates the magnetic variation for a flight plan leg.
Parameters
| Parameter | Type | Description |
|---|---|---|
legs | LegDefinition[] | A sequence of flight plan legs. |
calculateIndex | number | The index of the leg to calculate. |
activeLegIndex | number | The index of the active leg. |
state | FlightPathState | The current flight path state. |
options | Readonly<FlightPathLegCalculationOptions> | Options to use for the leg calculations. |
Returns
void
The number of vectors added to the sequence.
calculateVectors()
abstractprotectedcalculateVectors(legs,calculateIndex,activeLegIndex,state,options):void
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:380
Calculates flight path vectors for a flight plan leg.
Parameters
| Parameter | Type | Description |
|---|---|---|
legs | LegDefinition[] | A sequence of flight plan legs. |
calculateIndex | number | The index of the leg to calculate. |
activeLegIndex | number | The index of the active leg. |
state | FlightPathState | The current flight path state. |
options | Readonly<FlightPathLegCalculationOptions> | Options to use for the leg calculations. |
Returns
void
The number of vectors added to the sequence.
getLegMagVar()
Call Signature
protectedgetLegMagVar(leg):undefined|number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:134
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 database magnetic variation defined for the VOR is used (the origin facility takes priority).
Parameters
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
Returns
undefined | number
The magnetic variation, in degrees, to use when calculating the specified flight plan leg's course, or
undefined if the leg does not define an origin or fix VOR facility.
Call Signature
protectedgetLegMagVar(leg,defaultPoint):number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:143
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 database magnetic variation defined for the VOR is used (the origin facility takes priority). Otherwise, the model magnetic variation for the specified point is used.
Parameters
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
defaultPoint | LatLonInterface | The location from which to get magnetic variation if an origin or fix VOR is not found. |
Returns
number
The magnetic variation, in degrees, to use when calculating the specified flight plan leg's course.
Call Signature
protectedgetLegMagVar(leg,defaultPoint?):undefined|number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:153
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 database magnetic variation defined for the VOR is used (the origin facility takes priority). Otherwise, the model magnetic variation for the specified point, if defined, is used.
Parameters
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
defaultPoint? | LatLonInterface | The location from which to get magnetic variation if an origin or fix VOR is not found. |
Returns
undefined | number
The magnetic variation, in degrees, to use when calculating the specified flight plan leg's course, or
undefined if the leg does not define an origin or fix VOR facility and a default point was not provided.
getLegTrueCourse()
protectedgetLegTrueCourse(leg):undefined|number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:175
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
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
Returns
undefined | number
The true course, in degrees, for the flight plan leg.
getMagVarFromIcao()
protectedgetMagVarFromIcao(icao):undefined|number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:52
Gets the magnetic variation, in degrees, at a facility. If the facility is a VOR and it has a nominal database magnetic variation, then that value will be returned. Otherwise, the model magnetic variation at the facility's position will be returned.
Parameters
| Parameter | Type | Description |
|---|---|---|
icao | IcaoValue | The ICAO value of the facility. |
Returns
undefined | number
The magnetic variation, in degrees, at the specified facility, or undefined if the specified facility
could not be retrieved.
getPositionFromIcao()
protectedgetPositionFromIcao(icao,out):undefined|GeoPoint
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:39
Gets a geographical position from an ICAO value.
Parameters
| Parameter | Type | Description |
|---|---|---|
icao | IcaoValue | An ICAO value. |
out | GeoPoint | A 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.
getTerminatorMagVar()
protectedgetTerminatorMagVar(leg):undefined|number
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:118
Gets the magnetic variation, in degrees, at a flight plan leg's terminator fix. If the fix is a VOR and it has a nominal database magnetic variation, then that value will be returned. Otherwise, the model magnetic variation at the fix's position will be returned.
Parameters
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
Returns
undefined | number
The magnetic variation, in degrees, at the specified flight plan leg's terminator fix, or undefined if
the magnetic variation could not be determined.
getTerminatorPosition()
protectedgetTerminatorPosition(leg,out,icao?):undefined|GeoPoint
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:75
Gets the geographic position for a flight plan leg terminator.
Parameters
| Parameter | Type | Description |
|---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
out | GeoPoint | A GeoPoint object to which to write the result. |
icao? | IcaoValue | The ICAO value of the leg's terminator fix. If not defined, then the terminator fix will be retrieved from the flight plan leg, if necessary. |
Returns
undefined | GeoPoint
The position of the leg terminator, or undefined if it could not be determined.
resolveIngressToEgress()
protectedresolveIngressToEgress(legCalc):void
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:392
Calculates the ingress to egress vectors for a flight plan leg and adds them to a leg calculation.
Parameters
| Parameter | Type | Description |
|---|---|---|
legCalc | LegCalculations | The calculations for a flight plan leg. |
Returns
void
shouldSkipWhenActive()
protectedshouldSkipWhenActive(legs,calculateIndex,activeLegIndex,state,options):boolean
Defined in: src/sdk/flightplan/flightpath/legcalculators/AbstractFlightPathLegCalculator.ts:341
Checks whether vector calculations should be skipped when the leg to calculate is the active leg.
Parameters
| Parameter | Type | Description |
|---|---|---|
legs | LegDefinition[] | A sequence of flight plan legs. |
calculateIndex | number | The index of the leg to calculate. |
activeLegIndex | number | The index of the active leg. |
state | FlightPathState | The current flight path state. |
options | Readonly<FlightPathLegCalculationOptions> | Options to use for the leg calculations. |
Returns
boolean
Whether to skip vector calculations.