知道 iPhone 核心定位的精度吗?
有什么方法可以大致了解 Core Location 给出的精度吗? 或者确定该位置是否来自使用蜂窝数据/wifi/GPS?
谢谢。
Is there any way to know approximately the precision given by Core Location?
Or to determine whether that location comes from using cellular data / wifi / GPS?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,
CLLocation
有两个属性,查看头文件和文档通常会有所帮助。
Yes there are two properties on
CLLocation
Looking in the header files and the docs often pays of.
根据我编写基于 GPS 的车速表应用程序的经验,基于许多动态因素,iPhone 报告的 GPS 精度可能相当遥远:天气、高层建筑、建筑物内(甚至靠近窗户)或车内等。设备将报告其对准确性的最佳猜测,但这只是一个近似值。它声称最多可以达到约 16 米的分辨率,如果您完全在阳光明媚、蓝天白云下的大草原上,并且可以直接连接到 GPS 卫星,您可能会得到这个分辨率。
CLLocation 类提供高度、位置、航向、水平和垂直精度、速度和时间的属性,但不提供 CLLocation 的来源(wifi、gps 等)
In my experience of writing a GPS-based speedometer app, the reported GPS accuracy of the iPhone can be fairly far off, based on many dynamic factors: weather, tall buildings, being inside a building (even near a window) or in a vehicle, etc. The device will report its best guess at accuracy but it's just that, an approximation. It can claim down to about 16 meters resolution at best, and if you're out entirely in the open on the prairie in sunshine and blue skies with direct lines to the GPS satellites, you might get that.
The CLLocation class offers properties of altitude, position, course, horizontal and vertical accuracy, speed, and time -- but not source of the CLLocation (wifi, gps, etc.)