FAILURE MAP
← Case archive

FA-93631 / Solar tracker geometry / Open access

Cross-axis slope aware backtracking: correction angle units · case 01

Backtracking barely changes the angle and rows keep shading each other.

Verified by executionVariant 1 · 7 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The acos correction is applied in radians to an angle in degrees.

VERIFIED REPAIR

Convert the acos correction to degrees.

Unsuccessful approach: Using asin yields the complementary correction angle.

Case 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.

Why this case matters

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.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ideal, gcr, cross_tilt, max_angle):
    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))
    temp = dist * math.cos(math.radians(ideal - cross_tilt))
    if temp < 1:
        theta = ideal - math.copysign(math.acos(max(temp, -1.0)), ideal)
    else:
        theta = ideal
    theta = max(-max_angle, min(max_angle, theta))
    return round(theta, 3)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.5, 0, 75], -10.322],
  ['regression: correction angle units (partial repair)', [80, 0.3, -10, 55], -10.0],
  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [60, 0.5, -5, 55], 28.045],
  ['regression: correction angle units (partial repair)', [-80, 0.3, 0, 75], -25.368],
  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 15, 60], 2.496],
  ['regression: correction angle units (partial repair)', [80, 0.4, 5, 55], 30.505],
  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.4, -10, 75], -50.255],
  ['regression: correction angle units (partial repair)', [80, 0.3, -5, 55], 6.955],
  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 5, 75], -40.0],
  ['regression: correction angle units (partial repair)', [-80, 0.4, 0, 75], -15.729],
  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
normal: flat terrain matches plain backtracking-60-38.765Failed
boundary: slope-facing noon00Passed
boundary: clamp after backtracking50-10.0Failed
regression: correction angle units-75-10.322Failed
regression: correction angle units (partial repair)55-10.0Failed
control 1-45-45Passed
control 2-60-60Passed

SHA-256 / 99d14b7de9dfb56e1647cb8d1d2be0347107b0bf101c6f6ff1b99bfd49c6661c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ideal, gcr, cross_tilt, max_angle):
    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))
    temp = dist * math.cos(math.radians(ideal - cross_tilt))
    if temp < 1:
        theta = ideal - math.copysign(math.degrees(math.asin(max(temp, -1.0))), ideal)
    else:
        theta = ideal
    theta = max(-max_angle, min(max_angle, theta))
    return round(theta, 3)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.5, 0, 75], -10.322],
  ['regression: correction angle units (partial repair)', [80, 0.3, -10, 55], -10.0],
  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [60, 0.5, -5, 55], 28.045],
  ['regression: correction angle units (partial repair)', [-80, 0.3, 0, 75], -25.368],
  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 15, 60], 2.496],
  ['regression: correction angle units (partial repair)', [80, 0.4, 5, 55], 30.505],
  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.4, -10, 75], -50.255],
  ['regression: correction angle units (partial repair)', [80, 0.3, -5, 55], 6.955],
  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 5, 75], -40.0],
  ['regression: correction angle units (partial repair)', [-80, 0.4, 0, 75], -15.729],
  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
normal: flat terrain matches plain backtracking-11.235-38.765Failed
boundary: slope-facing noon00Passed
boundary: clamp after backtracking50-10.0Failed
regression: correction angle units-59.678-10.322Failed
regression: correction angle units (partial repair)55-10.0Failed
control 1-45-45Passed
control 2-60-60Passed

SHA-256 / 53c5ec795504c1672c8192c87e8fd9905aea6cb077f0a71c6590fb288aa0ec17

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(ideal, gcr, cross_tilt, max_angle):
    dist = 1 / (gcr * math.cos(math.radians(cross_tilt)))
    temp = dist * math.cos(math.radians(ideal - cross_tilt))
    if temp < 1:
        theta = ideal - math.copysign(math.degrees(math.acos(max(temp, -1.0))), ideal)
    else:
        theta = ideal
    theta = max(-max_angle, min(max_angle, theta))
    return round(theta, 3)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.5, 0, 75], -10.322],
  ['regression: correction angle units (partial repair)', [80, 0.3, -10, 55], -10.0],
  ['control 1', [-45, 0.5, -5, 50], -45], ['control 2', [-60, 0.3, 0, 60], -60]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [60, 0.5, -5, 55], 28.045],
  ['regression: correction angle units (partial repair)', [-80, 0.3, 0, 75], -25.368],
  ['control 1', [80, 0.4, 0, 60], 15.729], ['control 2', [-80, 0.4, 15, 75], 23.037]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 15, 60], 2.496],
  ['regression: correction angle units (partial repair)', [80, 0.4, 5, 55], 30.505],
  ['control 1', [0, 0.4, -5, 55], 0], ['control 2', [70, 0.4, -5, 75], 20.505]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-80, 0.4, -10, 75], -50.255],
  ['regression: correction angle units (partial repair)', [80, 0.3, -5, 55], 6.955],
  ['control 1', [-60, 0.4, -5, 50], -50], ['control 2', [0, 0.4, -5, 60], 0]],
 [['normal: flat terrain matches plain backtracking', [-70, 0.4, 0, 60], -38.765],
  ['boundary: slope-facing noon', [0, 0.4, 10, 60], 0],
  ['boundary: clamp after backtracking', [80, 0.3, -10, 50], -10.0],
  ['regression: correction angle units', [-70, 0.3, 5, 75], -40.0],
  ['regression: correction angle units (partial repair)', [-80, 0.4, 0, 75], -15.729],
  ['control 1', [-80, 0.5, 0, 75], -10.322], ['control 2', [-45, 0.4, 15, 50], -45]]]
for label, args, expected in fixtures[N-1]:
    check(label, solve(*args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
normal: flat terrain matches plain backtracking-38.765-38.765Passed
boundary: slope-facing noon00Passed
boundary: clamp after backtracking-10.0-10.0Passed
regression: correction angle units-10.322-10.322Passed
regression: correction angle units (partial repair)-10.0-10.0Passed
control 1-45-45Passed
control 2-60-60Passed

SHA-256 / 186c68c2219b639e295795f75a5461e8a8a9e6574fe14ae92965b4976b84e6f9

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:51:56.873039+00:00.

Case digest / 8028cac23b3acce7135b5385762f19f63ed574b36dbb9b7343bcb1c0b8d85171