Fixed critical bug causing map to render as black screen:
🐛 Bug Fix:
- Added comprehensive coordinate validation before great circle calculation
- Prevents NaN (Not a Number) errors that caused Leaflet crashes
- Validates all coordinates are finite numbers before processing
🛡️ Safeguards Added:
- Input validation: Check coordinates exist and are valid numbers
- Distance check: Use simple line for points < 0.5 degrees apart
- Math clamping: Clamp cosine values to [-1, 1] to avoid Math.acos NaN
- Antipodal check: Handle opposite-side-of-Earth edge cases
- Output validation: Verify all generated points are finite
- Fallback: Return simple line if great circle calculation fails
🔍 Edge Cases Handled:
- Same location (distance = 0)
- Very close points (< 0.5 degrees)
- Antipodal points (opposite sides of Earth)
- Invalid/missing coordinates in API data
- NaN propagation from bad input
📝 Logging:
- Console warnings for invalid data (debugging)
- Skips bad spots gracefully without crashing
- Continues processing valid spots
Error message fixed:
"Error: Invalid LatLng object: (NaN, NaN)"
The map now renders correctly with curved propagation paths!
Major enhancements to WSPR Propagation Heatmap plugin:
🌍 Great Circle Paths:
- Replaced straight lines with curved great circle routes
- Follows Earth's curvature for realistic propagation visualization
- 30-point interpolation for smooth arcs
- Removes dashed line style for cleaner appearance
📊 Statistics Display:
- Real-time activity counter (top-left corner)
- Shows: Propagation paths, TX stations, RX stations, total stations
- Updates dynamically as data refreshes
- Dark themed for minimal distraction
📈 Signal Strength Legend:
- Color-coded SNR legend (bottom-right corner)
- 5 signal strength categories with dB ranges
- Helps users quickly interpret propagation quality
- Matches path colors exactly
🎨 UI Improvements:
- Removed dashed lines for smoother appearance
- Enhanced opacity handling for all elements
- Better contrast with white marker borders
- Professional dark theme for overlays
📚 Documentation:
- Created comprehensive README.md in wspr/ directory
- Documented all features, API, usage, troubleshooting
- Included roadmap for future enhancements
- Added developer guide and customization examples
🔧 Technical Improvements:
- Great circle path calculation algorithm
- Leaflet custom control integration
- Proper control cleanup on disable
- No memory leaks with control management
Version bumped: 1.0.0 → 1.1.0
All features fully self-contained in plugin layer
- Added /api/wspr/heatmap endpoint to server.js for fetching WSPR spots from PSK Reporter
- Created useWSPR.js plugin with real-time propagation path visualization
- Features:
- Path lines between TX and RX stations color-coded by SNR
- Signal strength visualization (red=weak, green=strong)
- Automatic refresh every 5 minutes
- Displays up to 500 most recent spots (last 30 minutes)
- Band filtering support (20m, 40m, etc.)
- Detailed popups showing TX/RX info, frequency, SNR, age
- Plugin fully self-contained in layers/ directory per project architecture
- Registered in layerRegistry.js for Settings panel integration
- Zero changes required to core WorldMap component
Data source: PSK Reporter API (WSPR mode)
Category: Propagation
Default: Disabled (user can enable in Settings → Map Layers)
- Added /api/wspr/heatmap endpoint to fetch global WSPR spots via PSK Reporter
- Created useWSPR.js plugin with real-time propagation visualization
- Displays color-coded propagation paths based on SNR (signal strength)
- Shows TX (orange) and RX (blue) station markers with tooltips
- Supports band filtering and 30-minute lookback window
- Auto-refreshes every 5 minutes with caching
- Registered plugin in layerRegistry for Settings panel access
Features:
- Path lines color-coded: red (weak) → yellow → green (strong)
- Line weight varies with signal strength
- Detailed popups showing TX/RX callsigns, frequency, SNR, and age
- Performance-optimized with 500-spot limit
- Compatible with existing plugin architecture (enable/disable, opacity control)
This plugin enables real-time visualization of global HF propagation conditions
by showing WSPR beacon paths and signal strengths across all bands.