Class: TestingUtils
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:10
A set of functions for modifying a flight plan in the simplest way possible.
Constructors
Constructor
new TestingUtils():
TestingUtils
Returns
TestingUtils
Methods
directToRandom()
staticdirectToRandom(fms,ident,course?):Promise<Facility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:362
Creates a direct to random to the given ident.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
findNearestFacilityFromIdent()
staticfindNearestFacilityFromIdent(fms,ident,facilityType):Promise<Facility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:175
Searches for facilities matching ident, returns the nearest one.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
fms | Fms | 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.
findNearestIntersectionFromIdent()
staticfindNearestIntersectionFromIdent(fms,ident):Promise<IntersectionFacility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:164
Searches for facilities matching ident, returns the nearest one.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The FMS. |
ident | string | The intersection ident to search for. |
Returns
Promise<IntersectionFacility>
The selected facility.
getAirwayFromLeg()
staticgetAirwayFromLeg(fms,entryIdent,airwayName):Promise<AirwayObject>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:146
Checks for an airway at a leg and returns the airway.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The Fms. |
entryIdent | string | The icao of the entry to check. |
airwayName | string | The airway to search for. |
Returns
Promise<AirwayObject>
The airway object.
insertAirway()
staticinsertAirway(fms,airwayName,entryIdent,exitIdent,segmentIndex,segmentLegIndex):Promise<[AirwayObject,IntersectionFacility,IntersectionFacility]>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:122
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
insertWaypoint()
staticinsertWaypoint(fms,ident,segmentIndex,segmentLegIndex?):Promise<Facility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:104
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
loadApproach()
staticloadApproach(fms,destination,approachName,transitionName?):Promise<void>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:326
Loads an approach.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
loadArrival()
staticloadArrival(fms,destination,arrivalName,transitionName?,runwayTransitionName?):void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:274
Loads an arrival.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
loadDeparture()
staticloadDeparture(fms,origin,departureName,runwayName,transitionName?):void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:219
Loads a departure.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.
removeDestination()
staticremoveDestination(fms):void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:92
Removes the destination.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The FMS. |
Returns
void
removeOrigin()
staticremoveOrigin(fms):void
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:84
Removes the origin.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The FMS. |
Returns
void
setDestination()
staticsetDestination(fms,ident):Promise<AirportFacility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:67
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The FMS. |
ident | string | The ICAO to set, like 'KCOS'. |
Returns
Promise<AirportFacility>
The destination facility.
setOrigin()
staticsetOrigin(fms,ident):Promise<AirportFacility>
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:18
Sets the origin for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | The FMS. |
ident | string | The ICAO to set, like 'KDEN'. |
Returns
Promise<AirportFacility>
The origin facility.
setOriginRunway()
staticsetOriginRunway(fms,origin,runwayName):OneWayRunway
Defined in: src/workingtitle-instruments-g3000/html_ui/Shared/TestingUtils/TestingUtils.ts:41
Sets the origin for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Fms | 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.