[feat](trx-rs): show all satellites in predictions with filter bar

Iterate all TLE store entries (weather + amateur) for pass predictions instead of a hardcoded list. Add name/elevation filter bar to the predictions UI. Fix pre-existing missing fields in remote_client test.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
2026-03-28 14:07:51 +01:00
parent aab344b729
commit a0c92df86f
4 changed files with 93 additions and 23 deletions
@@ -864,6 +864,15 @@
</div>
<!-- Predictions view -->
<div id="sat-predictions-view" style="display:none;">
<div class="ft8-controls">
<input id="sat-pred-filter" class="ft8-filter" type="text" placeholder="Filter (e.g. ISS, NOAA, Meteor)" />
<select id="sat-pred-min-el" class="sat-sort-select">
<option value="0">All passes</option>
<option value="10">Min 10°</option>
<option value="20">Min 20°</option>
<option value="45">Min 45°</option>
</select>
</div>
<div class="sat-pred-header">
<span class="sat-pred-col-time">AOS (UTC)</span>
<span class="sat-pred-col-sat">Satellite</span>
@@ -289,6 +289,32 @@ document
});
// ── Predictions view ────────────────────────────────────────────────
let satPredData = [];
let satPredFilterText = "";
let satPredMinEl = 0;
const satPredFilterInput = document.getElementById("sat-pred-filter");
const satPredMinElSelect = document.getElementById("sat-pred-min-el");
function getFilteredPredictions() {
let items = satPredData;
if (satPredMinEl > 0) {
items = items.filter((p) => p.max_elevation_deg >= satPredMinEl);
}
if (satPredFilterText) {
items = items.filter((p) => p.satellite.toUpperCase().includes(satPredFilterText));
}
return items;
}
satPredFilterInput?.addEventListener("input", () => {
satPredFilterText = satPredFilterInput.value.trim().toUpperCase();
renderSatPredictions(getFilteredPredictions());
});
satPredMinElSelect?.addEventListener("change", () => {
satPredMinEl = parseInt(satPredMinElSelect.value, 10) || 0;
renderSatPredictions(getFilteredPredictions());
});
function azToCardinal(deg) {
const dirs = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"];
@@ -362,9 +388,11 @@ async function loadSatPredictions() {
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
const data = await resp.json();
if (data.error) {
satPredData = [];
renderSatPredictions([], data.error);
} else {
renderSatPredictions(data.passes || []);
satPredData = data.passes || [];
renderSatPredictions(getFilteredPredictions());
}
} catch (e) {
renderSatPredictions([], `Failed to load predictions: ${e.message}`);