← Back to the chapter · Previous detail
Technical detail · Complementary Filters: Tuning and Validity
Extend the validity rules to quaternion filters
For three-dimensional orientation, many systems move from Euler-angle roll/pitch updates to quaternion-based filters such as Madgwick or Mahony. A quaternion represents 3D orientation. Quaternions avoid Euler singularities and support full 3D attitude composition. Madgwick-style filters use a correction gain, often called beta, to pull the quaternion estimate toward accelerometer and magnetometer references. The same evidence rule still applies: magnetometers can be corrupted by nearby metal or electronics, and a 9-DOF heading should be labeled degraded when magnetic calibration or field consistency fails.