iOS Google Maps准确性 [英] ios google maps accuracy

查看:65
本文介绍了iOS Google Maps准确性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我具有使用Google地图显示用户当前位置并转到他的路线的视图.

i have view that display user current location using google maps and route to his distention.

问题:大多数情况下,用户位置不在您的关注范围之内,我无法在Appstore中放置这样的应用程序,它将获得不好的评价.

the problem: user location is out of the road most of the time, I can't put the app like this in the Appstore, it will get bad reviews.

我检查了google sdk的IOS,是否具有准确性!!例如: self.googleMap.accuracy = bestForNavigation

I checked google sdk for IOS, is there any property for accuracy !? like: self.googleMap.accuracy = bestForNavigation

是否有任何调整或属性设置可以提高用户位置准确性?

are there any tweaks or properties to set that improve user location accuracy?

如何在Appstore上以与Google应用程序一样高的精确度映射应用程序以显示用户位置?

how maps apps on the Appstore display user location with so much accuracy like google app?

推荐答案

CoreLocationManager 中,您可以将 desiredAccuracy 设置为 kCLLocationAccuracyBestForNavigation .但是,GPS仍然不是完美的,根据信号质量,天空视野(峡谷,城市)等,您可能会从GPS获得5到100m的精度.

In the CoreLocationManager you can set the desiredAccuracy to kCLLocationAccuracyBestForNavigation. However, GPS is still never perfect, you may get anywhere from 5 to 100m accuracy from the GPS depending on signal quality, sky view (canyons, cities), etc.

另一个需要注意的错误来源,请确保GPS数据与地图和道路网络数据位于同一基准面(即WGS-84).不同的基准可以添加较小(或较大)的误差.

Another source of error to watch out for, make sure your GPS data is in the same datum (ie: WGS-84) as the map and the road network data. Different datums can add small (or large) errors.

为补偿固有的GPS和地图误差,大多数转弯导航应用程序都使用了我们称为贴合道路"的功能.我们计算用户靠近的道路,如果GPS位置在道路的30m(请参见注释1)以内,并且路线(或行进方向,注释2)在道路方向的+/- 25度以内,则我们捕捉"到马路.这意味着我们将更改显示的位置点的位置和方向,以便显示用户正好在道路上(计算距GPS点最近的道路上的点)并沿着道路行驶(选择最接近).这需要详细的道路几何数据,包括曲线和一些有趣的计算,但是一旦获得,它就可以很好地工作.

To compensate for inherent GPS and mapping error, most turn-by-turn navigation apps use what we call "snap to road". We compute what roads the user is near and IF the GPS location is within 30m (see note1) of the road AND the course (or heading, note2) is within +/- 25 degrees of the road direction, THEN we "snap" to the road. That means we change the location and heading of the displayed location dot so that it shows that the user is exactly on the road (compute the nearest point on the road from the GPS point) and heading along the road path (select the road heading that is closest). This requires detailed road geometry data including curves and some fun calculations but it works really well once you get it.

如果他们离道路较远或与行进方向不一致,则我们将显示其实际GPS位置.这确实非常有效,但是它要求您具有可用的道路网络几何图形(或至少它们到目标几何图形的路线),以便您可以进行这些检查.

If they are further off the road or not aligned with the road heading then we show their actual GPS location. This works really well but it requires that you have the road network geometry available (or at least their route to destination geometry) so you can make these checks.

注意1:我们根据得到的 CLLocation 中报告的 horizo​​ntalAccuracy 选择公差.

Note1: we select a tolerance based on the reported horizontalAccuracy from the CLLocation we get.

注2:我们将指南针航向(校正后)和航向(来自GPS)混合在一起,以确定用户的实际航向.低于8公里/小时时,我们主要使用指南针航向,高于8公里/小时时,我们主要使用GPS航向(更精确).我们还会通过GPS路线确定罗盘错误来纠正它.这样一来,即使是停在很小或很慢的停车场速度下,我们也可以显示准确的航向.

Note2: we blend the compass heading (corrected) and course (from GPS) to decide the users actual heading. Below about 8 kph we predominantly use compass heading, above that we mainly use GPS course (its more accurate). We also GPS course to determine compass error to correct it. This allows us to show accurate headings even when stopped at a light or at very slow parking lot speeds.

这篇关于iOS Google Maps准确性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆