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);
}
Aggregations