{"abstract":"Rows backtrack on the downhill side when they should on the uphill side.","category":"Solar tracker geometry","checks":7,"contract":"Rows on terrain with cross-axis slope cross_tilt degrees. dist = 1/(gcr*cos(cross_tilt)); temp = dist*cos(ideal - cross_tilt). When temp < 1 the angle becomes ideal - sign(ideal)*acos(max(temp, -1)) degrees, else ideal. The result is then clamped to +-max_angle. Return the angle rounded to 3.","evaluation_group":"w2-solar_tracker_geometry-cross-slope-backtracking","failed_approach":"Ignoring the slope in the shading test backtracks as if the ground were flat.","family":"w2-solar_tracker_geometry-cross-slope-backtracking-angle-relative-to-slope","id":"FA-93626","implementations":{"attempt":{"sha256":"8f50a3d09f28401db388771a5827fefd77814721a6b1f2661ae124207de002a6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ideal, gcr, cross_tilt, max_angle):\n    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))\n    temp = dist * math.cos(math.radians(ideal))\n    if temp < 1:\n        theta = ideal - math.copysign(math.degrees(math.acos(max(temp, -1.0))), ideal)\n    else:\n        theta = ideal\n    theta = max(-max_angle, min(max_angle, theta))\n    return round(theta, 3)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [80, 0.3, -10, 55], -10.0],\n  ['regression: angle relative to slope (partial repair)', [-60, 0.5, 5, 50], -28.045],\n  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.5, -5, 55], 28.045],\n  ['regression: angle relative to slope (partial repair)', [80, 0.4, 10, 60], 50.255],\n  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.4, 15, 55], 55],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 15, 60], 2.496],\n  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-80, 0.4, -10, 75], -50.255],\n  ['regression: angle relative to slope (partial repair)', [80, 0.3, -5, 55], 6.955],\n  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-70, 0.3, -5, 60], -60],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 5, 75], -40.0],\n  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]\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":"64af543873ddbc7dff482c11dcd75df16eaef92d9d0856831a7c2be84c2f60f6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ideal, gcr, cross_tilt, max_angle):\n    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))\n    temp = dist * math.cos(math.radians(ideal + cross_tilt))\n    if temp < 1:\n        theta = ideal - math.copysign(math.degrees(math.acos(max(temp, -1.0))), ideal)\n    else:\n        theta = ideal\n    theta = max(-max_angle, min(max_angle, theta))\n    return round(theta, 3)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [80, 0.3, -10, 55], -10.0],\n  ['regression: angle relative to slope (partial repair)', [-60, 0.5, 5, 50], -28.045],\n  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.5, -5, 55], 28.045],\n  ['regression: angle relative to slope (partial repair)', [80, 0.4, 10, 60], 50.255],\n  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.4, 15, 55], 55],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 15, 60], 2.496],\n  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-80, 0.4, -10, 75], -50.255],\n  ['regression: angle relative to slope (partial repair)', [80, 0.3, -5, 55], 6.955],\n  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-70, 0.3, -5, 60], -60],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 5, 75], -40.0],\n  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]\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":"8378eb4b083aa738033d6125b7d6d8b4b2567b7080c74c10c6d48d0df1ddaa30","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(ideal, gcr, cross_tilt, max_angle):\n    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))\n    temp = dist * math.cos(math.radians(ideal - cross_tilt))\n    if temp < 1:\n        theta = ideal - math.copysign(math.degrees(math.acos(max(temp, -1.0))), ideal)\n    else:\n        theta = ideal\n    theta = max(-max_angle, min(max_angle, theta))\n    return round(theta, 3)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [80, 0.3, -10, 55], -10.0],\n  ['regression: angle relative to slope (partial repair)', [-60, 0.5, 5, 50], -28.045],\n  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.5, -5, 55], 28.045],\n  ['regression: angle relative to slope (partial repair)', [80, 0.4, 10, 60], 50.255],\n  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [60, 0.4, 15, 55], 55],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 15, 60], 2.496],\n  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-80, 0.4, -10, 75], -50.255],\n  ['regression: angle relative to slope (partial repair)', [80, 0.3, -5, 55], 6.955],\n  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],\n [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],\n  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],\n  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],\n  ['regression: angle relative to slope', [-70, 0.3, -5, 60], -60],\n  ['regression: angle relative to slope (partial repair)', [-70, 0.3, 5, 75], -40.0],\n  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]\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-cross-slope-backtracking-angle-relative-to-slope","generated_at":"2026-09-29T14:51:56.831553+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":"Evaluate cos(ideal - cross_tilt).","root_cause":"The slope is added to the rotation instead of subtracted.","sha256":"5c3d8e3f76feb7f4d7239d7c8941d6ed66adc83a31bfad1dbc267ac5d645dd5d","title":"Cross-axis slope aware backtracking: angle relative to slope · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.607,"exit_code":1,"observations":[{"actual":-38.765,"check":"normal: flat terrain matches plain backtracking","expected":-38.765,"passed":true},{"actual":0,"check":"boundary: slope-facing noon","expected":0,"passed":true},{"actual":25.998,"check":"boundary: clamp after backtracking","expected":-10.0,"passed":false},{"actual":25.998,"check":"regression: angle relative to slope","expected":-10.0,"passed":false},{"actual":-50,"check":"regression: angle relative to slope (partial repair)","expected":-28.045,"passed":false},{"actual":-45,"check":"control 1","expected":-45,"passed":true},{"actual":-60,"check":"control 2","expected":-60,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal: flat terrain matches plain backtracking\", \"actual\": -38.765, \"expected\": -38.765, \"passed\": true}, {\"check\": \"boundary: slope-facing noon\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary: clamp after backtracking\", \"actual\": 25.998, \"expected\": -10.0, \"passed\": false}, {\"check\": \"regression: angle relative to slope\", \"actual\": 25.998, \"expected\": -10.0, \"passed\": false}, {\"check\": \"regression: angle relative to slope (partial repair)\", \"actual\": -50, \"expected\": -28.045, \"passed\": false}, {\"check\": \"control 1\", \"actual\": -45, \"expected\": -45, \"passed\": true}, {\"check\": \"control 2\", \"actual\": -60, \"expected\": -60, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.592,"exit_code":1,"observations":[{"actual":-38.765,"check":"normal: flat terrain matches plain backtracking","expected":-38.765,"passed":true},{"actual":0,"check":"boundary: slope-facing noon","expected":0,"passed":true},{"actual":50,"check":"boundary: clamp after backtracking","expected":-10.0,"passed":false},{"actual":55,"check":"regression: angle relative to slope","expected":-10.0,"passed":false},{"actual":-50,"check":"regression: angle relative to slope (partial repair)","expected":-28.045,"passed":false},{"actual":-45,"check":"control 1","expected":-45,"passed":true},{"actual":-60,"check":"control 2","expected":-60,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal: flat terrain matches plain backtracking\", \"actual\": -38.765, \"expected\": -38.765, \"passed\": true}, {\"check\": \"boundary: slope-facing noon\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary: clamp after backtracking\", \"actual\": 50, \"expected\": -10.0, \"passed\": false}, {\"check\": \"regression: angle relative to slope\", \"actual\": 55, \"expected\": -10.0, \"passed\": false}, {\"check\": \"regression: angle relative to slope (partial repair)\", \"actual\": -50, \"expected\": -28.045, \"passed\": false}, {\"check\": \"control 1\", \"actual\": -45, \"expected\": -45, \"passed\": true}, {\"check\": \"control 2\", \"actual\": -60, \"expected\": -60, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.062,"exit_code":0,"observations":[{"actual":-38.765,"check":"normal: flat terrain matches plain backtracking","expected":-38.765,"passed":true},{"actual":0,"check":"boundary: slope-facing noon","expected":0,"passed":true},{"actual":-10.0,"check":"boundary: clamp after backtracking","expected":-10.0,"passed":true},{"actual":-10.0,"check":"regression: angle relative to slope","expected":-10.0,"passed":true},{"actual":-28.045,"check":"regression: angle relative to slope (partial repair)","expected":-28.045,"passed":true},{"actual":-45,"check":"control 1","expected":-45,"passed":true},{"actual":-60,"check":"control 2","expected":-60,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"normal: flat terrain matches plain backtracking\", \"actual\": -38.765, \"expected\": -38.765, \"passed\": true}, {\"check\": \"boundary: slope-facing noon\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"boundary: clamp after backtracking\", \"actual\": -10.0, \"expected\": -10.0, \"passed\": true}, {\"check\": \"regression: angle relative to slope\", \"actual\": -10.0, \"expected\": -10.0, \"passed\": true}, {\"check\": \"regression: angle relative to slope (partial repair)\", \"actual\": -28.045, \"expected\": -28.045, \"passed\": true}, {\"check\": \"control 1\", \"actual\": -45, \"expected\": -45, \"passed\": true}, {\"check\": \"control 2\", \"actual\": -60, \"expected\": -60, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}