Normalizing the accelerometer and gyro in 3d space