From 7a3425faca462361b119d55c7ccfd5acf6822572 Mon Sep 17 00:00:00 2001 From: Josh Henderson Date: Sat, 11 Sep 2021 22:46:18 -0400 Subject: [PATCH] AP_ADSB: sagetech use vector.xy().length() instead of norm(x,y) --- libraries/AP_ADSB/AP_ADSB_Sagetech.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp index b196a5474f..b11a36abbb 100644 --- a/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp +++ b/libraries/AP_ADSB/AP_ADSB_Sagetech.cpp @@ -500,7 +500,7 @@ void AP_ADSB_Sagetech::send_msg_GPS() // ground speed const Vector2f speed = AP::ahrs().groundspeed_vector(); - float speed_knots = norm(speed.x, speed.y) * M_PER_SEC_TO_KNOTS; + float speed_knots = speed.length() * M_PER_SEC_TO_KNOTS; snprintf((char*)&pkt.payload[21], 7, "%03u.%02u", (unsigned)speed_knots, unsigned((speed_knots - (int)speed_knots) * 1.0E2)); // heading