Attitude sensor

From phyphox
Jump to navigation Jump to search
Attitude
Experiment Attitude
Category Tools
Used sensors Attitude


This experiment uses the virtual attitude sensor (or "orientation sensor") and to calculate angles of rotation for the phone. It is not included in the default experiment list of phyphox, because there are a few difficulties that you should be aware of.

The attitude sensor is only a virtual sensor. This means that there is not one device that gives the attitude, but it is calculated from a list of different sensors (so-called "sensor fusion"). Typically, the attitude is derived from the accelerometer (angle towards Earth's acceleration), the magnetometer (angle to Earth's magnetic field vector) and the gyroscope to assist in deriving a smooth and precise rotation as the first two sensors on their own cannot provide their angles reliably.

The big problem here is that the results depend strongly on the available sensors and the robustness of the sensor fusion algorithm implemented by the manufacturer of the phone. Some devices produce very reproducible and precise angles while others show a strong drift, changes on repeated rotations or general erratic behavior. So, if you need this data, make sure to thoroughly test the output of your device first.

Another, not technical, problem is the interpretation of rotation angles. The sensor data is typically given as Quaternions, which have many mathematical advantages, but are unknown to most users without extensive mathematical background. Phyphox also derives the seemingly more intuitive Euler angles (here called "yaw", "pitch" and "roll" as used in aviation, but in an arbitrary orientation of the phone) and the "direct angle", which is the minimum rotation about an arbitrary axis. Even though these seem rather intuitive, you should read up on Euler angles, their problems like "gimbal lock" and how some of these angles depend on the other angles - especially if you expect rotations about more than one axis or about an axis that is not exactly along x, y or z.

You can open the attitude sensor experiment from the following link:

Attitude sensor