ios google maps accuracy

Deadly 提交于 2021-02-18 14:15:17

问题


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

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.

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?

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


回答1:


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.

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.

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.

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.

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

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.




回答2:


There are limits to GPS accuracy.
If an app has access to the underlying map data and there is an assumption that the location should be on a road then it could fudge the user's location. But what if I am parked beside the road or not in a vehicle.

Fro: gps.gov: The GPS signal in space will provide a "worst case" pseudorange accuracy of 7.8 meters at a 95% confidence level.

But it is possible for receivers to do better than this especially if they are stationary. In the stationary case location averaging can help substantially but the fact it is stationary would have to be known to the device. It is also possible for receivers to do much worse. So, 10 to 20 meters is probably a safe assumption.



来源:https://stackoverflow.com/questions/19955800/ios-google-maps-accuracy

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