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
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8ad605c
Fix ADSB: heading, speed & callsign, fix unit conv
MUSTARDTIGERFPV Oct 24, 2023
c14175b
Add Squawk codes to SBS-1 decode
MUSTARDTIGERFPV Oct 24, 2023
ffaae9d
Debug-filled functional 1Hz ADS-B
MUSTARDTIGERFPV Oct 25, 2023
8138473
Send less planes faster if less are in radius
MUSTARDTIGERFPV Oct 25, 2023
b986400
Fix ADS-B unit conversions, fix internal API, add velocities
MUSTARDTIGERFPV Oct 30, 2023
8bdf961
Use ADS-B ThreatLevel from MAV
MUSTARDTIGERFPV Oct 31, 2023
c2ee543
Clean up old planes from our internal memory
MUSTARDTIGERFPV Oct 31, 2023
e8179e4
Merge remote-tracking branch 'origin' into adsb-ticks
MUSTARDTIGERFPV Oct 31, 2023
829efce
Add ADS-B Collision risk to tooltip
MUSTARDTIGERFPV Oct 31, 2023
7787e78
Fix ADS-B radius render errors
MUSTARDTIGERFPV Oct 31, 2023
db9ec5e
Improve collision risk tooltip wording
MUSTARDTIGERFPV Oct 31, 2023
b205ee8
Pass source to UpdatePlanePosition
MUSTARDTIGERFPV Oct 31, 2023
4dfe01c
Only update threat level when necessary, fix messages
MUSTARDTIGERFPV Nov 1, 2023
4d4dfe6
Shorten ADS-B loop, simplify code
MUSTARDTIGERFPV Nov 4, 2023
436994c
Remove log lines
MUSTARDTIGERFPV Nov 5, 2023
0aec567
Only show tooltips on hover for ADSB
MUSTARDTIGERFPV Nov 14, 2023
780f3bf
Fix scaling bugs & add user-agent
MUSTARDTIGERFPV Feb 17, 2024
f254844
Merge branch 'master' of https://github.com/ArduPilot/MissionPlanner …
MUSTARDTIGERFPV Apr 18, 2024
09cd0ea
Fix merge issue
MUSTARDTIGERFPV Apr 18, 2024
059e065
Improve ADSB HTTP logic, rate limiting, default to adsb.lol
MUSTARDTIGERFPV May 16, 2024
3913f24
Merge branch 'master' into adsb-ticks
MUSTARDTIGERFPV May 16, 2024
202e55b
Merge branch 'master' into adsb-ticks
MUSTARDTIGERFPV Jul 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions ExtLibs/Maps/GMapMarkerQuad.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,38 @@ public override void OnRender(IGraphics g)
double width =
(Overlay.Control.MapProvider.Projection.GetDistance(Overlay.Control.FromLocalToLatLng(0, 0),
Overlay.Control.FromLocalToLatLng(Overlay.Control.Width, 0)) * 1000.0);
// size of a square meter in pixels on our map
double m2pixelwidth = Overlay.Control.Width / width;

GPoint loc = new GPoint((int) (LocalPosition.X - (m2pixelwidth * warn * 2)), LocalPosition.Y);

var markerDimension = (int)Math.Abs(loc.X - LocalPosition.X);
if (markerDimension == 0)
{
return;
}

if (m2pixelwidth > 0.001 && warn > 0)
g.DrawArc(Pens.Orange,
new System.Drawing.Rectangle(
LocalPosition.X - Offset.X - (int) (Math.Abs(loc.X - LocalPosition.X) / 2),
LocalPosition.Y - Offset.Y - (int) Math.Abs(loc.X - LocalPosition.X) / 2,
(int) Math.Abs(loc.X - LocalPosition.X), (int) Math.Abs(loc.X - LocalPosition.X)), 0,
markerDimension, markerDimension), 0,
360);

loc = new GPoint((int) (LocalPosition.X - (m2pixelwidth * danger * 2)), LocalPosition.Y);
markerDimension = (int)Math.Abs(loc.X - LocalPosition.X);
if (markerDimension == 0)
{
return;
}

if (m2pixelwidth > 0.001 && danger > 0)
g.DrawArc(Pens.Red,
new System.Drawing.Rectangle(
LocalPosition.X - Offset.X - (int) (Math.Abs(loc.X - LocalPosition.X) / 2),
LocalPosition.Y - Offset.Y - (int) Math.Abs(loc.X - LocalPosition.X) / 2,
(int) Math.Abs(loc.X - LocalPosition.X), (int) Math.Abs(loc.X - LocalPosition.X)), 0,
markerDimension, markerDimension), 0,
360);
}
}
Expand Down
Loading