Skip to main content

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​

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
distancenumberthe 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​

ParameterTypeDescription
fmsWT21Fmsthe WT21Fms instance
selectWptFromIdent(ident, refPos) => Promise<null | Facility>the function called to select a facility
scratchpadContentsstringthe scratchpad contents
targetGlobalLegIndex?numberthe 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​

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


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​

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​

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​

ParameterTypeDescription
facilitiesUserFacility[]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​

ParameterTypeDescription
facilitiesUserFacility[]the existing user facilities
identstringthe 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​

ParameterTypeDescription
strstringthe 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​

ParameterTypeDescription
strstringthe 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​

ParameterTypeDescription
strstringthe string to parse

Returns​

null | PlaceBearingPlaceBearingInput

a PlaceBearingPlaceBearingInput object if a valid PBPB definition and null otherwise