Class: WTLinePilotWaypointUtils
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:176
Utilities for WT21 pilot defined waypoints
Constructors
Constructor
new WTLinePilotWaypointUtils():
WTLinePilotWaypointUtils
Returns
WTLinePilotWaypointUtils
Methods
createAlongTrackOffset()
staticcreateAlongTrackOffset(facLoader,plan,globalLegIndex,lnavActiveLegIndex,lnavDistanceAlongActiveLeg,inputPlaceIdent,inputDistance):Promise<[GeoPoint,boolean] |AlongTrackOffsetError>
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:591
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 |
inputPlaceIdent | string | the place ident given as an input |
inputDistance | number | the distance given as an input |
Returns
Promise<[GeoPoint, boolean] | AlongTrackOffsetError>
a GeoPoint
createFromScratchpadEntry()
staticcreateFromScratchpadEntry<T>(fms,selectWptFromIdent,scratchpadContents,targetGlobalLegIndex?):Promise<null| [UserFacility,boolean]>
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:381
Converts a scratchpad entry made on a provided CDU page to a UserFacility if applicable
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends FlightPlanIndexTypes<number, number> | WTLineLegacyFlightPlanIndexTypes |
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | WTLineFms<T> | the WTLineFms 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
Deprecated
Does not return all possible matches - use parseFromString instead
createPlaceBearingDistance()
staticcreatePlaceBearingDistance(facility,bearing,bearingTrue,distance):GeoPoint
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:459
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
a GeoPoint
Deprecated
use FacilityUtils methods instead
createPlaceBearingPlaceBearing()
staticcreatePlaceBearingPlaceBearing(facilityA,bearingA,facilityB,bearingB):null|GeoPoint
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:524
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
Deprecated
use FacilityUtils methods instead
isLimitReached()
staticisLimitReached(facilities):boolean
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:186
Returns whether the limit number of pilot defined waypoints is reached
Parameters
| Parameter | Type | Description |
|---|---|---|
facilities | readonly FacilityWaypoint<UserFacility>[] | the existing user facilities |
Returns
boolean
a boolean
nextAutoGeneratedName()
staticnextAutoGeneratedName(pilotDefinedWaypoints,ident):string
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:198
Returns the next available auto-generated name, given existing pilot-defined waypoints and an ident
Parameters
| Parameter | Type | Description |
|---|---|---|
pilotDefinedWaypoints | readonly (UserFacility | FacilityWaypoint<UserFacility>)[] | the existing pilot-defined waypoints |
ident | string | the ident of the reference facility to get a name for |
Returns
string
a string to be used as an ident for a user facility
parseAlongTrackOffset()
staticparseAlongTrackOffset(str):null|AlongTrackOffsetInput
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:564
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
parseFromString()
staticparseFromString<T>(fms,selectWptFromIdent,scratchpadContents,targetGlobalLegIndex?):Promise<null|PilotWaypointError|PilotWaypointResult[]>
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:224
Converts a textual user waypoint entry to a UserFacility if applicable
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends FlightPlanIndexTypes<number, number> | WTLineLegacyFlightPlanIndexTypes |
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | WTLineFms<T> | the WTLineFms 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 | PilotWaypointError | PilotWaypointResult[]>
an array of possible interpretations of the entry as a pilot waypoint; or an error encountered while parsing the pilot waypoint; or `null``, if no format was matched
parsePlaceBearingDistance()
staticparsePlaceBearingDistance(str):null|PlaceBearingDistanceInput
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:420
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()
staticparsePlaceBearingPlaceBearing(str):null|PlaceBearingPlaceBearingInput
Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:489
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