From cfcdc8e85e06bde7947dbcbd4dd336df53ce6f55 Mon Sep 17 00:00:00 2001 From: James Smith Date: Thu, 19 Mar 2026 21:48:55 +0000 Subject: [PATCH] fix(satellite): use wgs84 subpoint elevation for altitude in /position Replace geocentric.distance().km - 6371 (fixed spherical radius) with wgs84.subpoint(geocentric).elevation.km in the /position endpoint. The SSE tracker was already fixed in the Task 1 commit. --- routes/satellite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/satellite.py b/routes/satellite.py index 217fe4d..1343685 100644 --- a/routes/satellite.py +++ b/routes/satellite.py @@ -647,7 +647,7 @@ def get_satellite_position(): 'norad_id': norad_id, 'lat': float(subpoint.latitude.degrees), 'lon': float(subpoint.longitude.degrees), - 'altitude': float(geocentric.distance().km - 6371), + 'altitude': float(subpoint.elevation.km), 'elevation': float(alt.degrees), 'azimuth': float(az.degrees), 'distance': float(distance.km),