diff --git a/main/traffic.go b/main/traffic.go index bf551416..9689bdb5 100644 --- a/main/traffic.go +++ b/main/traffic.go @@ -269,7 +269,7 @@ func parseDownlinkReport(s string) { if ns_vel_valid && ew_vel_valid { if ns_vel != 0 && ew_vel != 0 { //TODO: Track type - track = (360 + 90 - (uint16(math.Atan2(float64(ns_vel), float64(ew_vel)) * 180 / math.Pi))) % 360 + track = uint16((360 + 90 - (int16(math.Atan2(float64(ns_vel), float64(ew_vel)) * 180 / math.Pi))) % 360) } speed_valid = true speed = uint16(math.Sqrt(float64((ns_vel * ns_vel) + (ew_vel * ew_vel))))