Skip to content

Feature/satellite popup enhancements#680

Open
creinemann wants to merge 4 commits intoaccius:Stagingfrom
creinemann:feature/satellite-popup-enhancements
Open

Feature/satellite popup enhancements#680
creinemann wants to merge 4 commits intoaccius:Stagingfrom
creinemann:feature/satellite-popup-enhancements

Conversation

@creinemann
Copy link
Contributor

What does this PR do?

Satellite popup now displays downlink, uplink, tone, arm tone, HRPT, GRB, and SD, etc, frequencies pulled from satconfig.json
Fixed stale setSatellites closure by moving state internal to the hook
Fixed tle1/tle2 property names (were incorrectly line1/line2)
Added lead and tail track to satellite orbit
Added a feature for the "blinking" green VISIBLE indicator
Naarrowed popup to take up less "real estate on screen, and moved "clear all" to top of window.
Added satconfig.json to src/satellites/
Only shows rows for fields that have data (no empty rows)
Added Lat Lon and Speed to sat data
Color coded Sats in JSON for later use
Left TLE handling unchanged in server.js, other than pulling satellite list from the new config JSON
Refactored the entire satellite list to be compatible for dispaying frequencies, tone, etc.
Only left console items that would show a satellite load failure, or a json error.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • Refactor / code cleanup
  • Documentation
  • Translation
  • Map layer plugin

How to test

Load a satellite from map layer, click on satellite on map, pop-up will dispay information

Checklist

  • App loads without console errors
  • [V] Tested in Dark, Light, and Retro themes
  • Responsive at different screen sizes (desktop + mobile)
  • If touching server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)
  • If adding an API route: includes caching and error handling
  • If adding a panel: wired into Modern, Classic, and Dockable layouts
  • No hardcoded colors — uses CSS variables (var(--accent-cyan), etc.)
  • No .bak, .old, console.log debug lines, or test scripts included

Screenshots (if visual change)

Before:
Screenshot 2026-02-26 083105

After:
Screenshot 2026-03-05 164125
New sat trails:
Screenshot 2026-03-05 164252

@accius
Copy link
Owner

accius commented Mar 7, 2026

Really nice additions here — the external satconfig.json, frequency/telemetry display, tail tracks, and the TLE local fallback are all solid improvements. Two bugs and some missing satellites need fixing before merge though.

Bug 1: allUnitsunits breaks distance display

The new hook destructures units but PluginLayer.jsx passes allUnits to all layer hooks. So units is always undefined and the imperial/metric conversion in the info window silently fails. Either change the destructured prop back to allUnits, or update PluginLayer.jsx to also pass units.

Bug 2: Satellite filters disconnected — double fetch

The hook now manages its own state internally with useState for satellites and fetches /api/satellites/tle independently. But App.jsx still runs useSatellites()useSatellitesFilters() and passes filteredSatellites down through PluginLayer. The new hook ignores all of that — so the TLE endpoint gets fetched twice, and any satellite filter UI in the parent becomes dead code. Either remove the old useSatellites / filter system from App.jsx, or keep accepting filtered data as a prop.

10 satellites silently dropped from satconfig.json

Missing from the previous HAM_SATELLITES that were actively tracked:

  • SO-124 (62690) — active FM repeater, added in v15.6.4
  • EO-88 (42017) — Nayif-1, Linear/Telemetry
  • TEVEL 1-8 (51013, 51069, 50988, 51063, 50998, 50999, 51062, 50989) — all 8 TEVEL FM satellites

The new weather sats are a great addition, but dropping these without changelog mention will confuse users who had them selected.

_SECTION_ keys create server-side noise

The server does Object.values(HAM_SATELLITES).map(s => s.norad) in parseTleText and the debug endpoint. Section header strings like "── High Priority..." end up in there, calling .norad on a string (returns undefined, puts NaN in the Set). Won't crash but pollutes the NORAD lookup and debug output. Add a filter:

Object.values(HAM_SATELLITES).filter(s => s && typeof s === 'object' && s.norad)

UX: Ctrl+drag replaces title-bar drag

Every other floating panel in the app (Lightning, RBN, WSPR, MUF, Gray Line) uses title-bar drag. The satellite info window now requires Ctrl+click to drag, which is undiscoverable and inconsistent with the rest of the UI.

Minor nits (non-blocking):

  • Typo in satconfig.json _SECTION_7: "Reeserved" → "Reserved"
  • // OFFLINE BLOCK comments look like debug markers — consider removing or converting to proper JSDoc
  • Extra blank // line in the satellite audit comment block

The satconfig.json structure, README documentation, frequency fields, speed/altitude telemetry, and the glowing tail track are all well done. Looking forward to the fixed version!

@creinemann
Copy link
Contributor Author

I'll have a look today or tomorrow
The Nayif-1 (EO-88) CubeSat re-entered Earth's atmosphere and burned up on July 18, 2023
HADES-R (SO-124) is no longer on orbit, and TEVEL 1-8 are no longer in orbit as well, so putting them back in the list is not necessary.

@creinemann
Copy link
Contributor Author

For Change Log:
vx.x — Satellite Layer Enhancements
• Added new handling in server.js for support to pull satellite configuration from /src/satellites/satconfig.json
• Added radio frequency display in satellite popup (downlink, uplink, tone, arm tone, HRPT, GRB, SD frequencies) sourced from satconfig.json
• Added real-time satellite speed display in km/h and mph
• Added lat/lon as separate labeled rows in popup
• Lead track rendered as fading red gradient (20 min)
• Tail track rendered as fading cyan/white glow gradient (45 min)
• Fixed tle1/tle2 property name mismatch causing orbit propagation failure
• Fixed NORAD ID lookup to correctly match satellites to radio config
• Fixed allUnits prop reference for correct imperial/metric distance display
• Fixed satellite filter UI reconnected to parent — eliminates double TLE fetch
• Fixed popup drag to use title bar consistent with all other panels
• Fixed SECTION header keys polluting NORAD lookup in server.js
• Added local TLE fallback (weather.tle) for offline/rate-limited operation
• Added update-tle.js utility to refresh TLEs from Space-Track.org
• Removed 9 decayed satellites from satconfig.json (8 TEVEL, EO-88, HADES-R (SO-124)
• Corrected GK-2A NORAD ID from 43822 to 43823
• Added satconfig.README.md user guide for adding/removing satellites

Bug 1 — allUnits vs units Fixed. Hook prop destructuring changed from units back to allUnits. Both conv/distUnit references in the popup and the useEffect dependency array updated to match.
Bug 2 — Double fetch / disconnected filters Fixed. Hook now accepts satellites/setSatellites from the parent via props. When the parent passes filtered satellites they are used directly. Internal fetch is kept as a fallback only when the parent passes nothing. This eliminates the double TLE fetch and reconnects the filter UI in App.jsx.
Bug 3 — 10 satellites silently dropped Corrected. The satellites were removed intentionally as part of a separate cleanup — 8 TEVEL satellites confirmed re-entered July 2024, EO-88 (Nayif-1) re-entered July 2023 HADES-R (SO-124) no longer in orbit. All removals are documented in server.js and listed here for inclusion in the changelog (above for inclusion ). The _SECTION_7 header is retained for future additions.
Bug 4SECTION keys polluting NORAD lookup Fixed in server.js. Both Object.values(HAM_SATELLITES) calls on lines 7566 and 7582 now include .filter(s => s && typeof s === 'object' && s.norad) to skip section header strings before mapping or finding by NORAD ID.
Bug 5 — Ctrl+drag inconsistency Fixed. Drag now triggers on the title bar span (.sat-drag-handle) consistent with all other floating panels in the app. Ctrl+click requirement removed.
Nits
• Typo fixed: _SECTION_7 "Reeserved" → "Reserved"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants