Commit graph

5 commits

Author SHA1 Message Date
0d60592b9f Clean up codebase and fix server host binding for IPv6 support
Cleanup:
- Remove unused aircraft-icon.svg (replaced by type-specific icons)
- Remove test files: beast-dump-with-heli.bin, beast.test, main, old.json, ux.png
- Remove duplicate config.json.example (kept config.example.json)
- Remove empty internal/coverage/ directory
- Move CLAUDE.md to project root
- Update assets.go documentation to reflect current icon structure
- Format all Go code with gofmt

Server Host Binding Fix:
- Fix critical bug where server host configuration was ignored
- Add host parameter to Server struct and NewWebServer constructor
- Rename NewServer to NewWebServer for better clarity
- Fix IPv6 address formatting in server binding (wrap in brackets)
- Update startup message to show correct bind address format
- Support localhost-only, IPv4, IPv6, and interface-specific binding

This resolves the "too many colons in address" error for IPv6 hosts like ::1
and enables proper localhost-only deployment as configured.

Closes #15

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 18:36:14 +02:00
1de3e092ae Fix aircraft markers not updating positions in real-time
Root cause: The merger was blocking position updates from the same source
after the first position was established, designed for multi-source scenarios
but preventing single-source position updates.

Changes:
- Refactor JavaScript into modular architecture (WebSocketManager, AircraftManager, MapManager, UIManager)
- Add CPR coordinate validation to prevent invalid latitude/longitude values
- Fix merger to allow position updates from same source for moving aircraft
- Add comprehensive coordinate bounds checking in CPR decoder
- Update HTML to use new modular JavaScript with cache busting
- Add WebSocket debug logging to track data flow

Technical details:
- CPR decoder now validates coordinates within ±90° latitude, ±180° longitude
- Merger allows updates when currentBest == sourceID (same source continuous updates)
- JavaScript modules provide better separation of concerns and debugging
- WebSocket properly transmits updated aircraft coordinates to frontend

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 14:04:17 +02:00
9ebc7e143e Clean up, format, lint and document entire codebase
Major cleanup and documentation effort:

Code Cleanup:
- Remove 668+ lines of dead code from legacy SBS-1 implementation
- Delete unused packages: internal/config, internal/parser, internal/client/dump1090
- Remove broken test file internal/server/server_test.go
- Remove unused struct fields and imports

Code Quality:
- Format all Go code with gofmt
- Fix all go vet issues
- Fix staticcheck linting issues (error capitalization, unused fields)
- Clean up module dependencies with go mod tidy

Documentation:
- Add comprehensive godoc documentation to all packages
- Document CPR position decoding algorithm with mathematical details
- Document multi-source data fusion strategies
- Add function/method documentation with parameters and return values
- Document error handling and recovery strategies
- Add performance considerations and architectural decisions

README Updates:
- Update project structure to reflect assets/ organization
- Add new features: smart origin, Reset Map button, map controls
- Document origin configuration in config examples
- Add /api/origin endpoint to API documentation
- Update REST endpoints with /api/aircraft/{icao}

Analysis:
- Analyzed adsb-tools and go-adsb for potential improvements
- Confirmed current Beast implementation is production-ready
- Identified optional enhancements for future consideration

The codebase is now clean, well-documented, and follows Go best practices
with zero linting issues and comprehensive documentation throughout.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 10:29:25 +02:00
1425f0a018 Restructure assets to top-level package and add Reset Map button
- Move assets from internal/assets to top-level assets/ package for clean embed directive
- Consolidate all static files in single location (assets/static/)
- Remove duplicate static file locations to maintain single source of truth
- Add Reset Map button to map controls with full functionality
- Implement resetMap() method to return map to calculated origin position
- Store origin in this.mapOrigin for reset functionality
- Fix go:embed pattern to work without parent directory references

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-24 00:57:49 +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