Clear stale telemetry and add transmitter fallbacks

This commit is contained in:
James Smith
2026-03-18 22:43:40 +00:00
parent 6941e704cd
commit 6fd5098b89
2 changed files with 86 additions and 6 deletions

View File

@@ -666,6 +666,7 @@
if (orbitTrack) { groundMap.removeLayer(orbitTrack); orbitTrack = null; }
}
clearTelemetry();
loadTransmitters(selectedSatellite);
calculatePasses();
fetchCurrentTelemetry();
@@ -744,7 +745,10 @@
const visEl = document.getElementById('statVisible');
if (visEl) visEl.textContent = visibleCount;
if (!pos) return;
if (!pos) {
clearTelemetry();
return;
}
// Update telemetry panel
const telLat = document.getElementById('telLat');
@@ -788,6 +792,21 @@
}
}
function clearTelemetry() {
const telLat = document.getElementById('telLat');
const telLon = document.getElementById('telLon');
const telAlt = document.getElementById('telAlt');
const telEl = document.getElementById('telEl');
const telAz = document.getElementById('telAz');
const telDist = document.getElementById('telDist');
if (telLat) telLat.textContent = '---.----';
if (telLon) telLon.textContent = '---.----';
if (telAlt) telAlt.textContent = '--- km';
if (telEl) telEl.textContent = '--.-';
if (telAz) telAz.textContent = '---.-';
if (telDist) telDist.textContent = '---- km';
}
async function fetchCurrentTelemetry() {
const lat = parseFloat(document.getElementById('obsLat')?.value);
const lon = parseFloat(document.getElementById('obsLon')?.value);