Skip to main content

Class: DirectToController

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:25

The controller for the DTO view

Constructors​

Constructor​

new DirectToController(store, fms, viewService, goToActivateFunc): DirectToController

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:46

Creates an instance of direct to controller.

Parameters​

ParameterTypeDescription
storeDirectToStoreThis controller's associated direct to menu store.
fmsFmsThe flight management system.
viewServiceViewServiceThe view service used by this controller.
goToActivateFunc() => voidA function which focuses the Activate button of this controller's associated view.

Returns​

DirectToController

Properties​

canActivate​

readonly canActivate: Subject<boolean>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:29


inputEnterPressedHandler()​

readonly inputEnterPressedHandler: () => void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:33

Responds to Enter button press events from the waypoint input.

Returns​

void


inputIcao​

readonly inputIcao: Subject<string>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:28


matchedWaypointsChangedHandler()​

readonly matchedWaypointsChangedHandler: (waypoints) => void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:31

Responds to changes in the waypoint input's matched waypoints list.

Parameters​

ParameterTypeDescription
waypointsreadonly FacilityWaypoint<Facility>[]The matched waypoints.

Returns​

void


waypointChangedHandler()​

readonly waypointChangedHandler: (waypoint) => Promise<void>

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:32

Responds to changes in the waypoint input's selected waypoint.

Parameters​

ParameterTypeDescription
waypointWaypoint | nullThe selected waypoint.

Returns​

Promise<void>

Methods​

activateSelected()​

activateSelected(holdAt): void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:271

Activates a Direct To to the selected waypoint.

Parameters​

ParameterTypeDefault valueDescription
holdAtbooleanfalseWhether to hold at the selected waypoint.

Returns​

void


initializeTarget()​

initializeTarget(dtoData): void

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:64

Initializes the direct to target based on input data. If the input data is defined, the target will be set to that defined by the input data. If the input data is undefined, an attempt will be made to set the target to the following, in order:

  • The current active direct to target.
  • The current active flight plan leg.
  • The next leg in the primary flight plan, following the active leg, that is a valid direct to target.
  • The previous leg in the primary flight plan, before the active leg, that is a valid direct to target.

Parameters​

ParameterTypeDescription
dtoDataDirectToInputData | undefinedThe input data.

Returns​

void


createDtoExistingData()​

protected static createDtoExistingData(plan, segmentIndex, segmentLegIndex): DirectToExistingData

Defined in: workingtitle-instruments-g1000/html_ui/Shared/UI/DirectTo/DirectToController.ts:306

Creates a direct to existing data object for a flight plan leg.

Parameters​

ParameterTypeDescription
planFlightPlanA flight plan.
segmentIndexnumberThe index of the segment in which the leg resides.
segmentLegIndexnumberThe index of the leg in its segment.

Returns​

DirectToExistingData

A direct to existing data object.