Get distance from accelerometer