Fix satellite ground track to show full orbit

- Fix property name mismatch: backend returns 'track' but index.html
  expected 'orbitTrack'
- Start position updates when a pass is selected (was never called)
- Fetch position immediately on pass selection for instant orbit display
- Dashboard: always show full orbit track, not just when no pass selected

🤖 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:16:36 +00:00
parent 0cf9360fce
commit 22791b6c3b
2 changed files with 11 additions and 6 deletions
+9 -3
View File
@@ -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) {
+2 -3
View File
@@ -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;