Accuracy of Core Location

后端 未结 4 894
南笙
南笙 2020-12-23 15:16

I\'m currently working on a location tracking app and I have difficulties with inaccurate location updates from my CLLocationManager. This causes my app to track di

4条回答
  •  一个人的身影
    2020-12-23 15:59

    There's really not a whole lot more you can do to improve what the operating system and your current reception gives to you. On first look it doesn't look like there's anything wrong with your code - when it comes to iOS location updates you're really at the mercy of the OS and your service.

    What you CAN do is control what locations you pay attention to. If I were you in my didUpdateLocations function when you get callbacks from the OS with new locations - you could ignore any locations with horizontal accuracies greater than some predefined threshold, maybe 25m? You would end up with less location updates to use but you'd have less noise.

提交回复
热议问题