JohnMarzulli / StratuxHud

Heads Up Display for use with Stratux. Designed for reflective HUD screens, intended for traffic call outs.
https://johnmarzulli.github.io/StratuxHud/
GNU Lesser General Public License v3.0
119 stars 22 forks source link

Traffic Not Reporting Correctly #59

Closed Michaelc136 closed 4 years ago

Michaelc136 commented 4 years ago

Describe the bug To be more specific Traffic is reporting distance within the limits of 1.0 NM (and SM) to max of about 15 NM (and SM), None of the distances are correct.

for some reason its not reporting the accurate NM or SM info from the Stratux Unit even when SM are below 15NM

Screenshots image image image

Three images, One of which shows my Foreflight, Stratux window, and finally the HUD window. Just to confirm!!! ForeFlight and Stratux were reporting the same distances I just couldn’t screenshot fast enough during the window switch.

Additional context I did some snooping around in the code with my limited understanding. I do believe the haversine formula is correct, just was confused about the "/" in the middle, unsure if that was meant to be a line break.

I ended up making a gitclone to experiment and tried math.sin(dlat/2)2 + math.cos(lat1) math.cos(lat2) math.sin(dlon/2)2

Via (cd /home/pi/StratuxHud/traffic.py) nano edit

different formatting no effect, as expected,

Regardless, not complaining, everything else is great, thanks John.

JohnMarzulli commented 4 years ago

Will be addressed by #61