Location getAccuracy() 这个函数有什么作用?
我知道这个函数返回一个浮点数,指示特定位置的准确性。我的问题是:这个函数返回的值越大,是否意味着位置越准确?或者这与我所说的相反?
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 ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
数字越低,越准确。
The lower the number, the more accurate it is.
getAccuracy()
描述了偏差米。所以,数字越小,准确度就越高。getAccuracy()
describes the deviation in meters. So, the smaller the number, the better the accuracy.getAccuracy() 报告的精度以米为单位,例如。 10米。
Google 将准确度定义为 68% 置信度的半径(在 sigma 上),这意味着如果您从 getAccuracy() 获得 10 米的准确度,那么您位于距离实际位置 10 米以内的概率为 68/100 倍。如果 getAccuracy() 报告的值为 20 米,那么您所在的位置距离实际位置不到 20 米。
因此 getAccuracy() 报告的数字越小意味着您更接近实际位置。
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.
当 getAccuracy() 返回 0.0 时 - 表示该位置不准确。
And when getAccuracy() return 0.0 - it means that this location does not have an accuracy.