mirror of
https://github.com/smittix/intercept.git
synced 2026-07-15 13:08:10 -07:00
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:
@@ -8318,6 +8318,10 @@
|
|||||||
updateGroundTrack(selectedPass);
|
updateGroundTrack(selectedPass);
|
||||||
// Update countdown to show selected pass
|
// Update countdown to show selected pass
|
||||||
updateSatelliteCountdown();
|
updateSatelliteCountdown();
|
||||||
|
// Start real-time position updates for full orbit track
|
||||||
|
startSatellitePositionUpdates();
|
||||||
|
// Fetch position immediately
|
||||||
|
updateRealTimePosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ground Track Map
|
// Ground Track Map
|
||||||
@@ -8475,10 +8479,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Draw full orbit track from position endpoint
|
// 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
|
// Split into past and future, handling antimeridian crossings
|
||||||
const pastPoints = pos.orbitTrack.filter(p => p.past);
|
const pastPoints = orbitData.filter(p => p.past);
|
||||||
const futurePoints = pos.orbitTrack.filter(p => !p.past);
|
const futurePoints = orbitData.filter(p => !p.past);
|
||||||
|
|
||||||
// Helper to split coords at antimeridian crossings
|
// Helper to split coords at antimeridian crossings
|
||||||
function splitAtAntimeridian(points) {
|
function splitAtAntimeridian(points) {
|
||||||
|
|||||||
@@ -1385,9 +1385,8 @@
|
|||||||
satMarker = L.marker([pos.lat, pos.lon], { icon: satIcon }).addTo(groundMap);
|
satMarker = L.marker([pos.lat, pos.lon], { icon: satIcon }).addTo(groundMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only update orbit track if no pass is selected
|
// Always show full orbit track from position data
|
||||||
// When a pass is selected, keep showing that pass's ground track
|
if (pos.track && groundMap) {
|
||||||
if (selectedPass === null && pos.track && groundMap) {
|
|
||||||
if (orbitTrack) groundMap.removeLayer(orbitTrack);
|
if (orbitTrack) groundMap.removeLayer(orbitTrack);
|
||||||
if (trackLine) groundMap.removeLayer(trackLine);
|
if (trackLine) groundMap.removeLayer(trackLine);
|
||||||
trackLine = null;
|
trackLine = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user