开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

Aircraft bearing (Heading) in ADSB decoding. Yes again, but with fix this time!


 

Hi Andrew,

The adsbdecode plugin has a bug where the computed ground track based on aircraft velocity is incorrect. This results in the icon, bearing and track prediction being incorrect.

The issue is in AircraftState.java, line 496. The variables ewVelocity and nsVelocity are swapped. Another issue is the float variable is cast to (int) potentially making the heading up to 1 degree off.

I think the correct line 496 should be;

bearing = (int)Math.round(Math.toDegrees(Math.atan2(ewVelocity, nsVelocity)));

I have compiled and tested this locally and it produces the correct result. I’ve also filled out a ticket at sourceforge.

Carl.
vk1kcm.

Join [email protected] to automatically receive all group messages.