Skip to main content

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()

static findNearestFacilityFromIdent(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

ParameterTypeDefault valueDescription
fmsEpic2FmsundefinedThe FMS.
identstringundefinedThe ident to search for.
facilityTypeFacilitySearchTypeFacilitySearchType.AllThe facility type to search for.

Returns

Promise<Facility>

The selected facility.


findNearestIntersectionFromIdent()

static findNearestIntersectionFromIdent(fms, ident): Promise<IntersectionFacility>

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:165

Searches for facilities matching ident, returns the nearest one.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe FMS.
identstringThe intersection ident to search for.

Returns

Promise<IntersectionFacility>

The selected facility.


getAirwayFromLeg()

static getAirwayFromLeg(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

ParameterTypeDescription
fmsEpic2FmsThe Fms.
entryIdentstringThe icao of the entry to check.
airwayNamestringThe airway to search for.

Returns

Promise<AirwayData>

The airway object.


insertAirway()

static insertAirway(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

ParameterTypeDescription
fmsEpic2FmsThe 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<[AirwayData, IntersectionFacility, IntersectionFacility]>

The destination facility.


insertWaypoint()

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

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:105

Sets the destination for the flight plan.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe 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.


loadApproach()

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

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:327

Loads an approach.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe 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.


loadArrival()

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

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:275

Loads an arrival.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe 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.


loadDeparture()

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

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:220

Loads a departure.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe 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.


removeDestination()

static removeDestination(fms): void

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:93

Removes the destination.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe FMS.

Returns

void


removeOrigin()

static removeOrigin(fms): void

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:85

Removes the origin.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe FMS.

Returns

void


setDestination()

static setDestination(fms, ident): Promise<AirportFacility>

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:68

Sets the destination for the flight plan.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe FMS.
identstringThe ICAO to set, like 'KCOS'.

Returns

Promise<AirportFacility>

The destination facility.


setOrigin()

static setOrigin(fms, ident): Promise<AirportFacility>

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:19

Sets the origin for the flight plan.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe FMS.
identstringThe ICAO to set, like 'KDEN'.

Returns

Promise<AirportFacility>

The origin facility.


setOriginRunway()

static setOriginRunway(fms, origin, runwayName): OneWayRunway

Defined in: workingtitle-instruments-epic2/shared/DevPlan/DevPlanUtils.ts:42

Sets the origin for the flight plan.

Parameters

ParameterTypeDescription
fmsEpic2FmsThe 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.