FAILURE MAP
← Case archive

FA-69356 / Orbital propagation / Open access

Elliptic Kepler solver: Iteration cap is too small for near-parabolic orbits · case 01

Highly eccentric orbits return unconverged anomalies.

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

ROOT CAUSE

Newton is capped at three iterations.

THE FAILURE

Newton is capped at three iterations.

Unsuccessful approach: Raising the cap to six still fails from the pi start for e near one.

Case contract

Input [M, e] (radians). Return None unless 0<=e<1. Reduce M into [0,2pi), start Newton at M (e<0.8) or pi, iterate E -= (E-e sinE-M)/(1-e cosE) up to 50 times until the step is below 1e-13, and return E rounded to 9 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):
    M,e=x
    if e<0 or e>=1: return None
    M=math.fmod(M,2*math.pi)
    if M<0: M+=2*math.pi
    E=M if e<0.8 else math.pi
    for _ in range(3):
        d=(E-e*math.sin(E)-M)/(1-e*math.cos(E))
        E-=d
        if abs(d)<1e-13: break
    return round(E,9)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('elliptic kepler solver [5.5, 0.6]', [5.5, 0.6], 4.911902084), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495), ('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('elliptic kepler solver [-1.0, 0.2]', [-1.0, 0.2], 5.097861103), ('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677)], [('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('elliptic kepler solver [-1.0, 0.2]', [-1.0, 0.2], 5.097861103), ('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677), ('elliptic kepler solver [20.0, 0.05]', [20.0, 0.05], 1.196991311), ('elliptic kepler solver [0.0, 0.7]', [0.0, 0.7], 0.0), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654)], [('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [20.0, 0.05]', [20.0, 0.05], 1.196991311), ('elliptic kepler solver [0.0, 0.7]', [0.0, 0.7], 0.0), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654), ('elliptic kepler solver [1.0, 1.0]', [1.0, 1.0], None), ('elliptic kepler solver [1.0, -0.1]', [1.0, -0.1], None)], [('elliptic kepler solver [0.2, 0.85]', [0.2, 0.85], 0.823499414), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654), ('elliptic kepler solver [1.0, 1.0]', [1.0, 1.0], None), ('elliptic kepler solver [1.0, -0.1]', [1.0, -0.1], None), ('elliptic kepler solver [6.0, 0.93]', [6.0, 0.93], 5.162716882), ('elliptic kepler solver [-8.0, 0.75]', [-8.0, 0.75], 3.999173912)], [('elliptic kepler solver [6.0, 0.93]', [6.0, 0.93], 5.162716882), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [0.2, 0.85]', [0.2, 0.85], 0.823499414), ('elliptic kepler solver [-8.0, 0.75]', [-8.0, 0.75], 3.999173912), ('elliptic kepler solver [1.3, 0.0]', [1.3, 0.0], 1.3), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495)]]
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
elliptic kepler solver [5.5, 0.6]4.9118868214.911902084Failed
elliptic kepler solver [0.05, 0.97]0.7290043930.588295814Failed
elliptic kepler solver [0.5, 0.1]0.5524799870.552479987Passed
elliptic kepler solver [2.0, 0.3]2.2360314952.236031495Passed
elliptic kepler solver [3.0, 0.99]3.0704106693.070410669Passed
elliptic kepler solver [-1.0, 0.2]5.0978611035.097861103Passed
elliptic kepler solver [7.5, 0.45]1.664826841.66482677Failed

SHA-256 / f5ca0491b4237c0a817fda60cffe134d287f2f16c4d251166527a725453c163a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(x):
    M,e=x
    if e<0 or e>=1: return None
    M=math.fmod(M,2*math.pi)
    if M<0: M+=2*math.pi
    E=M if e<0.8 else math.pi
    for _ in range(6):
        d=(E-e*math.sin(E)-M)/(1-e*math.cos(E))
        E-=d
        if abs(d)<1e-13: break
    return round(E,9)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('elliptic kepler solver [5.5, 0.6]', [5.5, 0.6], 4.911902084), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495), ('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('elliptic kepler solver [-1.0, 0.2]', [-1.0, 0.2], 5.097861103), ('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677)], [('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('elliptic kepler solver [-1.0, 0.2]', [-1.0, 0.2], 5.097861103), ('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677), ('elliptic kepler solver [20.0, 0.05]', [20.0, 0.05], 1.196991311), ('elliptic kepler solver [0.0, 0.7]', [0.0, 0.7], 0.0), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654)], [('elliptic kepler solver [7.5, 0.45]', [7.5, 0.45], 1.66482677), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [20.0, 0.05]', [20.0, 0.05], 1.196991311), ('elliptic kepler solver [0.0, 0.7]', [0.0, 0.7], 0.0), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654), ('elliptic kepler solver [1.0, 1.0]', [1.0, 1.0], None), ('elliptic kepler solver [1.0, -0.1]', [1.0, -0.1], None)], [('elliptic kepler solver [0.2, 0.85]', [0.2, 0.85], 0.823499414), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [3.141592653589793, 0.5]', [3.141592653589793, 0.5], 3.141592654), ('elliptic kepler solver [1.0, 1.0]', [1.0, 1.0], None), ('elliptic kepler solver [1.0, -0.1]', [1.0, -0.1], None), ('elliptic kepler solver [6.0, 0.93]', [6.0, 0.93], 5.162716882), ('elliptic kepler solver [-8.0, 0.75]', [-8.0, 0.75], 3.999173912)], [('elliptic kepler solver [6.0, 0.93]', [6.0, 0.93], 5.162716882), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [0.2, 0.85]', [0.2, 0.85], 0.823499414), ('elliptic kepler solver [-8.0, 0.75]', [-8.0, 0.75], 3.999173912), ('elliptic kepler solver [1.3, 0.0]', [1.3, 0.0], 1.3), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495)]]
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
elliptic kepler solver [5.5, 0.6]4.9119020844.911902084Passed
elliptic kepler solver [0.05, 0.97]0.5882963880.588295814Failed
elliptic kepler solver [0.5, 0.1]0.5524799870.552479987Passed
elliptic kepler solver [2.0, 0.3]2.2360314952.236031495Passed
elliptic kepler solver [3.0, 0.99]3.0704106693.070410669Passed
elliptic kepler solver [-1.0, 0.2]5.0978611035.097861103Passed
elliptic kepler solver [7.5, 0.45]1.664826771.66482677Passed

SHA-256 / cc02ca016e4c5699bc7f6a8b5486415ff2fea978d7bc263f3ca69032df4d522b

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

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

Case digest / 1cf4e0772cce0e0dc54a9e25e7a8e7f06b4a47da50703caed1975ebd8bd82fdf