Class: DevPlanUtils
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:11
A set of functions for modifying a flight plan in the simplest way possible.
Constructors
Constructor
new DevPlanUtils():
DevPlanUtils
Returns
DevPlanUtils
Methods
findNearestFacilityFromIdent()
staticfindNearestFacilityFromIdent(fms,ident,facilityType):Promise<Facility>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:176
Searches for facilities matching ident, returns the nearest one.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
fms | Epic2Fms | 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: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:165
Searches for facilities matching ident, returns the nearest one.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
ident | string | The intersection ident to search for. |
Returns
Promise<IntersectionFacility>
The selected facility.
getAirwayFromLeg()
staticgetAirwayFromLeg(fms,entryIdent,airwayName):Promise<AirwayData>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:147
Checks for an airway at a leg and returns the airway.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The Fms. |
entryIdent | string | The icao of the entry to check. |
airwayName | string | The airway to search for. |
Returns
Promise<AirwayData>
The airway object.
insertAirway()
staticinsertAirway(fms,airwayName,entryIdent,exitIdent,segmentIndex,segmentLegIndex):Promise<[AirwayData,IntersectionFacility,IntersectionFacility]>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:123
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | 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<[AirwayData, IntersectionFacility, IntersectionFacility]>
The destination facility.
insertWaypoint()
staticinsertWaypoint(fms,ident,segmentIndex,segmentLegIndex?):Promise<Facility>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:105
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | 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: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:327
Loads an approach.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | 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: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:275
Loads an arrival.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | 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: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:220
Loads a departure.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | 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: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:93
Removes the destination.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
Returns
void
removeOrigin()
staticremoveOrigin(fms):void
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:85
Removes the origin.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
Returns
void
setDestination()
staticsetDestination(fms,ident):Promise<AirportFacility>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:68
Sets the destination for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
ident | string | The ICAO to set, like 'KCOS'. |
Returns
Promise<AirportFacility>
The destination facility.
setOrigin()
staticsetOrigin(fms,ident):Promise<AirportFacility>
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:19
Sets the origin for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
ident | string | The ICAO to set, like 'KDEN'. |
Returns
Promise<AirportFacility>
The origin facility.
setOriginRunway()
staticsetOriginRunway(fms,origin,runwayName):OneWayRunway
Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:42
Sets the origin for the flight plan.
Parameters
| Parameter | Type | Description |
|---|---|---|
fms | Epic2Fms | The FMS. |
origin | AirportFacility | The origin facility. Get this by calling setOrigin first. |
runwayName | string | The runway to set, like '34L'. |
Returns
The runway.
Throws
Error if runway couldn't be found with given inputs.