Class: WT21PilotWaypointUtils
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:102
Utilities for WT21 pilot defined waypoints
Constructors
Constructor
new WT21PilotWaypointUtils():
WT21PilotWaypointUtils
Returns
WT21PilotWaypointUtils
Methods
createAlongTrackOffset()
static
createAlongTrackOffset(facLoader
,plan
,globalLegIndex
,lnavActiveLegIndex
,lnavDistanceAlongActiveLeg
,distance
):Promise
<[GeoPoint
,boolean
] |AlongTrackOffsetError
>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:425
Creates an along-track offset position with input data
Parameters
Parameter | Type | Description |
---|---|---|
facLoader | FacilityLoader | the facility loader |
plan | FlightPlan | the flight plan the ATO is being created from |
globalLegIndex | number | the global leg index in the plan the ATO is being created from (WT21: LSK position) |
lnavActiveLegIndex | number | the active lnav leg index (not nominal) |
lnavDistanceAlongActiveLeg | number | the distance flown along the active lnav leg |
distance | number | the distance input |
Returns
Promise
<[GeoPoint
, boolean
] | AlongTrackOffsetError
>
a GeoPoint
createFromScratchpadEntry()
static
createFromScratchpadEntry(fms
,selectWptFromIdent
,scratchpadContents
,targetGlobalLegIndex?
):Promise
<null
| [UserFacility
,boolean
]>
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:146
Converts a scratchpad entry made on a provided CDU page to a UserFacility if applicable
Parameters
Parameter | Type | Description |
---|---|---|
fms | WT21Fms | the WT21Fms instance |
selectWptFromIdent | (ident , refPos ) => Promise <null | Facility > | the function called to select a facility |
scratchpadContents | string | the scratchpad contents |
targetGlobalLegIndex? | number | the target global leg index, if applicable |
Returns
Promise
<null
| [UserFacility
, boolean
]>
a user facility, or null if none is parsed
createPlaceBearingDistance()
static
createPlaceBearingDistance(facility
,bearing
,bearingTrue
,distance
):GeoPoint
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:296
Creates a PB/D position with input data
Parameters
Parameter | Type | Description |
---|---|---|
facility | Facility | the facility representing the origin |
bearing | number | the bearing to use |
bearingTrue | boolean | whether the bearing is already provided in TRUE form |
distance | number | the distance to use |
Returns
GeoPoint
a GeoPoint
createPlaceBearingPlaceBearing()
static
createPlaceBearingPlaceBearing(facilityA
,bearingA
,facilityB
,bearingB
):null
|GeoPoint
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:359
Creates a PB/PB position with input data
Parameters
Parameter | Type | Description |
---|---|---|
facilityA | Facility | the facility representing the first origin |
bearingA | number | the bearing to use from the first origin |
facilityB | Facility | the facility representing the second origin |
bearingB | number | the distance to use from the second origin |
Returns
null
| GeoPoint
a GeoPoint
isLimitReached()
static
isLimitReached(facilities
):boolean
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:110
Returns whether the limit number of pilot defined waypoints is reached
Parameters
Parameter | Type | Description |
---|---|---|
facilities | UserFacility [] | the existing user facilities |
Returns
boolean
a boolean
nextAutoGeneratedName()
static
nextAutoGeneratedName(facilities
,ident
):string
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:122
Returns the next available auto-generated name, given existing user facilities and an ident
Parameters
Parameter | Type | Description |
---|---|---|
facilities | UserFacility [] | the existing user facilities |
ident | string | the ident of the facility |
Returns
string
a string to be used as an ident for a user facility
parseAlongTrackOffset()
static
parseAlongTrackOffset(str
):null
|AlongTrackOffsetInput
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:399
Parses a string according to the along-track offset format
Parameters
Parameter | Type | Description |
---|---|---|
str | string | the string to parse |
Returns
null
| AlongTrackOffsetInput
a AlongTrackOffsetInput object if a valid ATO definition and null
otherwise
parsePlaceBearingDistance()
static
parsePlaceBearingDistance(str
):null
|PlaceBearingDistanceInput
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:265
Parses a string according to the PB/D format
Parameters
Parameter | Type | Description |
---|---|---|
str | string | the string to parse |
Returns
null
| PlaceBearingDistanceInput
a PlaceBearingDistanceInput object if a valid PBD definition and null
otherwise
parsePlaceBearingPlaceBearing()
static
parsePlaceBearingPlaceBearing(str
):null
|PlaceBearingPlaceBearingInput
Defined in: workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Navigation/WT21PilotWaypointUtils.ts:326
Parses a string according to the PB/PB format
Parameters
Parameter | Type | Description |
---|---|---|
str | string | the string to parse |
Returns
null
| PlaceBearingPlaceBearingInput
a PlaceBearingPlaceBearingInput object if a valid PBPB definition and null
otherwise