Skip to main content

Class: TestingUtils

A set of functions for modifying a flight plan in the simplest way possible.

Constructors

constructor

new TestingUtils(): TestingUtils

Returns

TestingUtils

Methods

directToRandom

directToRandom(fms, ident, course?): Promise<Facility>

Creates a direct to random to the given ident.

Parameters

NameTypeDescription
fmsFms<any>The Fms.
identstringThe ident.
course?numberThe magnetic course for the Direct To. If undefined, the Direct To will be initiated from the airplane's present position.

Returns

Promise<Facility>

The facility matching the ident.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:362


findNearestFacilityFromIdent

findNearestFacilityFromIdent(fms, ident, facilityType?): Promise<Facility>

Searches for facilities matching ident, returns the nearest one.

Parameters

NameTypeDefault valueDescription
fmsFms<any>undefinedThe FMS.
identstringundefinedThe ident to search for.
facilityTypeFacilitySearchTypeFacilitySearchType.AllThe facility type to search for.

Returns

Promise<Facility>

The selected facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:175


findNearestIntersectionFromIdent

findNearestIntersectionFromIdent(fms, ident): Promise<IntersectionFacility>

Searches for facilities matching ident, returns the nearest one.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
identstringThe intersection ident to search for.

Returns

Promise<IntersectionFacility>

The selected facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:164


getAirwayFromLeg

getAirwayFromLeg(fms, entryIdent, airwayName): Promise<AirwayObject>

Checks for an airway at a leg and returns the airway.

Parameters

NameTypeDescription
fmsFms<any>The Fms.
entryIdentstringThe icao of the entry to check.
airwayNamestringThe airway to search for.

Returns

Promise<AirwayObject>

The airway object.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:146


insertAirway

insertAirway(fms, airwayName, entryIdent, exitIdent, segmentIndex, segmentLegIndex): Promise<[AirwayObject, IntersectionFacility, IntersectionFacility]>

Sets the destination for the flight plan.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
airwayNamestringThe name of the airway.
entryIdentstringThe ident for the airway entry.
exitIdentstringThe ident for the airway exit.
segmentIndexnumberThe index of the segment to add the waypoint to.
segmentLegIndexnumberThe index inside the segment to insert the waypoint at (if none, append).

Returns

Promise<[AirwayObject, IntersectionFacility, IntersectionFacility]>

The destination facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:122


insertWaypoint

insertWaypoint(fms, ident, segmentIndex, segmentLegIndex?): Promise<Facility>

Sets the destination for the flight plan.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
identstringThe ident to search for.
segmentIndexnumberThe index of the segment to add the waypoint to.
segmentLegIndex?numberThe index inside the segment to insert the waypoint at (if none, append).

Returns

Promise<Facility>

The destination facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:104


loadApproach

loadApproach(fms, destination, approachName, transitionName?): Promise<void>

Loads an approach.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
destinationAirportFacilityThe destination facility. Get this by calling setDestination first.
approachNamestringThe name of the approach, like 'ILS 17L'.
transitionName?stringThe name of the approach transition, like 'BRK' or 'ADANE'.

Returns

Promise<void>

Throws

Error if something couldn't be found with given inputs.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:326


loadArrival

loadArrival(fms, destination, arrivalName, transitionName?, runwayTransitionName?): void

Loads an arrival.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
destinationAirportFacilityThe destination facility. Get this by calling setDestination first.
arrivalNamestringThe name of the arrival, like 'DBRY4'.
transitionName?stringThe name of the arrival transition, like 'ALS'.
runwayTransitionName?stringThe name of the arrival runway transition, like '17R'.

Returns

void

Throws

Error if something couldn't be found with given inputs.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:274


loadDeparture

loadDeparture(fms, origin, departureName, runwayName, transitionName?): void

Loads a departure.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
originAirportFacilityThe origin facility. Get this by calling setOrigin first.
departureNamestringThe departure name, like 'BAYLR6'.
runwayNamestringThe name of the runway, like '34L'.
transitionName?stringThe name of the enroute transition, like 'HBU'.

Returns

void

Throws

Error if something couldn't be found with given inputs.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:219


removeDestination

removeDestination(fms): void

Removes the destination.

Parameters

NameTypeDescription
fmsFms<any>The FMS.

Returns

void

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:92


removeOrigin

removeOrigin(fms): void

Removes the origin.

Parameters

NameTypeDescription
fmsFms<any>The FMS.

Returns

void

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:84


setDestination

setDestination(fms, ident): Promise<AirportFacility>

Sets the destination for the flight plan.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
identstringThe ICAO to set, like 'KCOS'.

Returns

Promise<AirportFacility>

The destination facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:67


setOrigin

setOrigin(fms, ident): Promise<AirportFacility>

Sets the origin for the flight plan.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
identstringThe ICAO to set, like 'KDEN'.

Returns

Promise<AirportFacility>

The origin facility.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:18


setOriginRunway

setOriginRunway(fms, origin, runwayName): OneWayRunway

Sets the origin for the flight plan.

Parameters

NameTypeDescription
fmsFms<any>The FMS.
originAirportFacilityThe origin facility. Get this by calling setOrigin first.
runwayNamestringThe runway to set, like '34L'.

Returns

OneWayRunway

The runway.

Throws

Error if runway couldn't be found with given inputs.

Defined in

src/workingtitle-instruments-g3000/html_ui/Pages/VCockpit/Instruments/NavSystems/WTG3000/Shared/TestingUtils/TestingUtils.ts:41