Closed jbvoelker closed 1 year ago
I support this PR. We (@jbvoelker, @afe1520860 and myself) have tested it together with 6 network clients.
Tested with the following parameters:
./readsb --net-only --net-bi-port 6666 --write-json /tmp/adsbtest --write-json-every 1 --aircraft-json-seen-by-list --aircraft-json-seen-by-list-timeout 3
Example aircraft in the aircraft.json
:
One network client:
{"hex":"4aca53","seenByRemoteAddresses": [{"addr":"10.213.204.11", "lastTimestamp": 1675030233371}],"type":"adsb_icao","flight":"NOZ5PE ","alt_baro":36975,"alt_geom":37325,"gs":492.2,"ias":253,"tas":444,"mach":0.780,"wd":26,"ws":51,"oat":-60,"tat":-34,"track":224.67,"track_rate":0.00,"roll":0.00,"mag_heading":223.59,"true_heading":226.83,"baro_rate":0,"geom_rate":0,"squawk":"3115","emergency":"none","category":"A3","nav_qnh":1013.6,"nav_altitude_mcp":36992,"nav_altitude_fms":37008,"nav_heading":224.30,"lat":47.999268,"lon":8.527245,"nic":8,"rc":186,"seen_pos":2.220,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"alert":0,"spi":0,"mlat":[],"tisb":[],"messages":763,"seen":0.3,"rssi":-34.9}
Multiple network clients:
{"hex":"88516f","seenByRemoteAddresses": [{"addr":"10.213.204.11", "lastTimestamp": 1675030233529}, {"addr":"10.213.204.2", "lastTimestamp": 1675030233142}],"type":"adsb_icao","flight":"THA917 ","alt_baro":33000,"alt_geom":33550,"gs":524.8,"ias":296,"tas":480,"mach":0.828,"wd":301,"ws":47,"oat":-52,"tat":-21,"track":102.66,"roll":0.00,"mag_heading":98.79,"true_heading":100.89,"baro_rate":0,"geom_rate":0,"squawk":"5222","emergency":"none","category":"A5","nav_qnh":1012.8,"nav_altitude_mcp":32992,"lat":50.776388,"lon":4.413223,"nic":8,"rc":186,"seen_pos":0.806,"version":2,"nic_baro":1,"nac_p":9,"nac_v":1,"sil":3,"sil_type":"perhour","gva":2,"sda":2,"alert":0,"spi":0,"mlat":[],"tisb":[],"messages":1125,"seen":0.4,"rssi":-28.3},
IPv4 and IPv6 clients:
{"hex":"471f62","seenByRemoteAddresses": [{"addr":"10.213.204.11", "lastTimestamp": 1675030233529}, {"addr":"xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx", "lastTimestamp": 1675030209804}, {"addr":"10.213.204.2", "lastTimestamp": 1675030233475}],"type":"adsb_icao","flight":"WZZ1GN ","alt_baro":36975,"alt_geom":37375,"gs":506.2,"ias":253,"tas":442,"mach":0.780,"wd":272,"ws":62,"oat":-62,"tat":-36,"track":88.30,"track_rate":0.03,"roll":-0.35,"mag_heading":85.78,"true_heading":87.74,"baro_rate":64,"geom_rate":32,"squawk":"4620","emergency":"none","category":"A3","nav_qnh":1012.8,"nav_altitude_mcp":36992,"lat":52.100739,"lon":4.101410,"nic":7,"rc":371,"seen_pos":0.110,"version":2,"nic_baro":1,"nac_p":8,"nac_v":1,"sil":3,"sil_type":"perhour","gva":1,"sda":2,"alert":0,"spi":0,"mlat":[],"tisb":[],"messages":1887,"seen":0.1,"rssi":-22.2},
I agree to this proofed PR
The PR has been updated to put the receiver ID instead of the public IP address of the receiver into aircraft.json. This is an example entry with the current change:
{"hex":"407b8b","seenByReceiverIds":[{"receiverId":"b1cbe8ca-98e1-facd-0000-000000000000","lastTimestamp":1676161508017}],"type":"adsb_icao","flight":"WUK1JR ","alt_baro":32025,"alt_geom":32900,"gs":461.9,"ias":282,"tas":450,"mach":0.780,"wd":56,"ws":31,"oat":-54,"tat":-27,"track":301.45,"track_rate":0.00,"roll":-0.35,"mag_heading":302.87,"true_heading":305.08,"baro_rate":0,"geom_rate":32,"squawk":"7520","emergency":"none","category":"A3","nav_qnh":1012.8,"nav_altitude_mcp":32000,"lat":49.227688,"lon":4.519067,"nic":8,"rc":186,"seen_pos":2.200,"version":2,"nic_baro":1,"nac_p":9,"nac_v":4,"sil":3,"sil_type":"perhour","gva":2,"sda":3,"alert":0,"spi":0,"mlat":[],"tisb":[],"messages":227,"seen":2.2,"rssi":-30.8
I support this change as well.
This PR has been made obsolete by https://github.com/wiedehopf/readsb/commit/0fb85af26ee8d83e7198d8afaeaf2c51d48f6940
This PR adds two new command line switches: --aircraft-json-seen-by-list --aircraft-json-seen-by-list-timeout
If --aircraft-json-seen-by-list is given, the IP addresses of remote feeders that have provided data for an aircraft will be included in the corresponding aircraft object in aircraft.json. The --aircraft-json-seen-by-list-timeout controls how many seconds after the last update from a feeder its address will be included.