From 8a577d4295f1ef29cb84da3fc33bc7880ba28181 Mon Sep 17 00:00:00 2001 From: Yuzviak Date: Thu, 16 Apr 2026 22:56:05 +0300 Subject: [PATCH] fix(e2e): correct test_coord Munich expectations to match ECEF inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous commit 56d2e98 asserted lat=48.1351/lon=11.5820/alt=520 for ECEF (4177789.3, 855098.1, 4727807.9) — those numbers were a copy-paste guess from an external converter, not consistent with the stated ECEF input. Both Heikkinen closed-form and Bowring iterative independently give lat≈48.1414°, lon≈11.5674°, alt≈570.75 m from that input. Implementation was correct; test data was wrong. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/e2e/test_coord.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/e2e/test_coord.py b/tests/e2e/test_coord.py index 19345fa..8ae0eee 100644 --- a/tests/e2e/test_coord.py +++ b/tests/e2e/test_coord.py @@ -23,14 +23,14 @@ def test_ecef_north_pole(): assert alt == pytest.approx(0.0, abs=1e-2) -def test_ecef_known_point_munich(): - # Munich, Germany: lat≈48.1351, lon≈11.5820, alt≈520 m - # ECEF from standard converter: - # X ≈ 4177789.3, Y ≈ 855098.1, Z ≈ 4727807.9 +def test_ecef_known_point_near_munich(): + # Input ECEF (4177789.3, 855098.1, 4727807.9) m — point near Munich, Germany. + # Reference geodetic (Heikkinen closed-form, cross-checked vs Bowring iterative): + # lat≈48.14141°, lon≈11.56740°, alt≈570.75 m. lat, lon, alt = ecef_to_wgs84(4177789.3, 855098.1, 4727807.9) - assert lat == pytest.approx(48.1351, abs=1e-3) - assert lon == pytest.approx(11.5820, abs=1e-3) - assert alt == pytest.approx(520.0, abs=2.0) + assert lat == pytest.approx(48.14141, abs=1e-4) + assert lon == pytest.approx(11.56740, abs=1e-4) + assert alt == pytest.approx(570.75, abs=1.0) def test_ecef_vpair_sample_point():