Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Filtering compass changes in Android #1968

Closed
wants to merge 2 commits into from
Closed

Filtering compass changes in Android #1968

wants to merge 2 commits into from

Conversation

erf
Copy link
Contributor

@erf erf commented Jul 30, 2015

I've added a low pass filter for averaging compass directional changes, i also use time and angle to limit these updates. Used in the MapboxGLAndroidSDKTestApp.

Improvement for issue #1676

@bleege bleege added the Android Mapbox Maps SDK for Android label Jul 30, 2015
@bleege bleege added this to the Android b1 milestone Jul 30, 2015
@ljbade
Copy link
Contributor

ljbade commented Jul 30, 2015

Tried testing it on my Sony Z3 but unfortunately today the compass sensor does not want to co-operate - was point in every direction but the right one (was doing the same thing in Google Maps)

Looking at the code, can you make a few tweaks:

  • use camelCase for the variable names
  • remove the commented out lines

@erf
Copy link
Contributor Author

erf commented Jul 31, 2015

I also had compass problems on S3, but it's much better on nexus 7. Maybe the algorithm can be improved upon.

@bleege bleege modified the milestones: android-v0.2.0, android-v0.1.0 Aug 31, 2015
@bleege
Copy link
Contributor

bleege commented Aug 31, 2015

Thanks @erf! Moving to 0.2.0 for now though.

@bleege bleege modified the milestones: android-v2.1.0, android-v2.2.0 Oct 2, 2015
@bleege bleege modified the milestones: android-v2.2.0, android-v2.3.0 Oct 28, 2015
@tobrun
Copy link
Member

tobrun commented Oct 29, 2015

@erf
I wanted to thank you for this contribution, I have been playing around with your suggestion. Your code has helped me a lot on setting this up but I must mention I have removed it again. Instead I'm rate limiting the sensor input and I'm seeing great improvements on lowering memory churn.

@tobrun tobrun closed this Oct 29, 2015
@erf
Copy link
Contributor Author

erf commented Oct 29, 2015

@tobrun No worries! I'm glad you are doing progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants