Commit Graph

258 Commits

Author SHA1 Message Date
mitchross fcbbd4c3dc Merge upstream/main and resolve adsb_dashboard.html conflict
Take upstream's crosshair animation system and updated selectAircraft(icao, source) signature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:16:39 -05:00
Smittix 421e3bcf10 Prevent stale monitor start requests from retuning audio 2026-02-23 23:56:21 +00:00
Smittix 0b69570212 Use pending click target for monitor retune frequency 2026-02-23 23:45:14 +00:00
Smittix 3b2a2ea645 Stabilize monitor retune across waterfall click restarts 2026-02-23 23:39:50 +00:00
Smittix 8a0c39901f Force recenter retune for monitor click tuning 2026-02-23 23:23:35 +00:00
Smittix 88a1f9d7bd Recenter capture for shared monitor tune clicks 2026-02-23 23:20:21 +00:00
Smittix d69613ec2f Fix monitor retune race after waterfall tune clicks 2026-02-23 23:07:35 +00:00
Smittix 005f7254df Fix waterfall canvas click-to-tune interaction 2026-02-23 23:00:49 +00:00
Smittix e41b4aa261 fix: stop monitor button greyed out during retune and click-to-tune race
1. Stop Monitor button was disabled during shared monitor retunes
   because _syncMonitorButtons disabled the button whenever
   _startingMonitor was true, even if the monitor was already active.
   Now only disables during initial start (not retunes).

2. Click-to-tune was inconsistent because the shared monitor retune
   (rearm after capture restart) captured the center frequency early
   in _startMonitorInternal, then sent it via POST to /audio/start.
   If the user clicked a new frequency during the async reconnect,
   the POST carried the stale frequency and could override the click.
   Now retunes use the live _monitorFreqMhz and send a WS tune sync
   after reconnecting to ensure the backend has the latest VFO.
2026-02-23 22:11:33 +00:00
Smittix abfad2f60e fix: waterfall device claim fails on frequency change due to USB release lag
When restarting capture for a new frequency, the USB handle from the
just-killed process may not be released by the kernel in time for the
rtl_test probe inside claim_sdr_device. Add retry logic (up to 4
attempts with 0.4s backoff) matching the pattern already used by the
audio start endpoint.

Also clean up stale shared-monitor state in the frontend error handler
so the monitor button is not left disabled when the capture restart
fails.
2026-02-23 21:41:14 +00:00
Smittix 79a8795c55 fix: waterfall monitor state desync on frequency change and restart
When changing frequency with shared monitor active, the monitor retune
could be silently dropped if a previous retune was still in-flight,
leaving the UI stuck on "Starting <freq>". After stopping and restarting
the waterfall, the monitor button could remain disabled because
_startingMonitor was never reset and _monitorRetuneTimer was not cleared.

- Cancel in-flight monitor start when queuing a new retune
- Always clear _pendingSharedMonitorRearm in started handler
- Clear _monitorRetuneTimer and reset _startingMonitor in stop()
2026-02-23 21:35:34 +00:00
Smittix b6de4e36e3 fix: suppress stale WebSocket close message after stopping waterfall
stop() sets _ws = null before the async onclose fires, so the handler
now early-returns when _ws is null instead of showing the misleading
"WebSocket closed before ready" retry message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:01:59 +00:00
Smittix 9e891b4275 fix: waterfall monitor audio delay and unresponsive stop button
- _waitForPlayback now only succeeds on playing/timeupdate events, not
  loadeddata/canplay which fire from just the WAV header before real
  audio arrives
- stopMonitor() pauses audio and updates UI immediately instead of
  blocking on the backend stop request (1+ second delay)
- Reduced backend audio stop sleep from 1.0s to 0.15s; the start
  retry loop already handles USB contention

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 20:59:40 +00:00
Smittix b61c3c8371 fix: first-load rendering for Waterfall CSS and WebSDR globe
- Waterfall: load waterfall.css eagerly in <head> instead of lazily on
  mode switch; the lazy inject raced with the panel becoming visible,
  leaving unstyled HTML for up to 20 s on cold cache
- WebSDR: await a requestAnimationFrame before calling Globe()(mapEl) so
  the browser has committed the display:flex layout and clientWidth/
  clientHeight are non-zero; previously the globe WebGL renderer was
  created at 0×0 (especially on warm-cache refreshes) and could not
  recover via the deferred resize calls
- Bump version to 2.22.2

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 20:25:05 +00:00
Smittix 20dca62de4 Release v2.22.0
Waterfall overhaul, new modes (fingerprint, RF heatmap, SignalID, voice
alerts), PWA support, mode stop responsiveness improvements, ADS-B MSG2
surface tracking, WebSDR overhaul, and full documentation audit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 19:31:10 +00:00
Smittix 29b839149e Improve mode transitions and add nav perf instrumentation 2026-02-23 18:14:31 +00:00
Smittix e20671de5e Improve mode stop responsiveness and timeout handling 2026-02-23 17:53:50 +00:00
Smittix ddb9f06550 chore: commit all pending changes 2026-02-23 16:51:32 +00:00
Smittix 38f6b74e8d Commit all pending workspace changes 2026-02-23 14:28:57 +00:00
Smittix a77612c88d Remove legacy RF modes and add SignalID route/tests 2026-02-23 13:34:00 +00:00
Smittix c0c4b863b3 feat: ship waterfall receiver overhaul and platform mode updates 2026-02-22 23:22:37 +00:00
Mitch Ross ad69b1797f fix 2026-02-21 15:50:58 -05:00
Smittix dbc01b306c Shrink hit areas and spread overlapping radar dots
Hit area: was Math.max(dotSize * 2, 15) — up to 24px radius around a 4px
dot. Now the CSS hover-flicker is fixed the large hit area is unnecessary
and was the reason dots activated when merely nearby. Changed to dotSize + 4
(proportional, 4px padding around the visual circle).

Overlap spread: compute all band positions first, then run an iterative
push-apart pass (spreadOverlappingDots) that nudges any two dots whose
arc gap is smaller than 2 * maxHitArea + 2px apart. Positions within a
band are stable across renders (same hash angle, same band = same output
before spreading) so dots don't shuffle on every update.

Z-order: sort visible devices by rssi_current ascending before rendering
so the strongest signal lands last in SVG order and receives clicks when
dots stack.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 14:51:45 +00:00
Smittix 4d09eab326 Fix radar jitter by using band-only positioning
Replace continuous estimated_distance_m-based radius with proximity band
snapping (immediate/near/far/unknown → fixed radius ratios of 0.15/0.40/
0.70/0.90). The proximity_band is computed server-side from rssi_ema which
is already smoothed, so it changes infrequently — dots now only move when
a device genuinely crosses a band boundary rather than on every RSSI
fluctuation.

Also removes the client-side EMA and positionCache added in the previous
commit, and reverts CSS style.transform back to SVG transform attribute to
avoid coordinate-system mismatch when the SVG is displayed at a scaled size.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 14:38:50 +00:00
Smittix 0d149c8dba Smooth proximity radar positions with EMA and CSS transitions
The remaining jitter after the in-place DOM rewrite was caused by RSSI
fluctuations propagating directly into dot positions on every 200ms
update cycle.

Two fixes:
1. Client-side EMA (alpha=0.25) on x/y coordinates per device. Each
   render blends 25% toward the new raw position and retains 75% of the
   smoothed position, filtering high-frequency RSSI noise without hiding
   genuine distance changes. positionCache is keyed by device_key and
   cleared on device removal or radar reset.

2. CSS transition (transform 0.6s ease-out) on each wrapper element.
   Switching from SVG transform attribute to style.transform enables
   native CSS transitions, so any remaining position change (e.g. a band
   crossing) animates smoothly rather than snapping.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 14:35:42 +00:00
Smittix 8e4497b185 Rewrite proximity radar to use in-place DOM updates
Instead of rebuilding devicesGroup.innerHTML on every render, mutate
existing SVG elements in-place (update transforms, attributes, class
names) and only create/remove elements when devices genuinely appear
or disappear from the visible set.

This eliminates the root cause of both the jitter and the blank-radar
regression: hover state can never be disrupted by a render because the
DOM elements under the cursor are never destroyed. The isHovered /
renderPending / interactionLockUntil state machine and its associated
mouseover/mouseout listeners are removed entirely — they are no longer
needed. A shared buildSelectRing() helper deduplicates the animated
selection ring construction used by renderDevices() and
applySelectionToElement(). Closes #143.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 14:29:41 +00:00
Smittix 70ff890c86 Fix proximity radar hover jitter without breaking device rendering
Replace capture-phase mouseenter/mouseleave with bubbling mouseover/mouseout
for tracking hover state in the ProximityRadar component.

The capture-phase approach caused two problems:
1. Moving between sibling child elements (hit-area → dot circle) fired
   mouseleave, prematurely clearing isHovered and triggering a DOM rebuild
   that caused visible jitter.
2. When renderDevices() rebuilt innerHTML, the browser fired mouseleave for
   the destroyed element with relatedTarget pointing at the newly created
   element at the same position, leaving isHovered permanently stuck at true
   and suppressing all future renders.

The fix uses mouseover/mouseout (which bubble) with devicesGroup.contains()
to reliably detect whether the cursor genuinely left the device group, immune
to innerHTML rebuilds. Fixes both WiFi and Bluetooth proximity radars as they
share this component. Closes #143.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 14:22:59 +00:00
Smittix 07e4fb8c31 Force local dashboard assets and quiet BT locate warnings 2026-02-20 19:11:21 +00:00
Smittix 794a1d1e86 Harden BT Locate handoff matching and start flow 2026-02-20 18:57:06 +00:00
Smittix 9d755da678 Default dashboard assets/fonts to local bundles 2026-02-20 18:03:06 +00:00
Smittix 02eed2abe9 Pause BT Locate processing when mode is hidden 2026-02-20 17:48:22 +00:00
Smittix fc7f4169e5 Fix BT Locate startup/map rendering and CelesTrak import reliability 2026-02-20 17:35:57 +00:00
Smittix 690165cafa Remove Drone Ops feature end-to-end 2026-02-20 17:09:17 +00:00
Smittix 9cf74f93ca Add drone ops mode and retire DMR support 2026-02-20 17:02:16 +00:00
Smittix 97af1c82a1 fix(bt-locate): stabilize first-load map and release v2.21.1 2026-02-20 00:49:08 +00:00
Smittix 4e2ad98fbe Apply global map theme updates and UI improvements 2026-02-20 00:32:58 +00:00
Smittix dc01b20b98 Improve cross-app UX: accessibility, mode consistency, and render performance 2026-02-19 22:32:08 +00:00
Smittix 40cc7a5058 Fix weather sat auto-scheduler and Mercator tracking 2026-02-19 21:55:07 +00:00
Smittix 7c816e3543 Fix BT/WiFi run-state health and BT Locate tracking continuity 2026-02-19 21:39:09 +00:00
Smittix 9e634ffbd8 feat: ship platform UX and reliability upgrades 2026-02-19 20:46:28 +00:00
Smittix 0c7e705fee Fix remote VDL2 streaming path and improve decoder reliability 2026-02-19 15:57:13 +00:00
Smittix bcce266dae Improve Bluetooth scanner filtering, stats, and layout 2026-02-19 14:04:12 +00:00
Smittix 5af92efe47 Improve Analytics with operational insights and temporal pattern panels 2026-02-19 12:59:39 +00:00
Smittix 16fa2b4270 Enhance BT Locate with smoothing, confidence, strongest signal, and export 2026-02-19 12:51:25 +00:00
Smittix a0b0e23b26 Align ISS SSTV start flow with HF decoder contract 2026-02-19 12:29:27 +00:00
Smittix 83d4b6852f Set HF SSTV default modulation to FM 2026-02-19 12:23:25 +00:00
Smittix 12638e2b83 Fix weather satellite next-pass countdown timestamps 2026-02-19 12:12:12 +00:00
Smittix 4d5eae1e64 fix: Resolve light/dark theme issues across dashboards and settings
- Add missing setThemePreference() and setAnimationsEnabled() functions
  to settings-manager.js; sync theme/animations dropdowns in _updateUI
- Fix base.html toggleTheme() saving to wrong localStorage key ('theme'
  instead of 'intercept-theme'), causing theme not to persist in ADS-B
  and AIS dashboards; also sync button icon and persist to server
- Add [data-theme="light"] CSS variable overrides to adsb_dashboard.css
  and ais_dashboard.css so the dashboards respond to light theme
- Fix GPS sky view canvas (gps.js) to read grid/label colours from CSS
  variables instead of hardcoded dark hex values; add MutationObserver
  to redraw immediately on theme change
- Fix satellite_dashboard.html polar plot functions to read background,
  accent and text colours from CSS variables

Closes #139

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 13:58:49 +00:00
Smittix 19a5fd4933 feat: Weather satellite and ADS-B trail rendering improvements
Weather Satellite:
- Fix duplicate event listeners on mode re-entry via locationListenersAttached guard
- Add suspend() to stop countdown/SSE stream when switching away from the mode
- Call WeatherSat.suspend() in switchMode() when leaving weathersat
- Fix toggleScheduler() to take the checkbox element as source of truth,
  preventing both checkboxes fighting each other
- Reset isRunning/UI state after auto-capture completes (scheduler path)
- Always re-select first pass and reset selectedPassIndex after loadPasses()
- Keep timeline cursor in sync inside selectPass()
- Add seconds to pass ID format to avoid collisions on concurrent passes
- Improve predict_passes() comment clarity; fix trajectory comment

ADS-B dashboard:
- Batch altitude-colour trail segments into runs of same-colour polylines,
  reducing Leaflet layer count from O(trail length) to O(colour changes)
  for significantly better rendering performance with many aircraft

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:43:47 +00:00
Smittix 3fce7f82e6 feat: Zoom map to max on first GPS lock in BT Locate
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 22:44:04 +00:00