Reputation: 1689
There are to types of locations. Network location and GPS location. In Network location getAccuracy() works ok.
But in GPS location I get locations with getAccuracy() = {5m,10m,15m}. I check locations in map and some times is ok. But in 40% of cases {5m,10m,15m} is real {300m,100m,500m}.
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
MIN_TIME_BW_UPDATES, MIN_DISTANCE_CHANGE_FOR_UPDATES,
locationListenerGPS);
(...)
LocationListener locationListenerGPS = new LocationListener() {
public void onLocationChanged(Location location) {
//Process location
sendLocation(location);
}
public void onStatusChanged(String provider, int status, Bundle extras) {
}
public void onProviderEnabled(String provider) {
}
public void onProviderDisabled(String provider) {
}
};
In image of example getAccuracy() = 6.6m and real error is 239.15m
Upvotes: 0
Views: 629
Reputation: 182
If you're looking to snap those gps coordinates to the road, try the Google Roads API
It's not as important to have super accurate gps coordinates when using this API.
Upvotes: 0
Reputation: 4076
Location#getAccuracy() provides an estimate with 68% probability that the location is within the given radius. It cannot be guaranteed that the true location will always be within the accuracy provided.
Upvotes: 1