Add comprehensive position validation to filter out impossible aircraft movements and improve trail accuracy as requested in issue #16. **Position Validation Features:** - Geographic coordinate bounds checking (lat: -90 to 90, lon: -180 to 180) - Altitude validation (range: -500ft to 60,000ft) - Speed validation (max: 2000 knots ≈ Mach 3) - Distance jump validation (max: 500 nautical miles) - Time consistency validation (reject out-of-order timestamps) - Speed consistency warnings (reported vs. implied speed) **Integration Points:** - updateHistories(): Validates before adding to position history (trails) - mergeAircraftData(): Validates before updating aircraft position state - Comprehensive logging with ICAO identification for debugging **Validation Logic:** - Rejects obviously wrong positions that would create impossible flight paths - Warns about high but possible speeds (>800 knots) for monitoring - Maintains detailed logs: [POSITION_VALIDATION] ICAO ABCDEF: REJECTED/WARNING - Performance optimized with early returns and minimal overhead **Result:** - Users see only realistic aircraft trails and movements - Obviously wrong ADS-B data (teleporting, impossible speeds) filtered out - Debug logs provide visibility into validation decisions - Clean flight tracking without zigzag patterns or position jumps Fixes #16 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| beast | ||
| client | ||
| icao | ||
| merger | ||
| modes | ||
| server | ||