Browse Source

AP_NMEA_Output: use vector.xy().length() instead of norm(x,y)

gps-1.3.1
Josh Henderson 3 years ago committed by Andrew Tridgell
parent
commit
51023fc846
  1. 2
      libraries/AP_NMEA_Output/AP_NMEA_Output.cpp

2
libraries/AP_NMEA_Output/AP_NMEA_Output.cpp

@ -138,7 +138,7 @@ void AP_NMEA_Output::update() @@ -138,7 +138,7 @@ void AP_NMEA_Output::update()
// get speed
Vector2f speed = 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;
float heading = wrap_360(degrees(atan2f(speed.x, speed.y)));
// format RMC message

Loading…
Cancel
Save