PROBLEM: - Aircraft were appearing ~100km from receiver when actually ~5km away - CPR (Compact Position Reporting) algorithm has zone ambiguity issue - Without reference position, aircraft can appear in wrong 6-degree zones SOLUTION: - Add receiver reference position to CPR decoder for zone resolution - Modified NewDecoder() to accept reference latitude/longitude parameters - Implement distance-based zone selection (choose solution closest to receiver) - Updated all decoder instantiations to pass receiver coordinates TECHNICAL CHANGES: - decoder.go: Add refLatitude/refLongitude fields and zone ambiguity resolution - beast.go: Pass source coordinates to NewDecoder() - beast-dump/main.go: Use default coordinates (0,0) for command-line tool - merger.go: Add position update debugging for verification - JavaScript: Add coordinate validation and update logging RESULT: - Aircraft now appear at correct distances from receiver - CPR zone selection based on proximity to known receiver location - Resolves fundamental ADS-B position accuracy issue 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
235 KiB
235 KiB