diff --git a/templates/index.html b/templates/index.html
index 8134d46..4783a21 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -8318,6 +8318,10 @@
updateGroundTrack(selectedPass);
// Update countdown to show selected pass
updateSatelliteCountdown();
+ // Start real-time position updates for full orbit track
+ startSatellitePositionUpdates();
+ // Fetch position immediately
+ updateRealTimePosition();
}
// Ground Track Map
@@ -8475,10 +8479,12 @@
}
// Draw full orbit track from position endpoint
- if (pos.orbitTrack && pos.orbitTrack.length > 0 && groundTrackMap) {
+ // Backend returns 'track' property
+ const orbitData = pos.track || pos.orbitTrack;
+ if (orbitData && orbitData.length > 0 && groundTrackMap) {
// Split into past and future, handling antimeridian crossings
- const pastPoints = pos.orbitTrack.filter(p => p.past);
- const futurePoints = pos.orbitTrack.filter(p => !p.past);
+ const pastPoints = orbitData.filter(p => p.past);
+ const futurePoints = orbitData.filter(p => !p.past);
// Helper to split coords at antimeridian crossings
function splitAtAntimeridian(points) {
diff --git a/templates/satellite_dashboard.html b/templates/satellite_dashboard.html
index 44cf690..f322bab 100644
--- a/templates/satellite_dashboard.html
+++ b/templates/satellite_dashboard.html
@@ -1385,9 +1385,8 @@
satMarker = L.marker([pos.lat, pos.lon], { icon: satIcon }).addTo(groundMap);
}
- // Only update orbit track if no pass is selected
- // When a pass is selected, keep showing that pass's ground track
- if (selectedPass === null && pos.track && groundMap) {
+ // Always show full orbit track from position data
+ if (pos.track && groundMap) {
if (orbitTrack) groundMap.removeLayer(orbitTrack);
if (trackLine) groundMap.removeLayer(trackLine);
trackLine = null;