Class: CourseToInterceptLegCalculator
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:1078
Calculates flight path vectors for course to intercept legs.
Extends
Constructors
Constructor
new CourseToInterceptLegCalculator(
facilityCache
):CourseToInterceptLegCalculator
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:1083
Constructor.
Parameters
Parameter | Type | Description |
---|---|---|
facilityCache | Map <string , Facility > | This calculator's cache of facilities. |
Returns
CourseToInterceptLegCalculator
Overrides
CircleInterceptLegCalculator
.constructor
Properties
facilityCache
protected
readonly
facilityCache:Map
<string
,Facility
>
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:43
This calculator's cache of facilities.
Inherited from
CircleInterceptLegCalculator
.facilityCache
includeInitialTurn
protected
readonly
includeInitialTurn:boolean
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:609
Whether this calculator should calculate an initial turn toward the intercept course.
Inherited from
CircleInterceptLegCalculator
.includeInitialTurn
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
CircleInterceptLegCalculator
.skipWhenActive
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
Parameter | Type | Default value | Description |
---|---|---|---|
legs | LegDefinition [] | undefined | A sequence of flight plan legs. |
calculateIndex | number | undefined | The index of the leg to calculate. |
activeLegIndex | number | undefined | The index of the active leg. |
state | FlightPathState | undefined | The current flight path state. |
resolveIngressToEgress | boolean | true | - |
Returns
The flight plan leg calculations.
Inherited from
CircleInterceptLegCalculator
.calculate
calculateMagVar()
protected
calculateMagVar(legs
,calculateIndex
,activeLegIndex
,state
):void
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:1088
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. |
Returns
void
The number of vectors added to the sequence.
Overrides
CircleInterceptLegCalculator
.calculateMagVar
calculateVectors()
protected
calculateVectors(legs
,calculateIndex
,activeLegIndex
,state
):void
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:614
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. |
Returns
void
The number of vectors added to the sequence.
Inherited from
CircleInterceptLegCalculator
.calculateVectors
getInterceptCourse()
protected
getInterceptCourse(legs
,index
,state
):undefined
|number
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:1101
Gets the true intercept course bearing defined by a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
legs | LegDefinition [] | A sequence of leg definitions. |
index | number | The index in the sequence of the leg from which to get the course. |
state | FlightPathState | The current flight path state. |
Returns
undefined
| number
The true intercept course bearing defined by the flight plan leg, or undefined if it could not be determined.
Overrides
CircleInterceptLegCalculator
.getInterceptCourse
getInterceptPathInfo()
protected
getInterceptPathInfo(legs
,index
,state
,out
):CircleInterceptPathInfo
Defined in: src/sdk/flightplan/FlightPathLegCalculator.ts:1107
Gets the geo circle path to intercept defined by a flight plan leg.
Parameters
Parameter | Type | Description |
---|---|---|
legs | LegDefinition [] | A sequence of leg definitions. |
index | number | The index in the sequence of the leg from which to get the course. |
state | FlightPathState | The current flight path state. |
out | CircleInterceptPathInfo | The path info object to which to write the result. |
Returns
Information on the geo circle path to intercept defined by the flight plan leg.
Overrides
CircleInterceptLegCalculator
.getInterceptPathInfo
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
Parameter | Type | Description |
---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
point | LatLonInterface | The 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
CircleInterceptLegCalculator
.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
Parameter | Type | Description |
---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
point | LatLonInterface | The 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
CircleInterceptLegCalculator
.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
Parameter | Type | Description |
---|---|---|
icao | string | An ICAO string. |
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.
Inherited from
CircleInterceptLegCalculator
.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
Parameter | Type | Description |
---|---|---|
leg | FlightPlanLeg | A flight plan leg. |
icao | string | The ICAO string of the leg's terminator fix. |
out | GeoPoint | A 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
CircleInterceptLegCalculator
.getTerminatorPosition
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
Parameter | Type | Description |
---|---|---|
legCalc | LegCalculations | The calculations for a flight plan leg. |
Returns
void
Inherited from
CircleInterceptLegCalculator
.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
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. |
Returns
boolean
Whether to skip vector calculations.