FAILURE MAP
← Case archive

FA-93491 / Solar tracker geometry / Open access

Heliostat mirror normal aiming: target normalisation · case 01

Mirror normals point almost straight at the receiver instead of halfway to the sun.

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

ROOT CAUSE

The target vector is not normalised before being added to the unit sun vector.

THE FAILURE

The target vector is not normalised before being added to the unit sun vector.

Unsuccessful approach: Scaling by the largest component does not produce 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 = 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: target normalisation', [270, 60, [6, -1, 1], [0, 5, 0]], [300.29, 28.278]],
  ['regression: target normalisation (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: target normalisation', [315, 25, [47, -28, 0], [0, 0, 60]], [308.943, 36.527]],
  ['regression: target normalisation (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: target normalisation', [60, 40, [7, -5, 0], [0, 0, 60]], [49.649, 66.233]],
  ['regression: target normalisation (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: target normalisation', [315, 60, [-28, -33, 2], [-10, 5, 60]], [353.399, 62.028]],
  ['regression: target normalisation (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: target normalisation', [225, 40, [-5, 13, 2], [-10, -5, 30]], [212.668, 49.07]],
  ['regression: target normalisation (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[0.0, 46.01][180.0, 87.5]Failed
boundary: nightNoneNonePassed
regression: target normalisation[312.709, -0.868][300.29, 28.278]Failed
regression: target normalisation (partial repair)[39.793, -0.035][31.588, 46.473]Failed
control 1NoneNonePassed
control 2[141.754, 75.379][180.839, 70.11]Failed

SHA-256 / 6b0571c9fa1f99c093b9aeedacc74f98697a2bd9c56e0db64d8c33bb362187c0

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 / max(abs(x) for x in dx) 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: target normalisation', [270, 60, [6, -1, 1], [0, 5, 0]], [300.29, 28.278]],
  ['regression: target normalisation (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: target normalisation', [315, 25, [47, -28, 0], [0, 0, 60]], [308.943, 36.527]],
  ['regression: target normalisation (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: target normalisation', [60, 40, [7, -5, 0], [0, 0, 60]], [49.649, 66.233]],
  ['regression: target normalisation (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: target normalisation', [315, 60, [-28, -33, 2], [-10, 5, 60]], [353.399, 62.028]],
  ['regression: target normalisation (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: target normalisation', [225, 40, [-5, 13, 2], [-10, -5, 30]], [212.668, 49.07]],
  ['regression: target normalisation (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[0.0, 81.895][180.0, 87.5]Failed
boundary: nightNoneNonePassed
regression: target normalisation[303.69, 21.203][300.29, 28.278]Failed
regression: target normalisation (partial repair)[33.761, 37.775][31.588, 46.473]Failed
control 1NoneNonePassed
control 2[180.372, 70.253][180.839, 70.11]Failed

SHA-256 / 8a0083b7d5997e9b1da21df11ce65ab2965111a09a51e720cecebeaed1e27b5d

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / 44ec897be11b292eb18e16a8e3168efa797057494213928f039be76dd5f279b7