Use quaternion to calculate gravity vector and angles