{
  "id": "ahrs",
  "title": "Mahony AHRS (quaternion attitude)",
  "blurb": "A complementary attitude filter fusing a biased gyroscope with an accelerometer; every quaternion op is a shipped kernel and the state is re-normalised onto the unit sphere each step.",
  "emit_targets": 18,
  "proofs": [
    {
      "theorem": "quat_normalize_unit",
      "claim": "\u2016normalize(q)\u2016\u00b2 = 1 \u2014 the state stays a unit quaternion (sorryAx-free)",
      "clean": true,
      "trail": "quat_normalize_unit.axioms.txt"
    }
  ],
  "checks": [
    {
      "quantity": "Mahony attitude error vs gyro-only",
      "value": "2.38\u00b0 / 18.44\u00b0",
      "relation": "ratio",
      "bound": "0.13 < 0.3",
      "holds": true
    },
    {
      "quantity": "max |\u2016q\u2016 \u2212 1| over the run",
      "value": "2.2e-16",
      "relation": "<",
      "bound": "1e-12",
      "holds": true
    }
  ],
  "silicon": [
    "quat_mul",
    "quat_rotate_vec"
  ]
}