Commit graph

64 commits

Author SHA1 Message Date
5269da9cd3 Create asset module and add origin configuration
Asset Module:
- Created internal/assets package for clean embedded static file management
- Embedded static files from single source location (static/ directory)
- Eliminated need for duplicate static files or symlinks
- Assets accessible via assets.Static from any package

Origin Configuration:
- Added origin field to configuration with latitude, longitude, and name
- Automatically calculates origin as average of source positions if not specified
- Displays origin information on startup
- Updated config.example.json to show origin usage

Architecture:
- Moved main.go back to cmd/skyview/ structure
- Updated Makefile to build from cmd/skyview
- Clean separation of concerns with reusable asset module

This provides a robust foundation for asset management and proper origin
handling for distance calculations and map centering.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:19:00 +02:00
d73ecc2b20 Fix JavaScript error when switching between view tabs
Problem: Clicking on tabs other than Map caused JavaScript errors due to
incorrect DOM element ID resolution in switchView() method.

Root cause: The viewId extraction from button IDs didn't match the expected
view element IDs, causing null reference errors when trying to add classes.

Solution:
- Fixed switchView() to correctly handle view IDs (e.g., "map-view")
- Added null checks for DOM elements to prevent crashes
- Updated this.currentView initialization and comparisons to match full IDs
- Ensured view-specific initialization works with correct baseName extraction

Now all tabs (Map, Table, Statistics, Coverage, 3D Radar) work without errors.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:09:25 +02:00
5a4f9e2e20 Fix source popup closing immediately after opening
Problem: Source markers were being recreated on every WebSocket update
(every second), which destroyed any open popups.

Solution: Modified updateSourceMarkers() to:
- Only remove markers for sources that no longer exist
- Update existing markers in-place instead of recreating them
- Preserve open popups by updating content instead of recreating markers
- Only create new markers when sources are actually added

This ensures that clicking on a source marker opens a popup that stays
open for user interaction, similar to aircraft popups.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:06:59 +02:00
da1b181666 Fix JavaScript errors and implement Three.js 3D radar
JavaScript fixes:
- Added missing initializeClocks() method
- Added missing updatePopupContent() method for real-time popup updates
- Both methods are now properly integrated into the SkyView class

Three.js improvements:
- Migrated to ES modules for modern Three.js compatibility
- Updated import map for Three.js and OrbitControls
- Implemented full 3D radar visualization with aircraft positioning
- Added proper scene setup with lighting, ground plane, and grid
- Aircraft rendered as 3D cone meshes with altitude and orientation
- Real-time updates when switching to 3D radar view

These changes resolve all browser console errors and provide a working
3D radar visualization feature.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:03:26 +02:00
559e1d23b9 Fix MIME type handling for static files
- Fixed static file path construction in staticFileHandler
- Removed duplicate 'static' prefix that was causing incorrect file paths
- Now properly serves CSS and JS files with correct MIME types
- Resolves browser security errors from MIME type mismatches

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 23:57:32 +02:00
7340a9d6eb Complete multi-source Beast format implementation
Major features implemented:
- Beast binary format parser with full Mode S/ADS-B decoding
- Multi-source data merger with intelligent signal-based fusion
- Advanced web frontend with 5 view modes (Map, Table, Stats, Coverage, 3D)
- Real-time WebSocket updates with sub-second latency
- Signal strength analysis and coverage heatmaps
- Debian packaging with systemd integration
- Production-ready deployment with security hardening

Technical highlights:
- Concurrent TCP clients with auto-reconnection
- CPR position decoding and aircraft identification
- Historical flight tracking with position trails
- Range circles and receiver location visualization
- Mobile-responsive design with professional UI
- REST API and WebSocket real-time updates
- Comprehensive build system and documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 23:51:37 +02:00
c8562a4f0d Enhance aircraft details display to match dump1090 format
- Add country lookup from ICAO hex codes with flag display
- Implement UTC clocks and last update time indicators
- Enhance aircraft table with ICAO, squawk, and RSSI columns
- Add color-coded RSSI signal strength indicators
- Fix calculateDistance returning string instead of number
- Accept all SBS-1 message types for complete data capture
- Improve data merging to preserve country and registration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 23:20:31 +02:00
55710614da Add historical flight track functionality
- Store track history with position, altitude, speed, and timestamp
- Automatic track point collection every 30 seconds when position changes
- API endpoint /api/aircraft/{hex}/history for individual aircraft tracks
- Frontend "Show History" button to display historical flight paths
- Click aircraft markers to show their historical track (dashed red line)
- Track cleanup: keep last 200 points per aircraft, 24-hour retention
- Add aircraft type badges in table view with color coding
- Start/end markers for historical tracks with timestamps

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:52:16 +02:00
b6a699c24b Add aircraft type classification with distinct icons
- Commercial aircraft: Green airplane icon (default)
- Cargo aircraft: Orange box icon (UPS, FedEx, etc.)
- Military aircraft: Red fighter-style icon (RCH, CNV, etc.)
- General aviation: Yellow light aircraft icon
- Ground aircraft: Gray circle with 'G' indicator
- Add visual legend on map showing aircraft type colors
- Aircraft type detection based on flight number patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:48:20 +02:00
35f476211e Improve aircraft marker visibility
- Increase aircraft marker size from 20px to 24px
- Add aircraft wing elements for better aircraft appearance
- Use bright green color for aircraft with position data
- Add stronger drop shadow for better contrast against map
- Gray out aircraft without position data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:45:43 +02:00
5c33bdacd2 Fix Chart.js loading and add favicon support
- Switch from chart.min.js to chart.umd.js for proper module loading
- Add favicon.ico file and proper serving
- Add favicon link in HTML head to prevent 404 errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:43:25 +02:00
704d0d2305 Fix static file serving with correct MIME types
- Correct embed file path construction in staticFileHandler
- Static files now served with proper Content-Type headers
- CSS files: text/css, JS files: text/javascript, SVG files: image/svg+xml
- Resolves browser MIME type mismatch errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:36:54 +02:00
df0ead2657 Fix MIME type handling for static files
- Add custom static file handler with proper Content-Type headers
- Fix CSS and JavaScript files being served as text/plain
- Add favicon handler to prevent 404 errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:14:19 +02:00
8ce4f4c397 Initial implementation of SkyView - ADS-B aircraft tracker
- Go application with embedded static files for dump1090 frontend
- TCP client for SBS-1/BaseStation format (port 30003)
- Real-time WebSocket updates with aircraft tracking
- Modern web frontend with Leaflet maps and mobile-responsive design
- Aircraft table with filtering/sorting and statistics dashboard
- Origin configuration for receiver location and distance calculations
- Automatic config.json loading from current directory
- Foreground execution by default with optional -daemon flag

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-23 22:09:37 +02:00