Attitude sensor

From phyphox
Revision as of 08:41, 27 April 2021 by Sebastian Kuhlen (talk | contribs) (Created page with "{{Infobox Experiment | Name = Attitude | Category = Tools | Sensors = Attitude }} This experiment uses the virtual attitude sensor (or "orientation sensor") and to calcula...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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