1. Since it is a sports APP, the accuracy should not be set to the navigation level too much. desiredAccuracy is set to kCLLocationAccuracyBestForNavigation, which seems to be 1m
2. There is no necessary relationship between high accuracy and GPS refresh frequency. What really affects the refresh frequency is the activityType attribute and the distanceFilter attribute. The former determines the location update timing, and the latter The distance threshold that determines location updates
3. There are two reasons for positioning drift. One is that the GPS signal is not good, such as indoors and in the subway, and the error is very large. In addition, turning on the mobile cellular network can help improve the GPS positioning accuracy. The second reason is the map coordinate conversion problem. The coordinates (real coordinates) you get directly from CLLocationManager are drawn directly on the MapView. The position is offset. This is a need for national security. Here is a quote from two years ago. The post talked about the algorithm to correct the offset. You can try it. I don’t know if I can use IOS LocationManager to locate the domestic offset. Solution to Mars coordinates (GCJ-02)
Good luck to you.
🎜ps: The tutorial code in the above link is wrong. Please see the comments below the article for details on how to modify it. 🎜🎜
It is recommended to set the accuracy to 5 to 20 meters. The higher the accuracy, the longer it will take to initialize and consume more power. The positioning on the mobile phone will often drift (I have not encountered mobile phone drift). Yes, but my company’s own GPS module often drifts), the accuracy is 1m unless the mobile phone is in a place with super good GPS signal
Thanks for inviting @loveuqian
The following are all about
CLLocationManager
CLLocationManager
说的1.既然是运动类的APP,精度设成导航级别不过分,
desiredAccuracy
设为kCLLocationAccuracyBestForNavigation
,好像是1m吧2.精度高不高和GPS刷新频率没有必然关系,真正影响刷新频率的是
1. Since it is a sports APP, the accuracy should not be set to the navigation level too much.activityType
属性和distanceFilter
desiredAccuracy
is set tokCLLocationAccuracyBestForNavigation
, which seems to be 1mactivityType
attribute and thedistanceFilter
attribute. The former determines the location update timing, and the latter The distance threshold that determines location updatesGood luck to you.
🎜ps: The tutorial code in the above link is wrong. Please see the comments below the article for details on how to modify it. 🎜🎜It is recommended to set the accuracy to 5 to 20 meters. The higher the accuracy, the longer it will take to initialize and consume more power. The positioning on the mobile phone will often drift (I have not encountered mobile phone drift). Yes, but my company’s own GPS module often drifts), the accuracy is 1m unless the mobile phone is in a place with super good GPS signal
You can set the most accurate setting, and then take an average
Then I will help you invite a kid to come and answer
@NsstringFromName