Skip to main content

Class: WaypointAlertComputer

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

Constructors

constructor

new WaypointAlertComputer(bus, options): WaypointAlertComputer

Creates an instance of the WaypointAlertComputer.

Parameters

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

Returns

WaypointAlertComputer

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:154

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

Creates an instance of the WaypointAlertComputer.

Parameters

NameTypeDescription
busEventBusThe event bus to use with this instance.
flightPlannerFlightPlanner<any>The 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

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:166

Properties

onStateChanged

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

An event which fires every time the alert state changes.

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:123


state

Readonly state: Subscribable<Readonly<WaypointAlertStateEvent>>

The current alert state.

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:121


timeRemaining

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

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

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:125

Methods

update

update(): void

Updates the WaypointAlertComputer.

Returns

void

Defined in

src/garminsdk/navigation/WaypointAlertComputer.ts:318