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
I usually use this formula To filter the data from the accelometer sensor data coming out to linear sensor(like gyroscope) data. Use it if you are not sure there is a built-in Gyroscopic sensor.
private float[] values;
private float[] valuesN;
private float[] prev;
private float[] prevHF;
private boolean doHPF = false;
// ind - index of three dimensions (x, y, z)
private void makeHPFf() {
for (int ind = 0; ind < 3; ind++) {
valuesN[ind] = values[ind] * 0.002f * 9.8f;
if (doHPF)
values[ind] = valuesN[ind] - prev[ind] + (prevHF[ind] * 0.8f);
prev[ind] = valuesN[ind];
prevHF[ind] = values[ind];
}
if (!doHPF)
doHPF = true;
}