Browse Source

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

gps-1.3.1
Josh Henderson 3 years ago committed by Andrew Tridgell
parent
commit
b2d9504c3a
  1. 2
      Rover/Rover.cpp

2
Rover/Rover.cpp

@ -256,7 +256,7 @@ void Rover::ahrs_update() @@ -256,7 +256,7 @@ void Rover::ahrs_update()
// if using the EKF get a speed update now (from accelerometers)
Vector3f velocity;
if (ahrs.get_velocity_NED(velocity)) {
ground_speed = norm(velocity.x, velocity.y);
ground_speed = velocity.xy().length();
} else if (gps.status() >= AP_GPS::GPS_OK_FIX_3D) {
ground_speed = ahrs.groundspeed();
}

Loading…
Cancel
Save