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

Filtering compass changes in Android - #1968

Closed
erf wants to merge 2 commits into
mapbox:masterfrom
erf:filter-compass
Closed

erf wants to merge 2 commits into
mapbox:masterfrom
erf:filter-compass

Conversation

@erf

@erf erf commented Jul 30, 2015

Copy link
Copy Markdown
Contributor

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

ljbade commented Jul 30, 2015

Copy link
Copy Markdown
Contributor

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

erf commented Jul 31, 2015

Copy link
Copy Markdown
Contributor Author

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

bleege commented Aug 31, 2015

Copy link
Copy Markdown
Contributor

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

tobrun commented Oct 29, 2015

Copy link
Copy Markdown
Member

@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

erf commented Oct 29, 2015

Copy link
Copy Markdown
Contributor Author

@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