I have developed an application for Android, for storing user's GPS location.
One of my customers gave me his device and I noticed that sometimes the accuracy of the device is really bad and unbelievable. Sometimes the device returns points about 200 kilometers away from the actual location.
You can see this in the following GPS location samples for that device. You see that two points are about 200 km away from the real location.
The device is Samsung SM-T111 with Android 4.2.2, and I only use a GPS provider for getting locations (LocationManager.GPS_PROVIDER
).
I want to know what causes the problem, for this kind of inaccuracy?
I directly store the points received from the provider. This is my code in onLocationChanged
:
UPDATE
@Override
public void onLocationChanged(Location location) {
try {
if (location.getAccuracy() <= MAX_DISTANCE_TOLERANCE) {
gotLocation(new GPSLocation(location.getLatitude(),
location.getLongitude(), location.getTime(),
location.getAccuracy(),
location.getProvider(), location.getSpeed()));
}
} catch (Exception e) {
MessageBox.showExceptionToast(_context, e);
}
}