DISPLACEMENT & VELOCITY CALCULATOR FROM AN ACCELEROMETER