iPhone GPS 精度 - 即使设备静止,读数也会变化
我正在开发一个应用程序,旨在计算从起点到终点的行驶距离。 我已完成所有操作来获取不断变化的坐标并测量该坐标之间的距离。 现在真正的问题是,即使我在几秒钟后保持 iPhone 静止,GPS 读数也会显示偏差,并且 CLLocationDistance 告诉我我已经移动了几百米,而我也没有移动一点。 我可以做些什么来提高我的应用程序的精度吗?
提前致谢。
I am working on an app that is meant to calculate the distance traveled from starting point to end.
i have done all things to get the changing coordinates and measure the distance between this co-ordinates.
Now the real problem is even though if I keep my iPhone stationary after few seconds the GPS readings shows deviation and CLLocationDistance tells me that I had moved few 100 meters whereas I haven't moved a bit also.
Is there anything I can do increase the precision of my app ??
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
iPhone 上的 GPS 会长时间工作以节省电池电量。第一组坐标将是手机最后知道的坐标。
根据您想要的精度,它会尝试获得更好的修复,首先会在 wifi 或手机信号塔上使用三角测量。
一段时间后,GPS 信号就会通过并为您提供更精确的位置,只有在您告诉它或达到所需的精度时,iOS 才会停止更新。
您可以做的是检查收到的职位的准确性,看看它是否符合您的标准。
没有办法立即获得最多的修复,这只是需要一些时间。
The GPS on the iPhone works in away to preserve battery. The first set of coordinates will be the last know coordinates of the phone.
And depending on the accuracy you desire it will try and get a better fix, first will use triangulation on wifi or cell towers.
After a while the GPS signal come thru and gives you a more precise position and the iOS will only stop update if you tell it to or if the desired accuracy is met.
What you can do is check the accuracy of the postion received and see if it meets you criteria.
There is no way to just get the most accrued fix wright away, it's just going to take some time.
无法提高应用程序中 GPS 的精度,但您可以提高结果的准确性。
首先,尝试使用 CLLocationManger 的 distanceFilter。
还有您想要的准确性
最后,您应该考虑检索到的位置更新的准确性。根据准确性丢弃无效数量的位置更新是摆脱那些不太有效的位置的好方法。但也要注意,获得真正良好的 GPS 精度信号需要一些时间。
There is no way to improve the precision of your GPS within your app, but you can improve the accuracy of the results.
First of all, try playing with the distanceFilter of your CLLocationManger.
Also your desired accuracy
And last, you should be playing with the accuracy of the location updates retrieved. Discarding an invalid amount of location updates based on their accuracy is a good way to get rid of those not-so-valid locations. But also be aware that it will take some time to get a real nice gps accuracy signal.