FAILURE MAP
← Case archive

FA-69541 / Orbital propagation / Open access

Fixed-step RK4 two-body propagation: Loop stops one step short of the end time · case 01

The returned state is for T-h rather than T.

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

ROOT CAUSE

The step loop runs steps-1 times.

VERIFIED REPAIR

Run exactly steps steps of size T/steps.

Unsuccessful approach: Running steps+1 times overshoots the end time.

Case contract

Input [r0, v0, mu, T, steps] for a planar two-body orbit. Integrate state [x,y,vx,vy] with acceleration -mu r/|r|^3 using classical RK4 with h=T/steps for exactly steps steps. Return the final state rounded to 6 decimals.

Why this case matters

Orbit determination and mission planning chain many small conversions; one wrong branch or unit silently moves a spacecraft by kilometres.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    r0,v0,mu,T,steps=x
    h=T/steps
    def f(s):
        px,py,vx,vy=s
        rr=(px*px+py*py)**1.5
        return [vx,vy,-mu*px/rr,-mu*py/rr]
    s=list(r0)+list(v0)
    for _ in range(steps-1):
        k1=f(s)
        k2=f([s[i]+h/2*k1[i] for i in range(4)])
        k3=f([s[i]+h/2*k2[i] for i in range(4)])
        k4=f([s[i]+h*k3[i] for i in range(4)])
        s=[s[i]+h/6*(k1[i]+2*k2[i]+2*k3[i]+k4[i]) for i in range(4)]
    return [round(c,6) for c in s]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115])], [('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804])], [('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782])]]
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
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12][5805.248401, 3911.374738, -4.216532, 6.258055][5586.092992, 4218.445527, -4.547562, 6.021804]Failed
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20][4353.697853, 6364.781831, -5.529339, 5.583062][4101.15166, 6610.394483, -5.692596, 5.332573]Failed
fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15][-6249.728053, 7084.127014, -4.413362, -3.9258][-6593.162659, 6759.502773, -4.170281, -4.18782]Failed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30][-0.970956, 0.239242, -0.239243, -0.970963][-0.98999, 0.141112, -0.141113, -0.989997]Failed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25][-2.01559, 1.162383, -0.416337, -0.355256][-2.095663, 1.089551, -0.384431, -0.37274]Failed
fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10][-0.422527, -0.696919, 1.271349, -0.269727][-0.154684, -0.721678, 1.394034, 0.039166]Failed
fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6][6274.461901, 2982.168181, -3.072028, 6.770094][6111.623093, 3316.078893, -3.439749, 6.583115]Failed

SHA-256 / 643d529cce4a2dd44fabee92d7f9dedca921c0d7283b9162f13fade2ffa0b84e

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    r0,v0,mu,T,steps=x
    h=T/steps
    def f(s):
        px,py,vx,vy=s
        rr=(px*px+py*py)**1.5
        return [vx,vy,-mu*px/rr,-mu*py/rr]
    s=list(r0)+list(v0)
    for _ in range(steps+1):
        k1=f(s)
        k2=f([s[i]+h/2*k1[i] for i in range(4)])
        k3=f([s[i]+h/2*k2[i] for i in range(4)])
        k4=f([s[i]+h*k3[i] for i in range(4)])
        s=[s[i]+h/6*(k1[i]+2*k2[i]+2*k3[i]+k4[i]) for i in range(4)]
    return [round(c,6) for c in s]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115])], [('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804])], [('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782])]]
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
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12][5350.712369, 4513.263533, -4.865384, 5.768062][5586.092992, 4218.445527, -4.547562, 6.021804]Failed
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20][3841.572789, 6844.676546, -5.841949, 5.079625][4101.15166, 6610.394483, -5.692596, 5.332573]Failed
fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15][-6916.621339, 6414.399377, -3.914015, -4.437708][-6593.162659, 6759.502773, -4.170281, -4.18782]Failed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30][-0.999132, 0.041572, -0.041572, -0.999139][-0.98999, 0.141112, -0.141113, -0.989997]Failed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25][-2.169375, 1.01341, -0.352725, -0.388379][-2.095663, 1.089551, -0.384431, -0.37274]Failed
fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10][0.127185, -0.675339, 1.398962, 0.433932][-0.154684, -0.721678, 1.394034, 0.039166]Failed
fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6][5930.672027, 3640.162676, -3.796369, 6.377119][6111.623093, 3316.078893, -3.439749, 6.583115]Failed

SHA-256 / 3fc057c6b677a8c74afab49b5942990ca0bb810f6f3f3d0ade36bdf443cb5c41

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    r0,v0,mu,T,steps=x
    h=T/steps
    def f(s):
        px,py,vx,vy=s
        rr=(px*px+py*py)**1.5
        return [vx,vy,-mu*px/rr,-mu*py/rr]
    s=list(r0)+list(v0)
    for _ in range(steps):
        k1=f(s)
        k2=f([s[i]+h/2*k1[i] for i in range(4)])
        k3=f([s[i]+h/2*k2[i] for i in range(4)])
        k4=f([s[i]+h*k3[i] for i in range(4)])
        s=[s[i]+h/6*(k1[i]+2*k2[i]+2*k3[i]+k4[i]) for i in range(4)]
    return [round(c,6) for c in s]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115])], [('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804])], [('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30]', [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30], [-0.98999, 0.141112, -0.141113, -0.989997]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782]), ('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991])], [('fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25]', [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25], [-2.095663, 1.089551, -0.384431, -0.37274]), ('fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10]', [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10], [-0.154684, -0.721678, 1.394034, 0.039166]), ('fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6]', [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6], [6111.623093, 3316.078893, -3.439749, 6.583115]), ('fixed-step rk4 two-body propagation [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8]', [[2.0, 0.0], [0.0, 0.5], 1.0, 4.0, 8], [-0.108631, 0.939625, -0.993051, -0.614991]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12]', [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12], [5586.092992, 4218.445527, -4.547562, 6.021804]), ('fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20]', [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20], [4101.15166, 6610.394483, -5.692596, 5.332573]), ('fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15]', [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15], [-6593.162659, 6759.502773, -4.170281, -4.18782])]]
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
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 7.546], 398600.4418, 600.0, 12][5586.092992, 4218.445527, -4.547562, 6.021804][5586.092992, 4218.445527, -4.547562, 6.021804]Passed
fixed-step rk4 two-body propagation [[7000.0, 0.0], [0.0, 8.5], 398600.4418, 900.0, 20][4101.15166, 6610.394483, -5.692596, 5.332573][4101.15166, 6610.394483, -5.692596, 5.332573]Passed
fixed-step rk4 two-body propagation [[0.0, 9000.0], [-6.2, 0.8], 398600.4418, 1200.0, 15][-6593.162659, 6759.502773, -4.170281, -4.18782][-6593.162659, 6759.502773, -4.170281, -4.18782]Passed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.0], 1.0, 3.0, 30][-0.98999, 0.141112, -0.141113, -0.989997][-0.98999, 0.141112, -0.141113, -0.989997]Passed
fixed-step rk4 two-body propagation [[1.0, 0.0], [0.0, 1.2], 1.0, 5.0, 25][-2.095663, 1.089551, -0.384431, -0.37274][-2.095663, 1.089551, -0.384431, -0.37274]Passed
fixed-step rk4 two-body propagation [[-1.5, 0.5], [0.1, -0.7], 1.0, 2.0, 10][-0.154684, -0.721678, 1.394034, 0.039166][-0.154684, -0.721678, 1.394034, 0.039166]Passed
fixed-step rk4 two-body propagation [[6800.0, 1200.0], [-1.1, 7.4], 398600.4418, 300.0, 6][6111.623093, 3316.078893, -3.439749, 6.583115][6111.623093, 3316.078893, -3.439749, 6.583115]Passed

SHA-256 / 4dde3624fcf421a2c56fe0547cd5ef2fdbdbe920a2f0a647b409c44c26ca17c0

Verification & scope

A deterministic toy two-body model with stipulated constants and conventions; not flight dynamics software or a validated SGP4 implementation. 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:12.457957+00:00.

Case digest / 0ffed6258a6bb1625dd04544ed8ff5dc0914afe6d39f718c22bde3f1c769cdda