mirror of
https://github.com/smittix/intercept.git
synced 2026-05-02 02:29:58 -07:00
Clear stale telemetry and add transmitter fallbacks
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user