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 t
I want to know what can be the problem for this kind of inaccuracy?
Hardware/firmware, most likely. In other words, blame Samsung.
It's unlikely to be your app. Assuming that the accuracy values that you are getting for those failed points are within MAX_DISTANCE_TOLERANCE, and assuming that MAX_DISTANCE_TOLERANCE is less than 200km, you are faithfully using the data that you get. If that data is flawed, those flaws are coming from the system itself.
You could create a more adaptive filter. In addition to testing the accuracy for MAX_DISTANCE_TOLERANCE, you could:
Location for this)For example, your first bad fix comes 20 minutes after the previous one. Unless you think the device might travel at 600 km/hour, you would reject the bad fix as being unrealistic.
This algorithm will only work after you have a few consistent fixes. You might ask for rapid location updates for a few minutes, examine that data, throw out any outliers, then apply the "could the device really have travelled that far?" test for future fixes.