Can I get the accuracy of GPS location in iOS?

左心房为你撑大大i 提交于 2019-12-05 10:17:07

There are 2 properties on the CLLocation -horizontalAccuracy and -verticalAccuracy. Most of times the accuracy is based on the hardware that you are using to get the location

horizontalAccuary of CLLocation gives the estimated positional error in meters related to the latitude, longitude coordinate.

verticalAccuracy gives the estimated error related to altitude.

Use horizontalAccuracy and verticalAccuracy properties in CLLocation class. If horizontalAccuracy is a huge value you can discard the signals.

Also make sure to check the timeStamp with current date to ensure that the GPS signal is not cached.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!