FA-70226 / Map projection transforms / Open access
Azimuthal equidistant range and bearing: angular distance unit · case 01
Almost every point is rejected as antipodal or placed far away.
ROOT CAUSE
The angular distance is converted to degrees before being used as a radian distance.
THE FAILURE
The angular distance is converted to degrees before being used as a radian distance.
Unsuccessful approach: Halving c mimics a chord-based formula and shrinks all distances.
Case contract
Input [lon, lat, lon0, lat0]; sphere R = 6371000 centred on (lon0, lat0). cos c is clamped to [-1, 1], c = acos. Points with c > pi - 1e-6 (the antipode neighbourhood) return None. k = 1 at the centre (c < 1e-12) else c/sin c. x = R k cos(p) sin(dl); y = R k (cos(p0) sin(p) - sin(p0) cos(p) cos(dl)). Return [x rounded to 1 decimal, y rounded to 1 decimal, hypot(x, y)/1000 km rounded to 3, azimuth clockwise from north in [0, 360) rounded to 4].
Why this case matters
Radio coverage, flight-range rings and seismology plots use this projection to read range and bearing directly.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
lon, lat, lon0, lat0 = x
R = 6371000.0
phi, phi0 = math.radians(lat), math.radians(lat0)
dl = math.radians(lon - lon0)
cosc = math.sin(phi0) * math.sin(phi) + math.cos(phi0) * math.cos(phi) * math.cos(dl)
cosc = max(-1.0, min(1.0, cosc))
c = math.degrees(math.acos(cosc))
if c > math.pi - 1e-6:
return None
k = 1.0 if c < 1e-12 else c / math.sin(c)
px = R * k * math.cos(phi) * math.sin(dl)
py = R * k * (math.cos(phi0) * math.sin(phi) - math.sin(phi0) * math.cos(phi) * math.cos(dl))
dist = math.hypot(px, py) / 1000.0
az = math.degrees(math.atan2(px, py)) % 360.0
return [round(px, 1), round(py, 1), round(dist, 3), round(az, 4)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [-179.674, 72.844, -100.0, -60.0], [-7721194.5, 13929763.9, 15926.555, 331.0006]), ('control #1', [201.072, 34.17, 140.0, 0.0], [5834953.3, 4525637.3, 7384.313, 52.2026]), ('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #6', [70.317, -25.779, 140.0, 70.0], [-10593752.0, -5551791.2, 11960.35, 242.3426]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #1', [201.072, 34.17, 140.0, 0.0], [5834953.3, 4525637.3, 7384.313, 52.2026]), ('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #6', [70.317, -25.779, 140.0, 70.0], [-10593752.0, -5551791.2, 11960.35, 242.3426]), ('control #7', [82.76, -58.875, 140.0, -60.0], [-2884562.0, -1232854.6, 3136.978, 246.8583]), ('control #8', [-80.409, -20.217, 0.0, 70.0], [-11302865.4, -3238552.9, 11757.678, 254.0117]), ('control #9', [24.308, 5.805, 140.0, 0.0], [-12767659.1, 1440420.7, 12848.655, 276.4368]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #8', [-80.409, -20.217, 0.0, 70.0], [-11302865.4, -3238552.9, 11757.678, 254.0117]), ('control #9', [24.308, 5.805, 140.0, 0.0], [-12767659.1, 1440420.7, 12848.655, 276.4368]), ('control #10', [171.761, -8.363, 140.0, -60.0], [3932496.4, 4951958.7, 6323.482, 38.4541]), ('control #11', [86.324, 1.66, 0.0, -35.0], [9760962.6, 591892.2, 9778.892, 86.5299]), ('control #12', [51.045, 75.896, 45.0, 40.0], [174765.9, 3998901.2, 4002.718, 2.5024]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #11', [86.324, 1.66, 0.0, -35.0], [9760962.6, 591892.2, 9778.892, 86.5299]), ('control #12', [51.045, 75.896, 45.0, 40.0], [174765.9, 3998901.2, 4002.718, 2.5024]), ('control #13', [-125.02, -49.187, -100.0, 40.0], [-2825638.9, -9817991.9, 10216.516, 196.0559]), ('control #14', [82.118, -2.719, 0.0, -60.0], [9265529.2, 888764.4, 9308.057, 84.5209]), ('control #15', [-64.341, 43.206, 0.0, 40.0], [-4695245.9, 2298059.6, 5227.467, 296.0792]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #14', [82.118, -2.719, 0.0, -60.0], [9265529.2, 888764.4, 9308.057, 84.5209]), ('control #15', [-64.341, 43.206, 0.0, 40.0], [-4695245.9, 2298059.6, 5227.467, 296.0792]), ('control #16', [42.81, -75.807, 0.0, -60.0], [1087216.3, -2146485.8, 2406.126, 153.1373]), ('control #17', [-167.062, -14.488, -100.0, -35.0], [-7014666.6, 90478.9, 7015.25, 270.739]), ('control #18', [-189.772, 24.01, -100.0, 70.0], [-7417867.4, 1102373.2, 7499.332, 278.4529]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])]]
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 |
|---|---|---|---|
| control #0 | None | [-7721194.5, 13929763.9, 15926.555, 331.0006] | Failed |
| control #1 | None | [5834953.3, 4525637.3, 7384.313, 52.2026] | Failed |
| control #2 | None | [7727165.8, -5465888.2, 9464.937, 125.2741] | Failed |
| control #3 | None | [1287102.6, 1984537.9, 2365.38, 32.966] | Failed |
| control #4 | None | [5689261.3, 8529602.6, 10252.893, 33.7034] | Failed |
| control #5 | None | [-6061244.1, 13708058.5, 14988.314, 336.1466] | Failed |
| control #6 | None | [-10593752.0, -5551791.2, 11960.35, 242.3426] | Failed |
| boundary #22 | [0.0, 0.0, 0.0, 0.0] | [0.0, 0.0, 0.0, 0.0] | Passed |
SHA-256 / c9bc5ba6fd4ce59bb5066f738933e6b2222ff12f37896c3d1ded577dc305a564
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
lon, lat, lon0, lat0 = x
R = 6371000.0
phi, phi0 = math.radians(lat), math.radians(lat0)
dl = math.radians(lon - lon0)
cosc = math.sin(phi0) * math.sin(phi) + math.cos(phi0) * math.cos(phi) * math.cos(dl)
cosc = max(-1.0, min(1.0, cosc))
c = math.acos(cosc) / 2
if c > math.pi - 1e-6:
return None
k = 1.0 if c < 1e-12 else c / math.sin(c)
px = R * k * math.cos(phi) * math.sin(dl)
py = R * k * (math.cos(phi0) * math.sin(phi) - math.sin(phi0) * math.cos(phi) * math.cos(dl))
dist = math.hypot(px, py) / 1000.0
az = math.degrees(math.atan2(px, py)) % 360.0
return [round(px, 1), round(py, 1), round(dist, 3), round(az, 4)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('control #0', [-179.674, 72.844, -100.0, -60.0], [-7721194.5, 13929763.9, 15926.555, 331.0006]), ('control #1', [201.072, 34.17, 140.0, 0.0], [5834953.3, 4525637.3, 7384.313, 52.2026]), ('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #6', [70.317, -25.779, 140.0, 70.0], [-10593752.0, -5551791.2, 11960.35, 242.3426]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #1', [201.072, 34.17, 140.0, 0.0], [5834953.3, 4525637.3, 7384.313, 52.2026]), ('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #6', [70.317, -25.779, 140.0, 70.0], [-10593752.0, -5551791.2, 11960.35, 242.3426]), ('control #7', [82.76, -58.875, 140.0, -60.0], [-2884562.0, -1232854.6, 3136.978, 246.8583]), ('control #8', [-80.409, -20.217, 0.0, 70.0], [-11302865.4, -3238552.9, 11757.678, 254.0117]), ('control #9', [24.308, 5.805, 140.0, 0.0], [-12767659.1, 1440420.7, 12848.655, 276.4368]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #2', [194.99, -6.711, 140.0, 70.0], [7727165.8, -5465888.2, 9464.937, 125.2741]), ('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #8', [-80.409, -20.217, 0.0, 70.0], [-11302865.4, -3238552.9, 11757.678, 254.0117]), ('control #9', [24.308, 5.805, 140.0, 0.0], [-12767659.1, 1440420.7, 12848.655, 276.4368]), ('control #10', [171.761, -8.363, 140.0, -60.0], [3932496.4, 4951958.7, 6323.482, 38.4541]), ('control #11', [86.324, 1.66, 0.0, -35.0], [9760962.6, 591892.2, 9778.892, 86.5299]), ('control #12', [51.045, 75.896, 45.0, 40.0], [174765.9, 3998901.2, 4002.718, 2.5024]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #3', [80.599, 78.457, 0.0, 70.0], [1287102.6, 1984537.9, 2365.38, 32.966]), ('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #11', [86.324, 1.66, 0.0, -35.0], [9760962.6, 591892.2, 9778.892, 86.5299]), ('control #12', [51.045, 75.896, 45.0, 40.0], [174765.9, 3998901.2, 4002.718, 2.5024]), ('control #13', [-125.02, -49.187, -100.0, 40.0], [-2825638.9, -9817991.9, 10216.516, 196.0559]), ('control #14', [82.118, -2.719, 0.0, -60.0], [9265529.2, 888764.4, 9308.057, 84.5209]), ('control #15', [-64.341, 43.206, 0.0, 40.0], [-4695245.9, 2298059.6, 5227.467, 296.0792]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])], [('control #4', [233.972, 56.233, 140.0, 0.0], [5689261.3, 8529602.6, 10252.893, 33.7034]), ('control #5', [-8.83, 69.176, 45.0, -60.0], [-6061244.1, 13708058.5, 14988.314, 336.1466]), ('control #14', [82.118, -2.719, 0.0, -60.0], [9265529.2, 888764.4, 9308.057, 84.5209]), ('control #15', [-64.341, 43.206, 0.0, 40.0], [-4695245.9, 2298059.6, 5227.467, 296.0792]), ('control #16', [42.81, -75.807, 0.0, -60.0], [1087216.3, -2146485.8, 2406.126, 153.1373]), ('control #17', [-167.062, -14.488, -100.0, -35.0], [-7014666.6, 90478.9, 7015.25, 270.739]), ('control #18', [-189.772, 24.01, -100.0, 70.0], [-7417867.4, 1102373.2, 7499.332, 278.4529]), ('boundary #22', [0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0])]]
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 |
|---|---|---|---|
| control #0 | [-2435208.5, 4393346.1, 5023.12, 331.0006] | [-7721194.5, 13929763.9, 15926.555, 331.0006] | Failed |
| control #1 | [4882237.6, 3786703.2, 6178.622, 52.2026] | [5834953.3, 4525637.3, 7384.313, 52.2026] | Failed |
| control #2 | [5691584.3, -4025999.2, 6971.571, 125.2741] | [7727165.8, -5465888.2, 9464.937, 125.2741] | Failed |
| control #3 | [1264988.9, 1950441.5, 2324.741, 32.966] | [1287102.6, 1984537.9, 2365.38, 32.966] | Failed |
| control #4 | [3944712.3, 5914094.4, 7108.957, 33.7034] | [5689261.3, 8529602.6, 10252.893, 33.7034] | Failed |
| control #5 | [-2329642.6, 5268700.0, 5760.767, 336.1466] | [-6061244.1, 13708058.5, 14988.314, 336.1466] | Failed |
| control #6 | [-6259563.8, -3280404.5, 7067.05, 242.3426] | [-10593752.0, -5551791.2, 11960.35, 242.3426] | Failed |
| boundary #22 | [0.0, 0.0, 0.0, 0.0] | [0.0, 0.0, 0.0, 0.0] | Passed |
SHA-256 / 9f3ef643ee91bf29f913ea198623a9d389d2e268fe1d05f9ef0fb3d18b35b69f
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
Stipulated deterministic toy contract on a bounded input domain; results are rounded as stated and no conformance with any published standard or library is claimed. 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:48:18.598095+00:00.
Case digest / dab8ba70376818f5e8c1200729a7d1891c513467e5cd309aeb436c496c2f2999