Class: TestingUtils
A set of functions for modifying a flight plan in the simplest way possible.
Constructors
constructor
• new TestingUtils(): TestingUtils
Returns
Methods
directToRandom
▸ directToRandom(fms
, ident
, course?
): Promise
<Facility
>
Creates a direct to random to the given ident.
Parameters
Name | Type | Description |
---|---|---|
fms | Fms <any > | The Fms. |
ident | string | The ident. |
course? | number | The 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
Name | Type | Default value | Description |
---|---|---|---|
fms | Fms <any > | undefined | The FMS. |
ident | string | undefined | The ident to search for. |
facilityType | FacilitySearchType | FacilitySearchType.All | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
ident | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The Fms. |
entryIdent | string | The icao of the entry to check. |
airwayName | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
airwayName | string | The name of the airway. |
entryIdent | string | The ident for the airway entry. |
exitIdent | string | The ident for the airway exit. |
segmentIndex | number | The index of the segment to add the waypoint to. |
segmentLegIndex | number | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
ident | string | The ident to search for. |
segmentIndex | number | The index of the segment to add the waypoint to. |
segmentLegIndex? | number | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
destination | AirportFacility | The destination facility. Get this by calling setDestination first. |
approachName | string | The name of the approach, like 'ILS 17L'. |
transitionName? | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
destination | AirportFacility | The destination facility. Get this by calling setDestination first. |
arrivalName | string | The name of the arrival, like 'DBRY4'. |
transitionName? | string | The name of the arrival transition, like 'ALS'. |
runwayTransitionName? | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
origin | AirportFacility | The origin facility. Get this by calling setOrigin first. |
departureName | string | The departure name, like 'BAYLR6'. |
runwayName | string | The name of the runway, like '34L'. |
transitionName? | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <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
Name | Type | Description |
---|---|---|
fms | Fms <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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
ident | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
ident | string | The 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
Name | Type | Description |
---|---|---|
fms | Fms <any > | The FMS. |
origin | AirportFacility | The origin facility. Get this by calling setOrigin first. |
runwayName | string | The 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