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:155
Creates an instance of the WaypointAlertComputer.
Parameters
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | The event bus to use with this instance. |
options | Readonly<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:167
Creates an instance of the WaypointAlertComputer.
Parameters
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | The event bus to use with this instance. |
flightPlanner | FlightPlanner | The flight planner from which to retrieve the active flight plan. |
alertLookaheadTime | number | The amount of time from the waypoint or target turn, in seconds, to begin alerting. |
nowAlertTime? | number | The amount of time, in seconds, to keep "...NOW" alerts active after they have been triggered. Defaults to five seconds. |
Returns
WaypointAlertComputer
Properties
onStateChanged
readonlyonStateChanged:SubEvent<WaypointAlertComputer,Readonly<WaypointAlertStateEvent>>
Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:124
An event which fires every time the alert state changes.
state
readonlystate:Subscribable<Readonly<WaypointAlertStateEvent>>
Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:122
The current alert state.
timeRemaining
readonlytimeRemaining:NumberUnitSubject<Duration,SimpleUnit<Duration>>
Defined in: src/garminsdk/navigation/WaypointAlertComputer.ts:126
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:321
Updates the WaypointAlertComputer.
Returns
void