Android Low pass filter and High pass filter

前端 未结 4 1119
一整个雨季
一整个雨季 2020-12-07 16:46

I have a very basic question. What is Low Pass filter and High Pass filter in case of Android Accelerometer?

When I see the output from the Accelerometer Sensor, I

4条回答
  •  [愿得一人]
    2020-12-07 17:29

    Low Pass Filter: passes low-frequency signals and reduces the amplitude of signals with frequencies higher than the threshold frequency

    High Pass Filter: passes high-frequency signals and reduces the amplitude of signals with frequencies lower than the threshold frequency

    If you look at the documentation, it says: "in order to measure the real acceleration of the device, the contribution of the force of gravity must be eliminated. This can be achieved by applying a high-pass filter. Conversely, a low-pass filter can be used to isolate the force of gravity."

    You could check out this tutorial on low pass filtering: http://www.raweng.com/blog/2013/05/28/applying-low-pass-filter-to-android-sensors-readings/

    Reading the docs at http://developer.android.com/reference/android/hardware/SensorEvent.html#values, you can see that you can access the a values on all x,y,z axis by doing:

    values[0] - a on x axis
    values[1] - a on y axis
    values[2] - a on z axis
    

提交回复
热议问题