title: How to remove Gravity factor from Accelerometer readings in Android 3-axis accelerometer
body: <p>Can anyone help on removing the g factor from accelerometer readings?</p>
  
  <p>I am using SensorEventListener with <code>onSensorChanged()</code> method for getting Sensor.TYPE_ACCELEROMETER data. I need only pure acceleration values in all directions. So at any state if the device is stable (or in constant speed), it should give (0.0,0.0,0.0) roughly.</p>
  
  <p>Currently, depending on its pitch and roll, it gives me variable output depending on the g forces acting on each axis.</p>
  
  <p>I hope there is some formula to remove this, as I also get orientation values (pitch and roll) from Sensor.TYPE_ORIENTATION listener. I have used some but it didn't work.</p>