Skip to main content

Interface: WTLineFlightPlanRepository<F, M>

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:14

Describes a repository of flight plans for the WTLine FMS.

There are two types of flight plan indices: regular indices and "main" indices.

Type Parameters

Type ParameterDescription
F extends numberAn index that can refer to any flight plan. This can be internal plans used for temporary storage, MOD plans, or anything.
M extends FAn index that can refer to plans defined at a higher level, like the active flight plan, the secondary flight plan, etc. Some operations on the repository are limited to main indices. For example, you can only call getModPlanIndex with a main index, because the method will return the index of a MOD plan.

Properties

planInMod

readonly planInMod: MutableSubscribable<boolean>

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:16

A MutableSubscribable indicating if the FMS should be displaying a MOD plan

Methods

activateSecondaryPlan()

activateSecondaryPlan(): void

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:37

Activates the secondary flight plan

Returns

void


copyActivePlanIntoSecondaryPlan()

copyActivePlanIntoSecondaryPlan(): void

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:32

Copies the active flight plan into the secondary flight plan

Returns

void


getFlightPlan()

getFlightPlan(index): FlightPlan

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:22

Returns a flight plan given an index

Parameters

ParameterType
indexF

Returns

FlightPlan


getModPlanIndex()

getModPlanIndex(index): null | F

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:72

Returns the index of the MOD plan for a given main plan, or null if there isn't one

Parameters

ParameterTypeDescription
indexMthe plan index to query

Returns

null | F

an index or null


getPlanIndexToDisplay()

getPlanIndexToDisplay(index): number

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:58

Returns the index of the plan to display given an index

Parameters

ParameterTypeDescription
indexFthe index to query

Returns

number

a number


getPlanIndexToEdit()

getPlanIndexToEdit(index): number

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:44

Returns the index of the plan to perform an edit on (creating a MOD plan as needed) given an index

Parameters

ParameterTypeDescription
indexFthe index to query

Returns

number

a number


getPlanToDisplay()

getPlanToDisplay(index): FlightPlan

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:65

Returns the plan to display given an index

Parameters

ParameterTypeDescription
indexFthe index to query

Returns

FlightPlan

a flight plan


getPlanToEdit()

getPlanToEdit(index): FlightPlan

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:51

Returns the plan to perform an edit on (creating a MOD plan as needed) given an index

Parameters

ParameterTypeDescription
indexFthe index to query

Returns

FlightPlan

a flight plan


initFlightPlans()

initFlightPlans(): void

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:27

Initializes the needed flight plans in the FMS

Returns

void


isMainPlanIndex()

isMainPlanIndex(index): index is M

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:79

Returns whether a given plan index is a main plan index

Parameters

ParameterTypeDescription
indexFthe plan index to query

Returns

index is M

a boolean


isPlanIndexModPlan()

isPlanIndexModPlan(index): boolean

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:93

Returns whether a given plan index corresponds to a MOD plan

Parameters

ParameterTypeDescription
indexFthe plan index to query

Returns

boolean

a boolean


isPlanIndexSecondaryPlan()

isPlanIndexSecondaryPlan(mainIndex): boolean

Defined in: wtlinesdk/fms/WTLineFlightPlanRepository.ts:86

Returns whether a given main plan index is a secondary plan index

Parameters

ParameterTypeDescription
mainIndexMthe main plan index to query

Returns

boolean

a boolean