FA-93621 / Solar tracker geometry / Open access
Cross-axis slope aware backtracking: slope in row spacing · case 01
Rows on sloped ground start backtracking at the wrong time.
ROOT CAUSE
The horizontal row spacing ignores the slope.
VERIFIED REPAIR
Use 1/(gcr*cos(cross_tilt)) as the axis spacing.
Unsuccessful approach: Multiplying by the cosine instead of dividing shrinks the spacing on slopes.
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
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: slope in row spacing', [-60, 0.5, 5, 50], -28.045],
['regression: slope in row spacing (partial repair)', [-70, 0.3, 15, 50], 2.496],
['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: slope in row spacing', [60, 0.5, -5, 55], 28.045],
['regression: slope in row spacing (partial repair)', [80, 0.4, 10, 60], 50.255],
['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: slope in row spacing', [-70, 0.3, 15, 60], 2.496],
['regression: slope in row spacing (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: slope in row spacing', [-80, 0.4, -10, 75], -50.255],
['regression: slope in row spacing (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: slope in row spacing', [-70, 0.3, 5, 75], -40.0],
['regression: slope in row spacing (partial repair)', [80, 0.4, 5, 50], 30.505],
['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal: flat terrain matches plain backtracking | -38.765 | -38.765 | Passed |
| boundary: slope-facing noon | 0 | 0 | Passed |
| boundary: clamp after backtracking | -10.0 | -10.0 | Passed |
| regression: slope in row spacing | -27.697 | -28.045 | Failed |
| regression: slope in row spacing (partial repair) | 3.111 | 2.496 | Failed |
| control 1 | -45 | -45 | Passed |
| control 2 | -60 | -60 | Passed |
SHA-256 / df85c13757be97ad119c62c4edc955c500c003e535558083510f93d1fbf62f7e
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 = math.cos(math.radians(cross_tilt)) / gcr
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: slope in row spacing', [-60, 0.5, 5, 50], -28.045],
['regression: slope in row spacing (partial repair)', [-70, 0.3, 15, 50], 2.496],
['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: slope in row spacing', [60, 0.5, -5, 55], 28.045],
['regression: slope in row spacing (partial repair)', [80, 0.4, 10, 60], 50.255],
['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: slope in row spacing', [-70, 0.3, 15, 60], 2.496],
['regression: slope in row spacing (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: slope in row spacing', [-80, 0.4, -10, 75], -50.255],
['regression: slope in row spacing (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: slope in row spacing', [-70, 0.3, 5, 75], -40.0],
['regression: slope in row spacing (partial repair)', [80, 0.4, 5, 50], 30.505],
['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal: flat terrain matches plain backtracking | -38.765 | -38.765 | Passed |
| boundary: slope-facing noon | 0 | 0 | Passed |
| boundary: clamp after backtracking | -10.0 | -10.0 | Passed |
| regression: slope in row spacing | -27.354 | -28.045 | Failed |
| regression: slope in row spacing (partial repair) | 3.703 | 2.496 | Failed |
| control 1 | -45 | -45 | Passed |
| control 2 | -60 | -60 | Passed |
SHA-256 / f0ac8aca99c15f74a4e02a93ff5bf67bd40725422df40989cd51bc0cad8c5f35
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: slope in row spacing', [-60, 0.5, 5, 50], -28.045],
['regression: slope in row spacing (partial repair)', [-70, 0.3, 15, 50], 2.496],
['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: slope in row spacing', [60, 0.5, -5, 55], 28.045],
['regression: slope in row spacing (partial repair)', [80, 0.4, 10, 60], 50.255],
['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: slope in row spacing', [-70, 0.3, 15, 60], 2.496],
['regression: slope in row spacing (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: slope in row spacing', [-80, 0.4, -10, 75], -50.255],
['regression: slope in row spacing (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: slope in row spacing', [-70, 0.3, 5, 75], -40.0],
['regression: slope in row spacing (partial repair)', [80, 0.4, 5, 50], 30.505],
['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| normal: flat terrain matches plain backtracking | -38.765 | -38.765 | Passed |
| boundary: slope-facing noon | 0 | 0 | Passed |
| boundary: clamp after backtracking | -10.0 | -10.0 | Passed |
| regression: slope in row spacing | -28.045 | -28.045 | Passed |
| regression: slope in row spacing (partial repair) | 2.496 | 2.496 | Passed |
| control 1 | -45 | -45 | Passed |
| control 2 | -60 | -60 | Passed |
SHA-256 / 65aa3c0e0a1894009b2b2a9092aceff50a9ec55523526133b5a73281c821d2ec
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.830739+00:00.
Case digest / b501b7ba7c3aa6f8f460b0dc7d49e6a8abd094d1042cf29231227e331d58f853