FAILURE MAP
← Case archive

FA-69341 / Orbital propagation / Open access

Elliptic Kepler solver: Newton correction is added instead of subtracted · case 01

The iteration walks away from the root and returns a huge anomaly.

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

ROOT CAUSE

The update applies E+=d although d is residual over derivative.

THE FAILURE

The update applies E+=d although d is residual over derivative.

Unsuccessful approach: Replacing Newton by the fixed-point form E=M+e sin E converges too slowly for eccentric orbits within the cap.

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(50):
        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 [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495), ('elliptic kepler solver [5.5, 0.6]', [5.5, 0.6], 4.911902084), ('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 [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 [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('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 [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 [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 [1.0, 1.0]', [1.0, 1.0], None)], [('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 [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 [6.0, 0.93]', [6.0, 0.93], 5.162716882)], [('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('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 [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 [1.3, 0.0]', [1.3, 0.0], 1.3), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987)]]
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 [0.5, 0.1]-56110885219918.310.552479987Failed
elliptic kepler solver [0.05, 0.97]1.4624038637682837e+280.588295814Failed
elliptic kepler solver [2.0, 0.3]-596354926221579.52.236031495Failed
elliptic kepler solver [5.5, 0.6]7306937807348682.04.911902084Failed
elliptic kepler solver [3.0, 0.99]7.85400006644173e+263.070410669Failed
elliptic kepler solver [-1.0, 0.2]146450715304947.475.097861103Failed
elliptic kepler solver [7.5, 0.45]-3407543013769027.01.66482677Failed

SHA-256 / 4111b4c9050874856b1b56580f18e36b0130f8789f1d9d64e7968c58b979d068

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(50):
        d=(E-e*math.sin(E)-M)/(1-e*math.cos(E))
        E=M+e*math.sin(E)
        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 [0.5, 0.1]', [0.5, 0.1], 0.552479987), ('elliptic kepler solver [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('elliptic kepler solver [2.0, 0.3]', [2.0, 0.3], 2.236031495), ('elliptic kepler solver [5.5, 0.6]', [5.5, 0.6], 4.911902084), ('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 [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 [0.05, 0.97]', [0.05, 0.97], 0.588295814), ('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 [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 [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 [1.0, 1.0]', [1.0, 1.0], None)], [('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 [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 [6.0, 0.93]', [6.0, 0.93], 5.162716882)], [('elliptic kepler solver [3.0, 0.99]', [3.0, 0.99], 3.070410669), ('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 [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 [1.3, 0.0]', [1.3, 0.0], 1.3), ('elliptic kepler solver [0.5, 0.1]', [0.5, 0.1], 0.552479987)]]
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 [0.5, 0.1]0.5524799870.552479987Passed
elliptic kepler solver [0.05, 0.97]0.5882495910.588295814Failed
elliptic kepler solver [2.0, 0.3]2.2360314952.236031495Passed
elliptic kepler solver [5.5, 0.6]4.9119020844.911902084Passed
elliptic kepler solver [3.0, 0.99]3.1074713583.070410669Failed
elliptic kepler solver [-1.0, 0.2]5.0978611035.097861103Passed
elliptic kepler solver [7.5, 0.45]1.664826771.66482677Passed

SHA-256 / efe4f25ba358a372dccf53f6abe01ae6f20424ccb6dec36631972cd36d05c7b7

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

Case digest / c7450653c3b29e673b3dd7fdd85d4acbdbb52a1d0a08316b559bc45c3b04947c