FAILURE MAP
← Case archive

FA-93501 / Solar tracker geometry / Open access

Heliostat mirror normal aiming: normal elevation · case 01

Mirrors facing the zenith are commanded to the horizon.

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

ROOT CAUSE

The elevation is computed with acos, which yields the zenith angle.

VERIFIED REPAIR

Elevation = asin(up component of the unit normal).

Unsuccessful approach: atan of the up component alone is not the elevation of a unit vector.

Case contract

mirror and receiver are [east, north, up] positions in metres. The mirror normal bisects the unit sun vector (east=cos(el)sin(az), north=cos(el)cos(az), up=sin(el)) and the unit vector from the mirror to the receiver. Return [normal azimuth 0..360 clockwise from north, normal elevation], rounded to 3; None when sun_el <= 0; 'invalid' when receiver equals mirror.

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(sun_az, sun_el, mirror, receiver):
    if sun_el <= 0:
        return None
    dx = [receiver[i] - mirror[i] for i in range(3)]
    d = math.sqrt(sum(v * v for v in dx))
    if d == 0:
        return 'invalid'
    t = [v / d for v in dx]
    az = math.radians(sun_az)
    el = math.radians(sun_el)
    s = [math.cos(el) * math.sin(az), math.cos(el) * math.cos(az), math.sin(el)]
    h = [s[i] + t[i] for i in range(3)]
    m = math.sqrt(sum(v * v for v in h))
    h = [v / m for v in h]
    n_az = math.degrees(math.atan2(h[0], h[1])) % 360
    n_el = math.degrees(math.acos(h[2]))
    return [round(n_az, 3), round(n_el, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [270, 60, [6, -1, 1], [0, 5, 0]], [300.29, 28.278]],
  ['regression: normal elevation (partial repair)', [270, 80, [-16, -19, 1], [0, 0, 0]],
   [31.588, 46.473]],
  ['control 1', [90, -3, [-12, 43, 1], [0, 0, 0]], None],
  ['control 2', [200, 60, [-10, 12, 0], [0, 0, 60]], [180.839, 70.11]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 25, [47, -28, 0], [0, 0, 60]], [308.943, 36.527]],
  ['regression: normal elevation (partial repair)', [90, 25, [-19, 40, 2], [-10, 5, 60]],
   [116.262, 47.684]],
  ['control 1', [135, 60, [31, 24, 2], [10, 0, 60]], [177.1, 67.63]],
  ['control 2', [225, -3, [-22, -29, 0], [0, 5, 30]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [60, 40, [7, -5, 0], [0, 0, 60]], [49.649, 66.233]],
  ['regression: normal elevation (partial repair)', [315, 10, [-37, 26, 0], [0, -5, 60]],
   [323.691, 69.061]],
  ['control 1', [90, 10, [-6, -40, 0], [-10, 0, 30]], [48.617, 32.61]],
  ['control 2', [30, 10, [-44, 5, 1], [-10, 0, 0]], [64.473, 5.033]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 60, [-28, -33, 2], [-10, 5, 60]], [353.399, 62.028]],
  ['regression: normal elevation (partial repair)', [200, 80, [9, 42, 3], [-10, 0, 30]],
   [203.614, 55.19]],
  ['control 1', [150, 40, [16, -12, 0], [0, 0, 0]], [261.353, 56.729]],
  ['control 2', [90, 0, [46, -4, 0], [0, -5, 0]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [225, 40, [-5, 13, 2], [-10, -5, 30]], [212.668, 49.07]],
  ['regression: normal elevation (partial repair)', [200, 10, [41, -47, 2], [0, 0, 30]],
   [255.744, 31.113]],
  ['control 1', [250, -3, [-49, 36, 3], [-10, 5, 60]], None],
  ['control 2', [300, 80, [-27, -17, 1], [-10, 0, 60]], [18.225, 78.974]]]]
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
boundary: receiver at mirrorinvalidinvalidPassed
normal: receiver due north on tower[180.0, 2.5][180.0, 87.5]Failed
boundary: nightNoneNonePassed
regression: normal elevation[300.29, 61.722][300.29, 28.278]Failed
regression: normal elevation (partial repair)[31.588, 43.527][31.588, 46.473]Failed
control 1NoneNonePassed
control 2[180.839, 19.89][180.839, 70.11]Failed

SHA-256 / 8a9d7cbaa071fa0343f4124941453999b40b6dd13a6c69c72a819dd48617a3d9

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(sun_az, sun_el, mirror, receiver):
    if sun_el <= 0:
        return None
    dx = [receiver[i] - mirror[i] for i in range(3)]
    d = math.sqrt(sum(v * v for v in dx))
    if d == 0:
        return 'invalid'
    t = [v / d for v in dx]
    az = math.radians(sun_az)
    el = math.radians(sun_el)
    s = [math.cos(el) * math.sin(az), math.cos(el) * math.cos(az), math.sin(el)]
    h = [s[i] + t[i] for i in range(3)]
    m = math.sqrt(sum(v * v for v in h))
    h = [v / m for v in h]
    n_az = math.degrees(math.atan2(h[0], h[1])) % 360
    n_el = math.degrees(math.atan(h[2]))
    return [round(n_az, 3), round(n_el, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [270, 60, [6, -1, 1], [0, 5, 0]], [300.29, 28.278]],
  ['regression: normal elevation (partial repair)', [270, 80, [-16, -19, 1], [0, 0, 0]],
   [31.588, 46.473]],
  ['control 1', [90, -3, [-12, 43, 1], [0, 0, 0]], None],
  ['control 2', [200, 60, [-10, 12, 0], [0, 0, 60]], [180.839, 70.11]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 25, [47, -28, 0], [0, 0, 60]], [308.943, 36.527]],
  ['regression: normal elevation (partial repair)', [90, 25, [-19, 40, 2], [-10, 5, 60]],
   [116.262, 47.684]],
  ['control 1', [135, 60, [31, 24, 2], [10, 0, 60]], [177.1, 67.63]],
  ['control 2', [225, -3, [-22, -29, 0], [0, 5, 30]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [60, 40, [7, -5, 0], [0, 0, 60]], [49.649, 66.233]],
  ['regression: normal elevation (partial repair)', [315, 10, [-37, 26, 0], [0, -5, 60]],
   [323.691, 69.061]],
  ['control 1', [90, 10, [-6, -40, 0], [-10, 0, 30]], [48.617, 32.61]],
  ['control 2', [30, 10, [-44, 5, 1], [-10, 0, 0]], [64.473, 5.033]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 60, [-28, -33, 2], [-10, 5, 60]], [353.399, 62.028]],
  ['regression: normal elevation (partial repair)', [200, 80, [9, 42, 3], [-10, 0, 30]],
   [203.614, 55.19]],
  ['control 1', [150, 40, [16, -12, 0], [0, 0, 0]], [261.353, 56.729]],
  ['control 2', [90, 0, [46, -4, 0], [0, -5, 0]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [225, 40, [-5, 13, 2], [-10, -5, 30]], [212.668, 49.07]],
  ['regression: normal elevation (partial repair)', [200, 10, [41, -47, 2], [0, 0, 30]],
   [255.744, 31.113]],
  ['control 1', [250, -3, [-49, 36, 3], [-10, 5, 60]], None],
  ['control 2', [300, 80, [-27, -17, 1], [-10, 0, 60]], [18.225, 78.974]]]]
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
boundary: receiver at mirrorinvalidinvalidPassed
normal: receiver due north on tower[180.0, 44.973][180.0, 87.5]Failed
boundary: nightNoneNonePassed
regression: normal elevation[300.29, 25.349][300.29, 28.278]Failed
regression: normal elevation (partial repair)[31.588, 35.944][31.588, 46.473]Failed
control 1NoneNonePassed
control 2[180.839, 43.239][180.839, 70.11]Failed

SHA-256 / e7f2c1538d6663eac4db2cbede3dda352c4e8edb68ed3d9f102c02c993199043

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(sun_az, sun_el, mirror, receiver):
    if sun_el <= 0:
        return None
    dx = [receiver[i] - mirror[i] for i in range(3)]
    d = math.sqrt(sum(v * v for v in dx))
    if d == 0:
        return 'invalid'
    t = [v / d for v in dx]
    az = math.radians(sun_az)
    el = math.radians(sun_el)
    s = [math.cos(el) * math.sin(az), math.cos(el) * math.cos(az), math.sin(el)]
    h = [s[i] + t[i] for i in range(3)]
    m = math.sqrt(sum(v * v for v in h))
    h = [v / m for v in h]
    n_az = math.degrees(math.atan2(h[0], h[1])) % 360
    n_el = math.degrees(math.asin(h[2]))
    return [round(n_az, 3), round(n_el, 3)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [270, 60, [6, -1, 1], [0, 5, 0]], [300.29, 28.278]],
  ['regression: normal elevation (partial repair)', [270, 80, [-16, -19, 1], [0, 0, 0]],
   [31.588, 46.473]],
  ['control 1', [90, -3, [-12, 43, 1], [0, 0, 0]], None],
  ['control 2', [200, 60, [-10, 12, 0], [0, 0, 60]], [180.839, 70.11]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 25, [47, -28, 0], [0, 0, 60]], [308.943, 36.527]],
  ['regression: normal elevation (partial repair)', [90, 25, [-19, 40, 2], [-10, 5, 60]],
   [116.262, 47.684]],
  ['control 1', [135, 60, [31, 24, 2], [10, 0, 60]], [177.1, 67.63]],
  ['control 2', [225, -3, [-22, -29, 0], [0, 5, 30]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [60, 40, [7, -5, 0], [0, 0, 60]], [49.649, 66.233]],
  ['regression: normal elevation (partial repair)', [315, 10, [-37, 26, 0], [0, -5, 60]],
   [323.691, 69.061]],
  ['control 1', [90, 10, [-6, -40, 0], [-10, 0, 30]], [48.617, 32.61]],
  ['control 2', [30, 10, [-44, 5, 1], [-10, 0, 0]], [64.473, 5.033]]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [315, 60, [-28, -33, 2], [-10, 5, 60]], [353.399, 62.028]],
  ['regression: normal elevation (partial repair)', [200, 80, [9, 42, 3], [-10, 0, 30]],
   [203.614, 55.19]],
  ['control 1', [150, 40, [16, -12, 0], [0, 0, 0]], [261.353, 56.729]],
  ['control 2', [90, 0, [46, -4, 0], [0, -5, 0]], None]],
 [['boundary: receiver at mirror', [180, 40, [0, 0, 0], [0, 0, 0]], 'invalid'],
  ['normal: receiver due north on tower', [180, 40, [0, -40, 0], [0, 0, 40]], [180.0, 87.5]],
  ['boundary: night', [90, 0, [10, 10, 0], [0, 0, 50]], None],
  ['regression: normal elevation', [225, 40, [-5, 13, 2], [-10, -5, 30]], [212.668, 49.07]],
  ['regression: normal elevation (partial repair)', [200, 10, [41, -47, 2], [0, 0, 30]],
   [255.744, 31.113]],
  ['control 1', [250, -3, [-49, 36, 3], [-10, 5, 60]], None],
  ['control 2', [300, 80, [-27, -17, 1], [-10, 0, 60]], [18.225, 78.974]]]]
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
boundary: receiver at mirrorinvalidinvalidPassed
normal: receiver due north on tower[180.0, 87.5][180.0, 87.5]Passed
boundary: nightNoneNonePassed
regression: normal elevation[300.29, 28.278][300.29, 28.278]Passed
regression: normal elevation (partial repair)[31.588, 46.473][31.588, 46.473]Passed
control 1NoneNonePassed
control 2[180.839, 70.11][180.839, 70.11]Passed

SHA-256 / ba3d45a4bb40fdaf865bb4c5e11d6376e647750789cbcb3547664d011a2a1ca9

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:55.673878+00:00.

Case digest / a3c7bd425c3111cb7d9ba2b72240f7194039ccd69b9ecedeaac7bf595dd80531