I know that this function returns a float indicating the accuracy of a particular location. My question is: Is it right that greater the value returned by this function means more accurate the location is? Or it is the inverse what I am saying ?
Asked
Active
Viewed 1.8k times
4 Answers
34
getAccuracy()
describes the deviation in meters. So, the smaller the number, the better the accuracy.

nfechner
- 17,295
- 7
- 45
- 64
20
Accuracy reported by getAccuracy() is in meters, ex. 10 meters. Google defines accuracy as the radius of 68% confidence(on sigma), which means if you get 10 meters of accuracy from getAccuracy(), then you are somewhere within 10 meters from the actual location with probability of 68/100 times. If getAccuracy() reported is 20 meteres, then you are somewhere within 20 meters from actual location. So the smaller number reported by getAccuracy() means you are closer to the actual location.

Babs
- 333
- 7
- 18
-
Excellent explanation. – mutiemule May 08 '19 at 06:07
9
And when getAccuracy() return 0.0 - it means that this location does not have an accuracy.

researcher
- 1,758
- 22
- 25
-
4To check if location has accuracy or not, you should call `Location.hasAccuracy() ` to be precise. – Thracian Oct 18 '17 at 11:24
-
@FatihOzcan question isn't about how to determine if location has accuracy. Question about method getAccuracy(). – researcher Oct 18 '17 at 12:56