Filtering accelerometer data noise

前端 未结 5 1263
误落风尘
误落风尘 2020-11-28 22:20

How do I filter noise of the accelerometer data in Android? I would like to create a high-pass filter for my sample data so that I could eliminate low frequency components a

5条回答
  •  半阙折子戏
    2020-11-28 22:47

    I seem to remember this being done in Apple's sample code for the iPhone. Let's see...

    Look for AccelerometerFilter.h / .m on Google (or grab Apple's AccelerometerGraph sample) and this link: http://en.wikipedia.org/wiki/High-pass_filter (that's what Apple's code is based on).

    There is some pseudo-code in the Wiki, too. But the math is fairly simple to translate to code.

提交回复
热议问题