mapzen / ios

Where you can find everything iOS from Mapzen
https://mapzen.com/projects/mobile/
Apache License 2.0
40 stars 24 forks source link

Current location orientation (compass) #389

Closed nolispe280 closed 6 years ago

nolispe280 commented 6 years ago

Hi, I've been trying to use the currentLocation.course function to get a reading of my location's heading but it does not work properly: the course value changes all the time and really is not stable. Has anyone experienced that before?

msmollin commented 6 years ago

Sorry I missed this.

We investigated this a little bit as part of this issue: https://github.com/mapzen/ios/issues/333 and came to similar conclusions that we would need to add some amount of filtering before we'd feel confident exposing it as an option in the SDK. That said its one of those tuneable items that I'm unsure we could fully "get right" for every single developer requirement. However, we currently don't set ANY heading filter our internal CLLocationManager instance, so something is likely better than nothing (see docs here for it https://developer.apple.com/documentation/corelocation/cllocationmanager/1620550-headingfilter).

We could set one just to help out in the mean time as part of the GPU fix I mentioned in the background location update issues. Maybe a simple 2 degree filter just to calm down the compass jerkiness a little. Thoughts? (cc @sarahlensing )

msmollin commented 6 years ago

After some internal discussion, it would be premature to simply add a filter without enabling heading support fully inside the SDK. Going to write up a separate issue documenting it and get it prioritized.

msmollin commented 6 years ago

Closing in favor of #391