Skip to main content

Class: WT21PilotWaypointUtils

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:176

Utilities for WT21 pilot defined waypoints

Constructors​

Constructor​

new WT21PilotWaypointUtils(): WTLinePilotWaypointUtils

Returns​

WTLinePilotWaypointUtils

Methods​

createAlongTrackOffset()​

static createAlongTrackOffset(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​

ParameterTypeDescription
facLoaderFacilityLoaderthe facility loader
planFlightPlanthe flight plan the ATO is being created from
globalLegIndexnumberthe global leg index in the plan the ATO is being created from (WT21: LSK position)
lnavActiveLegIndexnumberthe active lnav leg index (not nominal)
lnavDistanceAlongActiveLegnumberthe distance flown along the active lnav leg
inputPlaceIdentstringthe place ident given as an input
inputDistancenumberthe distance given as an input

Returns​

Promise<[GeoPoint, boolean] | AlongTrackOffsetError>

a GeoPoint


createFromScratchpadEntry()​

static createFromScratchpadEntry<T>(fms, selectWptFromIdent, scratchpadContents, targetGlobalLegIndex?): Promise<[UserFacility, boolean] | null>

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 ParameterDefault type
T extends FlightPlanIndexTypes<number, number>WTLineLegacyFlightPlanIndexTypes

Parameters​

ParameterTypeDescription
fmsWTLineFms<T>the WTLineFms instance
selectWptFromIdent(ident, refPos) => Promise<Facility | null>the function called to select a facility
scratchpadContentsstringthe scratchpad contents
targetGlobalLegIndex?numberthe target global leg index, if applicable

Returns​

Promise<[UserFacility, boolean] | null>

a user facility, or null if none is parsed

Deprecated​

Does not return all possible matches - use parseFromString instead


createPlaceBearingDistance()​

static createPlaceBearingDistance(facility, bearing, bearingTrue, distance): GeoPoint

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:459

Creates a PB/D position with input data

Parameters​

ParameterTypeDescription
facilityFacilitythe facility representing the origin
bearingnumberthe bearing to use
bearingTruebooleanwhether the bearing is already provided in TRUE form
distancenumberthe distance to use

Returns​

GeoPoint

a GeoPoint

Deprecated​

use FacilityUtils methods instead


createPlaceBearingPlaceBearing()​

static createPlaceBearingPlaceBearing(facilityA, bearingA, facilityB, bearingB): GeoPoint | null

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:524

Creates a PB/PB position with input data

Parameters​

ParameterTypeDescription
facilityAFacilitythe facility representing the first origin
bearingAnumberthe bearing to use from the first origin
facilityBFacilitythe facility representing the second origin
bearingBnumberthe distance to use from the second origin

Returns​

GeoPoint | null

a GeoPoint

Deprecated​

use FacilityUtils methods instead


isLimitReached()​

static isLimitReached(facilities): boolean

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:186

Returns whether the limit number of pilot defined waypoints is reached

Parameters​

ParameterTypeDescription
facilitiesreadonly FacilityWaypoint<UserFacility>[]the existing user facilities

Returns​

boolean

a boolean


nextAutoGeneratedName()​

static nextAutoGeneratedName(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​

ParameterTypeDescription
pilotDefinedWaypointsreadonly (UserFacility | FacilityWaypoint<UserFacility>)[]the existing pilot-defined waypoints
identstringthe 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()​

static parseAlongTrackOffset(str): AlongTrackOffsetInput | null

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:564

Parses a string according to the along-track offset format

Parameters​

ParameterTypeDescription
strstringthe string to parse

Returns​

AlongTrackOffsetInput | null

a AlongTrackOffsetInput object if a valid ATO definition and null otherwise


parseFromString()​

static parseFromString<T>(fms, selectWptFromIdent, scratchpadContents, targetGlobalLegIndex?): Promise<PilotWaypointError | PilotWaypointResult[] | null>

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:224

Converts a textual user waypoint entry to a UserFacility if applicable

Type Parameters​

Type ParameterDefault type
T extends FlightPlanIndexTypes<number, number>WTLineLegacyFlightPlanIndexTypes

Parameters​

ParameterTypeDescription
fmsWTLineFms<T>the WTLineFms instance
selectWptFromIdent(ident, refPos) => Promise<Facility | null>the function called to select a facility
scratchpadContentsstringthe scratchpad contents
targetGlobalLegIndex?numberthe target global leg index, if applicable

Returns​

Promise<PilotWaypointError | PilotWaypointResult[] | null>

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()​

static parsePlaceBearingDistance(str): PlaceBearingDistanceInput | null

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:420

Parses a string according to the PB/D format

Parameters​

ParameterTypeDescription
strstringthe string to parse

Returns​

PlaceBearingDistanceInput | null

a PlaceBearingDistanceInput object if a valid PBD definition and null otherwise


parsePlaceBearingPlaceBearing()​

static parsePlaceBearingPlaceBearing(str): PlaceBearingPlaceBearingInput | null

Defined in: wtlinesdk/navigation/WTLinePilotWaypointUtils.ts:489

Parses a string according to the PB/PB format

Parameters​

ParameterTypeDescription
strstringthe string to parse

Returns​

PlaceBearingPlaceBearingInput | null

a PlaceBearingPlaceBearingInput object if a valid PBPB definition and null otherwise