Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ADS-B input support in Mission Planner #3251

Merged
merged 22 commits into from
Jul 30, 2024

Conversation

MUSTARDTIGERFPV
Copy link
Contributor

@MUSTARDTIGERFPV MUSTARDTIGERFPV commented Dec 2, 2023

What this PR accomplishes

This PR refactors a significant portion of ADS-B support in Mission Planner. In the process of developing MavADSB I ran into a good number of bugs and quirks in the Mission Planner support for ADS-B input data. As I found these issues, I sought to resolve them and improve the operation of the whole component.

Changes

  • [Feature] Built-in ADS-B API support - just add an HTTP base URL after enabling in Planner settings. I've spoken with @iakat about this and she's offered to let us make https://api.adsb.lol the default; I've set it to that for now.
  • [Feature] ADSB_VEHICLE MAVLink uplink is limited to 1Hz, round-robin closest 10 planes within 10km. This keeps ADS-B in on the ground station from overwhelming your telemetry link. The previous approach sent known vehicles every time there was an update - enough to completely fill a telemetry link's bandwidth many times over. This approach sends only the amount necessary for up-to-date collision avoidance.
  • [Feature] ADSB tooltip values follow Mission Planner preferred unit settings; unit labels are shown as well.
  • [Feature] ADSB tooltip includes distance to MAV
  • [Feature] ADSB tooltip includes MAV's collision threat level if enabled
  • [Fix] ADSB_VEHICLES sent to the MAV, then sent back down are now ignored
  • [Fix] Corrected unit scaling for altitude. Previous math had a 7% error.
  • [Fix] ADSB vehicles work at all zoom levels. Previously, certain zoom levels wouldn't work if connected to a MAV with avoidance enabled due to a divide-by-0 bug with the zoom level.
  • [Fix] Sped up HTTP load times; defaults to 1Hz update rate and respects HTTP 429 responses for rate limiting.
  • [Fix] Resolved multi-write issues in collision threat level field
  • [Minor] If MAV home location is unset, we'll pull ADS-B info over HTTP for the viewport location. Nice for checking functionality before connecting a MAV
  • [Minor] Fixed unit consistency in ADS-B parsing between different input sources; all sources are now normalized to the standard Ardupilot units then transformed into display units

@MUSTARDTIGERFPV
Copy link
Contributor Author

@meee1 would you be willing to review this PR?

@MUSTARDTIGERFPV
Copy link
Contributor Author

@meee1 this PR should be all good to go. Can you please take a look and merge if everything looks good?

@MUSTARDTIGERFPV
Copy link
Contributor Author

@meee1 is there any reason not to merge this PR?

@meee1 meee1 merged commit eefd216 into ArduPilot:master Jul 30, 2024
6 checks passed
@MUSTARDTIGERFPV MUSTARDTIGERFPV deleted the adsb-ticks branch July 30, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants