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
Name | Type | Description |
---|---|---|
bus | EventBus | The event bus to use with this instance. |
options | Readonly <WaypointAlertComputerOptions > | Options with which to configure the computer. |
Returns
Defined in
src/garminsdk/navigation/WaypointAlertComputer.ts:154
• new WaypointAlertComputer(bus
, flightPlanner
, alertLookaheadTime
, nowAlertTime?
): WaypointAlertComputer
Creates an instance of the WaypointAlertComputer.
Parameters
Name | Type | Description |
---|---|---|
bus | EventBus | The event bus to use with this instance. |
flightPlanner | FlightPlanner <any > | 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
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