rsadsb / adsb_deku

✈️ Rust ADS-B decoder + tui radar application
MIT License
596 stars 22 forks source link

Significantly less information decoded compared to other libraries #296

Closed dividebysandwich closed 4 days ago

dividebysandwich commented 1 month ago

Hi,

I am noticing a significant difference in the amount of information that is being decoded. For a lot of aircraft the lat/lon is never populated whereas when using view1090 from dump1090_fa, I can see a lot more. I have played around with the distance filter and set the lat/lon as expected, but here are some comparisons:

view1090: image

adsb_deku radar output: image

Is this expected behavior? I compared adsb_deku with several different implementations, including open source and certified commercial ones, and the results from adsb_deku are consistently worse despite using the same antenna and SDR. I also tried various different antennae, with and without filter and using a hackrf instead of an RTLSDR dongle, but I only see a fraction of the traffic being decoded.

wcampbell0x2a commented 1 month ago

Is this also using https://github.com/rsadsb/dump1090_rs ?

dividebysandwich commented 1 month ago

EDIT: To clarify, I used the fa dump1090 for this comparison for both view1090 and adsb_deku radar. However I also tried dump1090_rs and the result is similar. When comparing I always used the same dump implementation for both clients. This behavior is observed irrespective of the range filter in adsb_deku btw.

wcampbell0x2a commented 1 month ago

Ok, just making sure it's an issue with adsb_deku.

wcampbell0x2a commented 1 month ago

Have you checked the logs? do you see any ERROR or WARN entries? I've never seen that many messages with no lat/long being stored.

You can do this by adding RUST_LOG=trace before using radar.

wcampbell0x2a commented 1 month ago

The only thing I can think of is that you are getting TisB message that I wasn't adding to the positions of the aircraft, pushed an MR to do that here: https://github.com/rsadsb/adsb_deku/pull/301. This is untested.

YurBoiRene commented 3 weeks ago

I think I figured this out. I was having the same issue, even after using linked branch. After looking at the logs it looks like some airplane positions are failing the range check.

2024-08-13T20:51:51.579484Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7458.818733421581 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.9185242733713, longitude: -17.4957275390625 }
2024-08-13T20:51:57.150058Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7619.081919783045 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.9221553479211, longitude: -14.3426513671875 }
2024-08-13T20:51:58.078489Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7619.081919783045 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.9221553479211, longitude: -14.3426513671875 }
2024-08-13T20:52:02.506165Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7604.752806611927 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.92285363148835, longitude: -14.63104248046875 }
2024-08-13T20:52:03.976615Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7600.650246836566 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.9230863926774, longitude: -14.71343994140625 }
2024-08-13T20:52:12.768993Z  WARN rsadsb_common: rsadsb_common/src/lib.rs:419: range: 7584.062050955369 -  old: (36.0800439, -115.1522347) new: Position { latitude: -323.9241105419094, longitude: -15.0457763671875 }

You may notice the latitude is more than +-90 which is messing up the range check. We can do the math and figure out that the reported lat is "correct" it's just not in the expected range:

>>> -323.9241105419094 + 180 + 180
36.075889458090614

Might be something do to with lat/long parsing? I'm not sure this should be a reported value.

wcampbell0x2a commented 3 weeks ago

@YurBoiRene I don't have a way of testing this, but causing mod to be positive might be the fix?

https://github.com/rsadsb/adsb_deku/pull/301/commits/b980c9295dca576817f7d5e23207f220dbc6f247 (pushed it to that MR)

YurBoiRene commented 3 weeks ago

I moved locations so I also cannot test your exact changes but I made a similar fix that fixed it. We can probably make some tests.

dividebysandwich commented 1 week ago

I just did some testing and this does look a LOT better here. Even with a very compromised antenna I now get an almost complete picture around me. It's really a massive improvement.

wcampbell0x2a commented 4 days ago

Thanks for the data, this should be fixed in https://github.com/rsadsb/adsb_deku/releases/tag/v2024.09.02 :confetti_ball: