search

Home  >  Q&A  >  body text

ios - 定位精度问题求解!

运动跑步骑行类的 App ,关于地图定位的精度问题,精度大概设置的是多少米呢?精度设置为 1m 是不是太频繁了,是不是定位很容易漂移?

高洛峰高洛峰2887 days ago471

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 17:41:19

    Thanks for inviting @loveuqian

    The following are all about CLLocationManagerCLLocationManager说的

    1.既然是运动类的APP,精度设成导航级别不过分,desiredAccuracy设为kCLLocationAccuracyBestForNavigation,好像是1m吧

    2.精度高不高和GPS刷新频率没有必然关系,真正影响刷新频率的是activityType属性和distanceFilter

    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. 🎜🎜

    reply
    0
  • 黄舟

    黄舟2017-04-17 17:41:19

    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

    reply
    0
  • 阿神

    阿神2017-04-17 17:41:19

    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

    reply
    0
  • Cancelreply