FA-66051 / Aviation weight and balance / Open access
Landing moment divided by takeoff weight · case 01
Landing CG is systematically forward and grows worse with longer flights.
ROOT CAUSE
The landing moment is divided by the takeoff weight instead of the reduced landing weight.
VERIFIED REPAIR
Divide the landing moment by the landing weight.
Unsuccessful approach: Adding back the gallon count mixes units and still inflates the divisor.
Case contract
Input {'tow','tocg','burn_gal','fuel_arm','density','mlw','env':[fwd,aft]}. Burned fuel weight = gallons*density removed at the fuel arm. Status 'MLW' if landing weight exceeds MLW (checked first), 'CG' if landing CG outside the inclusive envelope, else 'OK'. Return [LW r1, LCG r2, status].
Why this case matters
Landing CG differs from takeoff CG because fuel is removed at the tank arm; landing weight has its own structural limit.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
dens = x['density']
bw = x['burn_gal'] * dens
lw = x['tow'] - bw
lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
lcg = lm / x['tow']
fwd, aft = x['env']
if lw > x['mlw']: status = 'MLW'
elif lcg < fwd or lcg > aft: status = 'CG'
else: status = 'OK'
return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']]]]
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 trip | [2344.0, 39.0, 'OK'] | [2344.0, 41.6, 'OK'] | Failed |
| landing overweight | [2518.8, 40.41, 'MLW'] | [2518.8, 40.91, 'MLW'] | Failed |
| exactly max landing | [2450.0, 39.85, 'OK'] | [2450.0, 40.83, 'OK'] | Failed |
| burn moves CG forward out | [2060.0, 30.64, 'CG'] | [2060.0, 34.21, 'CG'] | Failed |
| forward tank burn moves CG aft | [4597.0, 133.08, 'CG'] | [4597.0, 150.54, 'CG'] | Failed |
| jet fuel density | [4591.3, 129.74, 'CG'] | [4591.3, 141.29, 'OK'] | Failed |
| sampled case 1 | [2887.1, 38.81, 'OK'] | [2887.1, 43.15, 'OK'] | Failed |
| sampled case 2 | [2066.4, 40.92, 'OK'] | [2066.4, 45.92, 'CG'] | Failed |
| sampled case 3 | [2254.6, 38.25, 'CG'] | [2254.6, 43.05, 'OK'] | Failed |
SHA-256 / 87ee3dfa154f5c65f8cf3acdd9258d7519267567d93014cb205c1782f4db660a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
dens = x['density']
bw = x['burn_gal'] * dens
lw = x['tow'] - bw
lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
lcg = lm / (lw + x['burn_gal'])
fwd, aft = x['env']
if lw > x['mlw']: status = 'MLW'
elif lcg < fwd or lcg > aft: status = 'CG'
else: status = 'OK'
return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']]]]
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 trip | [2344.0, 41.14, 'OK'] | [2344.0, 41.6, 'OK'] | Failed |
| landing overweight | [2518.8, 40.83, 'MLW'] | [2518.8, 40.91, 'MLW'] | Failed |
| exactly max landing | [2450.0, 40.66, 'OK'] | [2450.0, 40.83, 'OK'] | Failed |
| burn moves CG forward out | [2060.0, 33.56, 'CG'] | [2060.0, 34.21, 'CG'] | Failed |
| forward tank burn moves CG aft | [4597.0, 147.65, 'OK'] | [4597.0, 150.54, 'CG'] | Failed |
| jet fuel density | [4591.3, 139.44, 'OK'] | [4591.3, 141.29, 'OK'] | Failed |
| sampled case 1 | [2887.1, 42.44, 'OK'] | [2887.1, 43.15, 'OK'] | Failed |
| sampled case 2 | [2066.4, 45.1, 'CG'] | [2066.4, 45.92, 'CG'] | Failed |
| sampled case 3 | [2254.6, 42.26, 'OK'] | [2254.6, 43.05, 'OK'] | Failed |
SHA-256 / babcc6b8b26b1e8f04bd515ba0222788075fdee0562cfe1ad87bac5c96ac9ef3
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
dens = x['density']
bw = x['burn_gal'] * dens
lw = x['tow'] - bw
lm = x['tow'] * x['tocg'] - bw * x['fuel_arm']
lcg = lm / lw
fwd, aft = x['env']
if lw > x['mlw']: status = 'MLW'
elif lcg < fwd or lcg > aft: status = 'CG'
else: status = 'OK'
return [round(lw, 1), round(lcg, 2), status]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 26.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2344.0, 41.6, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.2, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2518.8, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.65, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.21, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.9]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 61.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4591.3, 141.29, 'OK']], ['sampled case 1', {'tow': 3210.0, 'tocg': 43.86, 'burn_gal': 48.2, 'fuel_arm': 50.2, 'density': 6.7, 'mlw': 3144.0, 'env': [37.4, 44.6]}, [2887.1, 43.15, 'OK']], ['sampled case 2', {'tow': 2319.0, 'tocg': 45.94, 'burn_gal': 37.7, 'fuel_arm': 46.1, 'density': 6.7, 'mlw': 2223.0, 'env': [35.6, 44.7]}, [2066.4, 45.92, 'CG']], ['sampled case 3', {'tow': 2538.0, 'tocg': 42.69, 'burn_gal': 42.3, 'fuel_arm': 39.8, 'density': 6.7, 'mlw': 2436.0, 'env': [38.5, 45.3]}, [2254.6, 43.05, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 27.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2338.0, 41.58, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.4, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2517.6, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.7, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.27, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.8]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 62.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4584.6, 141.28, 'OK']], ['sampled case 1', {'tow': 2616.0, 'tocg': 44.14, 'burn_gal': 50.6, 'fuel_arm': 35.7, 'density': 6.0, 'mlw': 2515.0, 'env': [35.7, 46.3]}, [2312.4, 45.25, 'OK']], ['sampled case 2', {'tow': 3505.0, 'tocg': 45.73, 'burn_gal': 51.8, 'fuel_arm': 36.9, 'density': 6.7, 'mlw': 3402.0, 'env': [38.6, 44.7]}, [3157.9, 46.7, 'CG']], ['sampled case 3', {'tow': 4317.0, 'tocg': 45.35, 'burn_gal': 46.0, 'fuel_arm': 30.4, 'density': 6.7, 'mlw': 3966.0, 'env': [37.2, 44.7]}, [4008.8, 46.5, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 28.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2332.0, 41.57, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.6, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2516.4, 40.91, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.75, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.32, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.7]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 63.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4577.9, 141.26, 'OK']], ['sampled case 1', {'tow': 3241.0, 'tocg': 42.19, 'burn_gal': 26.4, 'fuel_arm': 41.7, 'density': 6.7, 'mlw': 2992.0, 'env': [38.5, 45.7]}, [3064.1, 42.22, 'MLW']], ['sampled case 2', {'tow': 2273.0, 'tocg': 38.95, 'burn_gal': 26.8, 'fuel_arm': 59.5, 'density': 6.7, 'mlw': 2176.0, 'env': [38.3, 44.8]}, [2093.4, 37.19, 'CG']], ['sampled case 3', {'tow': 4321.0, 'tocg': 45.0, 'burn_gal': 28.2, 'fuel_arm': 37.5, 'density': 6.7, 'mlw': 4074.0, 'env': [38.0, 44.9]}, [4132.1, 45.34, 'MLW']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 29.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2326.0, 41.55, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 5.8, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2515.2, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.800000000000004, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.38, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.6]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 64.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4571.2, 141.25, 'OK']], ['sampled case 1', {'tow': 2016.0, 'tocg': 40.79, 'burn_gal': 78.4, 'fuel_arm': 52.8, 'density': 6.0, 'mlw': 1662.0, 'env': [35.1, 46.3]}, [1545.6, 37.13, 'OK']], ['sampled case 2', {'tow': 5687.0, 'tocg': 39.23, 'burn_gal': 51.9, 'fuel_arm': 54.5, 'density': 6.7, 'mlw': 5345.0, 'env': [37.9, 46.1]}, [5339.3, 38.24, 'OK']], ['sampled case 3', {'tow': 5347.0, 'tocg': 40.15, 'burn_gal': 5.1, 'fuel_arm': 42.2, 'density': 6.7, 'mlw': 5370.0, 'env': [35.1, 43.8]}, [5312.8, 40.14, 'OK']]], [['normal trip', {'tow': 2500.0, 'tocg': 42.0, 'burn_gal': 30.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2320.0, 41.53, 'OK']], ['landing overweight', {'tow': 2550.0, 'tocg': 41.0, 'burn_gal': 6.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2514.0, 40.9, 'MLW']], ['exactly max landing', {'tow': 2510.0, 'tocg': 41.0, 'burn_gal': 10.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2450.0, 40.83, 'OK']], ['burn moves CG forward out', {'tow': 2300.0, 'tocg': 35.85, 'burn_gal': 40.0, 'fuel_arm': 48.0, 'density': 6.0, 'mlw': 2450.0, 'env': [35.0, 47.3]}, [2060.0, 34.43, 'CG']], ['forward tank burn moves CG aft', {'tow': 5200.0, 'tocg': 147.0, 'burn_gal': 90.0, 'fuel_arm': 120.0, 'density': 6.7, 'mlw': 5000.0, 'env': [138.0, 147.5]}, [4597.0, 150.54, 'CG']], ['jet fuel density', {'tow': 5000.0, 'tocg': 142.0, 'burn_gal': 65.0, 'fuel_arm': 150.0, 'density': 6.7, 'mlw': 4800.0, 'env': [138.0, 148.0]}, [4564.5, 141.24, 'OK']], ['sampled case 1', {'tow': 4773.0, 'tocg': 38.16, 'burn_gal': 54.7, 'fuel_arm': 51.7, 'density': 6.0, 'mlw': 4762.0, 'env': [38.1, 45.8]}, [4444.8, 37.16, 'CG']], ['sampled case 2', {'tow': 5036.0, 'tocg': 43.65, 'burn_gal': 50.5, 'fuel_arm': 57.4, 'density': 6.7, 'mlw': 4986.0, 'env': [39.0, 46.7]}, [4697.6, 42.66, 'OK']], ['sampled case 3', {'tow': 4947.0, 'tocg': 43.42, 'burn_gal': 41.6, 'fuel_arm': 57.9, 'density': 6.7, 'mlw': 4824.0, 'env': [39.6, 44.2]}, [4668.3, 42.56, 'OK']]]]
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 trip | [2344.0, 41.6, 'OK'] | [2344.0, 41.6, 'OK'] | Passed |
| landing overweight | [2518.8, 40.91, 'MLW'] | [2518.8, 40.91, 'MLW'] | Passed |
| exactly max landing | [2450.0, 40.83, 'OK'] | [2450.0, 40.83, 'OK'] | Passed |
| burn moves CG forward out | [2060.0, 34.21, 'CG'] | [2060.0, 34.21, 'CG'] | Passed |
| forward tank burn moves CG aft | [4597.0, 150.54, 'CG'] | [4597.0, 150.54, 'CG'] | Passed |
| jet fuel density | [4591.3, 141.29, 'OK'] | [4591.3, 141.29, 'OK'] | Passed |
| sampled case 1 | [2887.1, 43.15, 'OK'] | [2887.1, 43.15, 'OK'] | Passed |
| sampled case 2 | [2066.4, 45.92, 'CG'] | [2066.4, 45.92, 'CG'] | Passed |
| sampled case 3 | [2254.6, 43.05, 'OK'] | [2254.6, 43.05, 'OK'] | Passed |
SHA-256 / 4017be85c21926ac3b9d064659d5fcb8d28a9d7f3e3c67b5d6fc77a539386fdb
Verification & scope
A deterministic toy loading model with stipulated constants; it is not an approved aircraft flight manual procedure and makes no claim of regulatory conformance. 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:47:39.757127+00:00.
Case digest / 71a4f0c0caa4f98ca600d929881d461b3cc739dffeaa5bf923447f03b7d63764