Search in sources :

Example 1 with LocationValidator

use of com.mapbox.services.android.navigation.v5.location.LocationValidator in project mapbox-navigation-android by mapbox.

the class NavigationService method initLocationValidator.

/**
 * Creates a new location validator used to filter incoming
 * location updates from the location engine.
 */
private void initLocationValidator() {
    MapboxNavigationOptions options = mapboxNavigation.options();
    int accuracyAcceptableThreshold = options.locationAcceptableAccuracyInMetersThreshold();
    int accuracyPercentThreshold = options.locationAccuracyPercentThreshold();
    int timeInMillisThreshold = options.locationUpdateTimeInMillisThreshold();
    int velocityInMetersPerSecondThreshold = options.locationVelocityInMetersPerSecondThreshold();
    this.locationValidator = new LocationValidator(accuracyAcceptableThreshold, accuracyPercentThreshold, timeInMillisThreshold, velocityInMetersPerSecondThreshold);
}
Also used : LocationValidator(com.mapbox.services.android.navigation.v5.location.LocationValidator)

Aggregations

LocationValidator (com.mapbox.services.android.navigation.v5.location.LocationValidator)1