mavlink / qgroundcontrol

Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
http://qgroundcontrol.io
3.27k stars 3.6k forks source link

ADS-B data feed not reliably displayed. #10143

Closed timtuxworth closed 2 years ago

timtuxworth commented 2 years ago

ADSB-2022-02-02.txt

Expected Behavior

Planes are displayed on the map when they are sent by ADS-B

Current Behavior

Planes don't reliably show up. Sometimes they do, then disappear, sometimes they don't even show. I have a web app showing nearby planes, netcat showing my dumb1080 feed from my raspberry pi and Mission Planner reading the same feed shows planes that don't show up on th QGC map. Also the QGC logs viewer shows that QGC is receiving the ADSB feed (see attached screenshot), but the planes shown in the log are not showing on the map.

This is on a Mac if it matters (MacPro 2021 version M1Pro running 12.1

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

  1. Configure QGC to use my local (raspberry pi) ADS-B server at port 30003
  2. Go "back" to the main map.
  3. Planes don't display most of the time.
  4. Go to Application Settings ->Console turn on "Trace" trace log shows the ADSB data is being received. I've clicked the "Save App Log" button and uploaded a copy of the file that was saved.

System Information

When posting bug reports, include the following information

Detailed Description

Screen Shot 2022-02-02 at 10 17 57 AM Screen Shot 2022-02-02 at 10 16 25 AM

Log Files and Screenshots

-Screen shots attached -App log attached.

zdanek commented 2 years ago

@timtuxworth I can confirm this. I don't know if this is a bug - it worked better before or a lack of functionality. Seems that QGC parses only a few of available ADSB messages. I've checked it with my Flightradar24 receiver that feeds messages to port 30003. I've checked that output shows more data (more relevant data and more planes nearby) than are displayed in QGC.

I can fix it if I have a green light from @DonLakeFlyer that it will be merged (if code quality meets requirements) so my effort will make sense :)

timtuxworth commented 2 years ago

I'd be happy to test it! Thanks @zdanek

mrpollo commented 2 years ago

hey @zdanek if you are willing to contribute we can make our best effort to help you get this merged, please submit a PR, please add me as a reviewer

From what I could tell at a quick glance, the culprit might be in parsing, some data might not be what we are expecting here ADSBVehicleManager.cc#L139-L143

Here's a lazy export of the data from the log @timtuxworth uploaded just in case its helpful

cat ADSB-2022-02-02.txt | grep MSG | sed 's/^.*\(MSG.*\).*$/\1/' > ads-test-log.txt

adsb-test-log.txt

timtuxworth commented 2 years ago

This is a raw netcat of the dump1090 output I'm getting from my RadarBox. dump1090test.txt

DonLakeFlyer commented 2 years ago

Seems that QGC parses only a few of available ADSB messages.

I don't think that's the problem. QGC parses the same messages that Mission Planner does (3/4/1).

I would guess it's either a problem with vehicle expiry or some sort of drawing problem. You can see from @timtuxworth log that there were two vehicles that it's seeing and they both expire at some point. @zdanek If you can debug it through that would be helpful. First step is to debug whether the ADSBVehicle object are correctly being created/expired from the message traffic. If that seems to be working correctly then it's a ui display problem. If a UI problem something wrong in FlyViewMap.qml which does the display.

DonLakeFlyer commented 2 years ago

@zdanek Also if you are in this code some additional logging for when adsb vehicles are added/removed from the list would be helpful for debugging.

zdanek commented 2 years ago

@mrpollo thanks for your support. I know that code because I've been making some experiments lately with ADSB feeds and that's why I volunteer to fix this.

@timtuxworth thanks for the dump.

@DonLakeFlyer I saw some problems earlier. I also suspect some issues with timeouts. I'll add more logging.

DonLakeFlyer commented 2 years ago

I know that code because I've been making some experiments lately with ADSB feeds and that's why I volunteer to fix this.

@zdanek Thank so much for helping out.

zdanek commented 2 years ago

@timtuxworth @mrpollo @DonLakeFlyer I've created a PR #10170 but I cannot assing @mrpollo as a reviewer. I'd love to but no buttons are available or I just don't know how to do it.

Autonomost commented 2 years ago

Hi All, Please let me know if I should create a separate post for this.

The altitude and callsign for planes on ADSB do not show up on the iOS version of QGC. I've tried all the UI scaling parameters and no luck. Does anyone in this thread know any of the iOS devs? This is my first time posting in the QGC github and would appreciate any help/pointers.

This is QGC v4.0.10 running on an iphone 12 mini. If anyone could try it out on a different iphone or ipad model I'd appreciate that info please!

IMG_7394

zdanek commented 2 years ago

@Autonomost did you try build from my fix? See list of builds on the left and built files at the bottom https://github.com/mavlink/qgroundcontrol/pull/10170/checks

DonLakeFlyer commented 2 years ago

The iOS version of QGC is way out of date. At this point you have to build it yourself to get the latest version.

Autonomost commented 2 years ago

@zdanek Nope I did not, haven't built iOS apps from scratch yet.

@DonLakeFlyer thats a bummer. Is there anyone I can ping about that? Or should i compile latest and submit a PR for whoever manages the app store release?

DonLakeFlyer commented 2 years ago

Is there anyone I can ping about that? Or should i compile latest and submit a PR for whoever manages the app store release?

Not really. The person who managed and manually dropped iOS releases has been gone for multiple years now.