Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smooth Compass for Android 2.2

Tags:

android

I've been creating Compass for Android and I found several codes online but none of them provide example for smooth animation for the compass.

The url provided me the starting point in creating the compass..

http://android-er.blogspot.com/2010/08/simple-compass-sensormanager-and.html

like image 852
scamexdotexe Avatar asked Feb 02 '26 06:02

scamexdotexe


1 Answers

You need to apply a low pass filter to smooth the raw data. A low pass filter only allows through (to "pass") the low frequencies, and gets rid of the high frequencies, which are probably mostly noise (which will cause your compass to be jittery). This answer would probably be suitable for what you want.

like image 150
Jason Avatar answered Feb 04 '26 01:02

Jason



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!