Skip to main content

Class: WaypointAlertComputer

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:79

A class that computes the current waypoint alert state for consumers to use for waypoint alert displays.

Constructors​

Constructor​

new WaypointAlertComputer(bus, options): WaypointAlertComputer

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:149

Creates an instance of the WaypointAlertComputer.

Parameters​

ParameterTypeDescription
busEventBusThe event bus to use with this instance.
optionsReadonly<WaypointAlertComputerOptions>Options with which to configure the computer.

Returns​

WaypointAlertComputer

Constructor​

new WaypointAlertComputer(bus, flightPlanner, alertLookaheadTime, nowAlertTime?): WaypointAlertComputer

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:161

Creates an instance of the WaypointAlertComputer.

Parameters​

ParameterTypeDescription
busEventBusThe event bus to use with this instance.
flightPlannerFlightPlannerThe flight planner from which to retrieve the active flight plan.
alertLookaheadTimenumberThe amount of time from the waypoint or target turn, in seconds, to begin alerting.
nowAlertTime?numberThe amount of time, in seconds, to keep "...NOW" alerts active after they have been triggered. Defaults to five seconds.

Returns​

WaypointAlertComputer

Properties​

onStateChanged​

readonly onStateChanged: SubEvent<WaypointAlertComputer, Readonly<WaypointAlertStateEvent>>

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:118

An event which fires every time the alert state changes.


state​

readonly state: Subscribable<Readonly<WaypointAlertStateEvent>>

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:116

The current alert state.


timeRemaining​

readonly timeRemaining: NumberUnitSubject<Duration, SimpleUnit<Duration>>

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:120

The time remaining for the current alert state, or NaN if an alert is not active.

Methods​

update()​

update(): void

Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:315

Updates the WaypointAlertComputer.

Returns​

void