{"abstract":"A level tracker reads 90 degrees.","category":"Solar tracker geometry","checks":7,"contract":"ax (across-axis) and az (normal) are gravity components in g. The magnitude must be within [0.8, 1.2] g, else [None, 'fault']. Rotation = atan2(ax, az) in degrees, negated for a sensor mounted on the west side, then minus the calibration offset, normalised to (-180, 180]. Return [angle rounded 2, 'ok'].","evaluation_group":"w2-solar_tracker_geometry-inclinometer-rotation","failed_approach":"A plain arctangent loses the quadrant when the tube is past vertical.","family":"w2-solar_tracker_geometry-inclinometer-rotation-angle-quadrant","id":"FA-93591","implementations":{"attempt":{"sha256":"d6a9ce4ebe99e4eca07f3c8dce3fc53aab0d38e3826a268966e55007cf335293","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ax, az, mount, offset):\n    mag = math.hypot(ax, az)\n    if not 0.8 <= mag <= 1.2:\n        return [None, 'fault']\n    ang = math.degrees(math.atan(ax / az)) if az else 90.0\n    if mount == 'west':\n        ang = -ang\n    ang -= offset\n    ang = (ang + 180) % 360 - 180\n    if ang == -180:\n        ang = 180.0\n    return [round(ang, 2), 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.7778, -0.7778, 'west', 5], [-140.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-0.0175, -0.9998, 'west', 0], [179.0, 'ok']],\n  ['control 1', [-1.1, 0.0, 'west', 0], [90.0, 'ok']],\n  ['control 2', [-0.4, 0.6928, 'east', 0], [None, 'fault']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.0, -1.0, 'east', 2], [178.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.5657, -0.5657, 'west', 2], [-137.0, 'ok']],\n  ['control 1', [-0.7778, 0.7778, 'east', 0], [-45.0, 'ok']],\n  ['control 2', [0.0, 1.1, 'east', 2], [-2.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.2588, 0.9659, 'east', 0], [15.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-1.0392, -0.6, 'east', 5], [-125.0, 'ok']],\n  ['control 1', [0.25, 0.433, 'west', 2], [None, 'fault']],\n  ['control 2', [0.8485, -0.8485, 'west', -3], [-132.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.9526, 0.55, 'west', 0], [-60.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.0, -1.0, 'east', 5], [175.0, 'ok']],\n  ['control 1', [0.5657, -0.5657, 'east', -3], [138.0, 'ok']],\n  ['control 2', [-0.6, 1.0392, 'east', 0], [-30.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [-0.866, -0.5, 'west', 2], [118.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.7071, -0.7071, 'east', 0], [135.0, 'ok']],\n  ['control 1', [0.6928, 0.4, 'east', 5], [None, 'fault']],\n  ['control 2', [-0.55, 0.9526, 'east', 2], [-32.0, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"e8a5e63d1bc1fa0e9281dd2bd71c1aa36fb5845c838af13a11720ca6048ffe3b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ax, az, mount, offset):\n    mag = math.hypot(ax, az)\n    if not 0.8 <= mag <= 1.2:\n        return [None, 'fault']\n    ang = math.degrees(math.atan2(az, ax))\n    if mount == 'west':\n        ang = -ang\n    ang -= offset\n    ang = (ang + 180) % 360 - 180\n    if ang == -180:\n        ang = 180.0\n    return [round(ang, 2), 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.7778, -0.7778, 'west', 5], [-140.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-0.0175, -0.9998, 'west', 0], [179.0, 'ok']],\n  ['control 1', [-1.1, 0.0, 'west', 0], [90.0, 'ok']],\n  ['control 2', [-0.4, 0.6928, 'east', 0], [None, 'fault']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.0, -1.0, 'east', 2], [178.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.5657, -0.5657, 'west', 2], [-137.0, 'ok']],\n  ['control 1', [-0.7778, 0.7778, 'east', 0], [-45.0, 'ok']],\n  ['control 2', [0.0, 1.1, 'east', 2], [-2.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.2588, 0.9659, 'east', 0], [15.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-1.0392, -0.6, 'east', 5], [-125.0, 'ok']],\n  ['control 1', [0.25, 0.433, 'west', 2], [None, 'fault']],\n  ['control 2', [0.8485, -0.8485, 'west', -3], [-132.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.9526, 0.55, 'west', 0], [-60.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.0, -1.0, 'east', 5], [175.0, 'ok']],\n  ['control 1', [0.5657, -0.5657, 'east', -3], [138.0, 'ok']],\n  ['control 2', [-0.6, 1.0392, 'east', 0], [-30.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [-0.866, -0.5, 'west', 2], [118.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.7071, -0.7071, 'east', 0], [135.0, 'ok']],\n  ['control 1', [0.6928, 0.4, 'east', 5], [None, 'fault']],\n  ['control 2', [-0.55, 0.9526, 'east', 2], [-32.0, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"39a378fbc312f82142b046707c415dee07d303b36d435776dc83c1b41193bdc5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ax, az, mount, offset):\n    mag = math.hypot(ax, az)\n    if not 0.8 <= mag <= 1.2:\n        return [None, 'fault']\n    ang = math.degrees(math.atan2(ax, az))\n    if mount == 'west':\n        ang = -ang\n    ang -= offset\n    ang = (ang + 180) % 360 - 180\n    if ang == -180:\n        ang = 180.0\n    return [round(ang, 2), 'ok']\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.7778, -0.7778, 'west', 5], [-140.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-0.0175, -0.9998, 'west', 0], [179.0, 'ok']],\n  ['control 1', [-1.1, 0.0, 'west', 0], [90.0, 'ok']],\n  ['control 2', [-0.4, 0.6928, 'east', 0], [None, 'fault']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.0, -1.0, 'east', 2], [178.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.5657, -0.5657, 'west', 2], [-137.0, 'ok']],\n  ['control 1', [-0.7778, 0.7778, 'east', 0], [-45.0, 'ok']],\n  ['control 2', [0.0, 1.1, 'east', 2], [-2.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.2588, 0.9659, 'east', 0], [15.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [-1.0392, -0.6, 'east', 5], [-125.0, 'ok']],\n  ['control 1', [0.25, 0.433, 'west', 2], [None, 'fault']],\n  ['control 2', [0.8485, -0.8485, 'west', -3], [-132.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [0.9526, 0.55, 'west', 0], [-60.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.0, -1.0, 'east', 5], [175.0, 'ok']],\n  ['control 1', [0.5657, -0.5657, 'east', -3], [138.0, 'ok']],\n  ['control 2', [-0.6, 1.0392, 'east', 0], [-30.0, 'ok']]],\n [['boundary: magnitude at lower bound', [0.0, 0.8, 'east', 0], [0.0, 'ok']],\n  ['boundary: magnitude at upper bound', [1.2, 0.0, 'east', 0], [90.0, 'ok']],\n  ['boundary: upside-down reading', [0.0, -1.0, 'east', 0], [180.0, 'ok']],\n  ['regression: angle quadrant', [-0.866, -0.5, 'west', 2], [118.0, 'ok']],\n  ['regression: angle quadrant (partial repair)', [0.7071, -0.7071, 'east', 0], [135.0, 'ok']],\n  ['control 1', [0.6928, 0.4, 'east', 5], [None, 'fault']],\n  ['control 2', [-0.55, 0.9526, 'east', 2], [-32.0, 'ok']]]]\nfor label, args, expected in fixtures[N-1]:\n    check(label, solve(*args), expected)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"Deterministic stipulated toy contract for teaching; no claim of conformance with any standard, vendor protocol or production controller. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w2-solar_tracker_geometry-inclinometer-rotation-angle-quadrant","generated_at":"2026-09-29T14:51:56.539938+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Single-axis and dual-axis solar trackers turn a sun direction into actuator commands; a sign, frame or limit mistake points a whole plant away from the sun or into a mechanical stop.","repair":"Rotation = atan2(ax, az).","root_cause":"atan2 arguments are swapped.","sha256":"d09f8c89300c6835b6e17dec7356a4bd8bbef7e9a372f4c5d0c1fa447fd342ee","title":"Torque-tube inclinometer rotation: angle quadrant · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.004,"exit_code":1,"observations":[{"actual":[0.0,"ok"],"check":"boundary: magnitude at lower bound","expected":[0.0,"ok"],"passed":true},{"actual":[90.0,"ok"],"check":"boundary: magnitude at upper bound","expected":[90.0,"ok"],"passed":true},{"actual":[0.0,"ok"],"check":"boundary: upside-down reading","expected":[180.0,"ok"],"passed":false},{"actual":[40.0,"ok"],"check":"regression: angle quadrant","expected":[-140.0,"ok"],"passed":false},{"actual":[-1.0,"ok"],"check":"regression: angle quadrant (partial repair)","expected":[179.0,"ok"],"passed":false},{"actual":[-90.0,"ok"],"check":"control 1","expected":[90.0,"ok"],"passed":false},{"actual":[null,"fault"],"check":"control 2","expected":[null,"fault"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: magnitude at lower bound\", \"actual\": [0.0, \"ok\"], \"expected\": [0.0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: magnitude at upper bound\", \"actual\": [90.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: upside-down reading\", \"actual\": [0.0, \"ok\"], \"expected\": [180.0, \"ok\"], \"passed\": false}, {\"check\": \"regression: angle quadrant\", \"actual\": [40.0, \"ok\"], \"expected\": [-140.0, \"ok\"], \"passed\": false}, {\"check\": \"regression: angle quadrant (partial repair)\", \"actual\": [-1.0, \"ok\"], \"expected\": [179.0, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [-90.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [null, \"fault\"], \"expected\": [null, \"fault\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.999,"exit_code":1,"observations":[{"actual":[90.0,"ok"],"check":"boundary: magnitude at lower bound","expected":[0.0,"ok"],"passed":false},{"actual":[0.0,"ok"],"check":"boundary: magnitude at upper bound","expected":[90.0,"ok"],"passed":false},{"actual":[-90.0,"ok"],"check":"boundary: upside-down reading","expected":[180.0,"ok"],"passed":false},{"actual":[40.0,"ok"],"check":"regression: angle quadrant","expected":[-140.0,"ok"],"passed":false},{"actual":[91.0,"ok"],"check":"regression: angle quadrant (partial repair)","expected":[179.0,"ok"],"passed":false},{"actual":[180.0,"ok"],"check":"control 1","expected":[90.0,"ok"],"passed":false},{"actual":[null,"fault"],"check":"control 2","expected":[null,"fault"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: magnitude at lower bound\", \"actual\": [90.0, \"ok\"], \"expected\": [0.0, \"ok\"], \"passed\": false}, {\"check\": \"boundary: magnitude at upper bound\", \"actual\": [0.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": false}, {\"check\": \"boundary: upside-down reading\", \"actual\": [-90.0, \"ok\"], \"expected\": [180.0, \"ok\"], \"passed\": false}, {\"check\": \"regression: angle quadrant\", \"actual\": [40.0, \"ok\"], \"expected\": [-140.0, \"ok\"], \"passed\": false}, {\"check\": \"regression: angle quadrant (partial repair)\", \"actual\": [91.0, \"ok\"], \"expected\": [179.0, \"ok\"], \"passed\": false}, {\"check\": \"control 1\", \"actual\": [180.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": false}, {\"check\": \"control 2\", \"actual\": [null, \"fault\"], \"expected\": [null, \"fault\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.137,"exit_code":0,"observations":[{"actual":[0.0,"ok"],"check":"boundary: magnitude at lower bound","expected":[0.0,"ok"],"passed":true},{"actual":[90.0,"ok"],"check":"boundary: magnitude at upper bound","expected":[90.0,"ok"],"passed":true},{"actual":[180.0,"ok"],"check":"boundary: upside-down reading","expected":[180.0,"ok"],"passed":true},{"actual":[-140.0,"ok"],"check":"regression: angle quadrant","expected":[-140.0,"ok"],"passed":true},{"actual":[179.0,"ok"],"check":"regression: angle quadrant (partial repair)","expected":[179.0,"ok"],"passed":true},{"actual":[90.0,"ok"],"check":"control 1","expected":[90.0,"ok"],"passed":true},{"actual":[null,"fault"],"check":"control 2","expected":[null,"fault"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"boundary: magnitude at lower bound\", \"actual\": [0.0, \"ok\"], \"expected\": [0.0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: magnitude at upper bound\", \"actual\": [90.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": true}, {\"check\": \"boundary: upside-down reading\", \"actual\": [180.0, \"ok\"], \"expected\": [180.0, \"ok\"], \"passed\": true}, {\"check\": \"regression: angle quadrant\", \"actual\": [-140.0, \"ok\"], \"expected\": [-140.0, \"ok\"], \"passed\": true}, {\"check\": \"regression: angle quadrant (partial repair)\", \"actual\": [179.0, \"ok\"], \"expected\": [179.0, \"ok\"], \"passed\": true}, {\"check\": \"control 1\", \"actual\": [90.0, \"ok\"], \"expected\": [90.0, \"ok\"], \"passed\": true}, {\"check\": \"control 2\", \"actual\": [null, \"fault\"], \"expected\": [null, \"fault\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}