Fix CPR zone ambiguity causing aircraft to appear 100km away from actual position
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>
This commit is contained in:
parent
1de3e092ae
commit
f364ffe061
7 changed files with 52 additions and 31 deletions
|
|
@ -100,7 +100,7 @@ func parseFlags() *Config {
|
|||
func NewBeastDumper(config *Config) *BeastDumper {
|
||||
return &BeastDumper{
|
||||
config: config,
|
||||
decoder: modes.NewDecoder(),
|
||||
decoder: modes.NewDecoder(0.0, 0.0), // beast-dump doesn't have reference position, use default
|
||||
stats: struct {
|
||||
totalMessages int64
|
||||
validMessages int64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue