Fix dashboard satellite change timing issue

- Remove duplicate updateRealTimePositions() call from onSatelliteChange()
  since calculatePasses() already calls selectPass() which triggers it
- Clear passes and selectedPass when changing satellites to prevent
  using stale data
- Clear map layers when changing satellites

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
James Smith
2025-12-30 15:37:04 +00:00
parent 43ff1a8b74
commit 1e58812f50

View File

@@ -901,11 +901,20 @@
document.getElementById('trackingStatus').textContent = 'ACQUIRING ' + satName;
document.getElementById('trackingDot').style.background = 'var(--accent-orange)';
// Recalculate passes for new satellite
calculatePasses();
// Clear current pass selection while loading new data
selectedPass = null;
passes = [];
// Update real-time position immediately
updateRealTimePositions();
// Clear map layers from previous satellite
if (groundMap) {
if (trackLine) { groundMap.removeLayer(trackLine); trackLine = null; }
if (satMarker) { groundMap.removeLayer(satMarker); satMarker = null; }
if (orbitTrack) { groundMap.removeLayer(orbitTrack); orbitTrack = null; }
}
// Recalculate passes for new satellite
// calculatePasses() will call selectPass(0) which calls updateRealTimePositions()
calculatePasses();
}
// Initialize dashboard