Rolling averaging of accelerometer