TomTomArrivalDetectionEngine

class TomTomArrivalDetectionEngine(    destinationArrivalDistanceThreshold: Distance = DEFAULT_DESTINATION_ARRIVAL_DISTANCE_THRESHOLD,     destinationArrivalTimeThreshold: Duration = DEFAULT_ARRIVAL_TIME_THRESHOLD,     waypointArrivalDistanceThreshold: Distance = DEFAULT_WAYPOINT_ARRIVAL_DISTANCE_THRESHOLD) : ArrivalDetectionEngine

ArrivalDetectionEngine implementation which takes into account current distance along the route and estimated time till arrival.

Parameters

destinationArrivalDistanceThreshold

Distance till destination which triggers the arrival, defaults to DEFAULT_DESTINATION_ARRIVAL_DISTANCE_THRESHOLD.

destinationArrivalTimeThreshold

Time till destination which triggers the arrival, defaults to DEFAULT_ARRIVAL_TIME_THRESHOLD.

waypointArrivalDistanceThreshold

Distance till waypoint which triggers the arrival, defaults to DEFAULT_WAYPOINT_ARRIVAL_DISTANCE_THRESHOLD.

Constructors

Link copied to clipboard
fun TomTomArrivalDetectionEngine(    destinationArrivalDistanceThreshold: Distance = DEFAULT_DESTINATION_ARRIVAL_DISTANCE_THRESHOLD,     destinationArrivalTimeThreshold: Duration = DEFAULT_ARRIVAL_TIME_THRESHOLD,     waypointArrivalDistanceThreshold: Distance = DEFAULT_WAYPOINT_ARRIVAL_DISTANCE_THRESHOLD)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun hasArrivedAtDestination(navigationSnapshot: NavigationSnapshot): DestinationArrivalStatus

Decides that destination has been reached if distance till arrival exceeds destinationArrivalDistanceThreshold or time till arrival exceeds destinationArrivalTimeThreshold.

Link copied to clipboard
open override fun hasArrivedAtWaypoint(navigationSnapshot: NavigationSnapshot): WaypointArrivalStatus

Decides that a waypoint has been reached if the distance to the waypoint is smaller than the waypointArrivalDistanceThreshold.