Skip to content

Commit

Permalink
adsb: fix avr ground speed
Browse files Browse the repository at this point in the history
  • Loading branch information
meee1 committed Feb 7, 2025
1 parent 4181c1c commit 95f62a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExtLibs/Utilities/adsb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -863,7 +863,7 @@ public void ReadMessage(Stream st1)
PointLatLngAltHdg plla = new PointLatLngAltHdg(plane.plla());
plla.Heading = (float)plane.heading;
if (plane.CallSign != null) plla.CallSign = plane.CallSign;
plla.Speed = (float)plane.ground_speed * KNOTS_TO_CMS;
plla.Speed = (float)plane.ground_speed;
if (plla.Lat == 0 && plla.Lng == 0)
continue;
if (UpdatePlanePosition != null && plla != null)
Expand Down Expand Up @@ -1241,7 +1241,7 @@ public static Plane ReadMessage(string avrline)
Console.WriteLine("vel " + ewvel + " " + nsvel + " " + cog + " gs " + _gs);

((Plane)Planes[adsbmess.AA.ToString("X5")]).heading = (cog + 360) % 360;
((Plane)Planes[adsbmess.AA.ToString("X5")]).ground_speed = (int)(_gs * KNOTS_TO_CMS);
((Plane)Planes[adsbmess.AA.ToString("X5")]).ground_speed = (int)(_gs * (KNOTS_TO_CMS/100.0));

break;
}
Expand Down

0 comments on commit 95f62a2

Please sign in to comment.