cyoung / stratux

Aviation weather and traffic receiver based on RTL-SDR.
BSD 3-Clause "New" or "Revised" License
1.06k stars 363 forks source link

Improve ownship detection for EFBs that care #794

Closed wcas closed 4 years ago

wcas commented 4 years ago

Description Foreflight was recently updated to improve ownship detection for users with ADS-B out equipped aircraft by comparing gps/baro information against the reported traffic, allowing it to determine the N-Number of the aircraft for track log recording and automatic draft logbook entries. This update affected Stratux users with aircraft not equipped with ADS-B out, as Foreflight would report 'Ownship Not Detected' even if an ICAO address was set in Stratux configuration. A recent update to Stratux fixed this issue, however, it negatively affected Stratux users with ADS-B equipped aircraft as it would require them to update the ICAO address in Stratux for proper N-Number detection, or be subjected to draft logbook entries reporting aircraft as 'Stratux'. This update attempts to deliver the best of both worlds by setting the appropriate traffic type flag based on ICAO Mode-S code defined in Stratux. A dummy or blank ICAO Mode-S will result in Foreflight's ownship detection logic being used. A configured ICAO Mode-S setting will result in Stratux passing the ownship information and Foreflight consuming it as is. Users of other EFB apps such as Aerovie, FlyQ, etc are not affected by this or previous change.

What Is Changing Update Ownship target identity to report 0x00 which represents 'No Traffic Alert' and 'ADS-B with ICAO' only when a valid ICAO code is configured in Stratux Settings. Otherwise, send 0x01 for 'No Traffic Alert' and 'ADS-B with Self-Assigned Code'.

Pre-Testing - Non-Assigned Code

Pre-Testing - Assigned Code

Post-Testing - Unassigned Code

Post-Testing - Assigned Code

cyoung commented 4 years ago

Well-written PR, thanks for submitting.