SimpleEngineCommonCalculator

public protocol SimpleEngineCommonCalculator

Protocol defining the simple progress calculation for the MapMatchingEngine.

Important

This is a Public Preview API. It may be changed or removed at any time.
  • Calculates the progress on a given route.

    Declaration

    Swift

    func calculateProgressOnRoute(
        location: CLLocation,
        route: Route,
        distanceThreshold: Measurement<UnitLength>,
        lastDistanceAlongRoute: Double
    ) -> SimpleEngineCalcResult

    Parameters

    location

    The current location.

    route

    The route to calculate progress on.

    distanceThreshold

    The distance threshold for calculations.

    lastDistanceAlongRoute

    The last recorded distance along the route.

    Return Value

    A result containing the closest distance, last distance along the route, number of loops, and the closest point.