mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-04-22 22:06:37 +00:00
fix(e2e): correct test_coord Munich expectations to match ECEF inputs
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user