08-30-2022, 06:11 PM
IIRC, https://www.youtube.com/watch?v=0rlvvYgmTvI has been quite instructive (the experiment on https://phyphox.org/wiki/index.php/Attitude_sensor fits quite well to the video). Earth's magnetic field provides a fixed axis and helps determining –and correcting– the smartphone's orientation in space.