working with a simple gravity offset using quaternion
added avg and standard deviation with gravity compensation