mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
Rover: use vector.xy().length() instead of norm(x,y)
This commit is contained in:
parent
f534a315ea
commit
b2d9504c3a
@ -256,7 +256,7 @@ void Rover::ahrs_update()
|
|||||||
// if using the EKF get a speed update now (from accelerometers)
|
// if using the EKF get a speed update now (from accelerometers)
|
||||||
Vector3f velocity;
|
Vector3f velocity;
|
||||||
if (ahrs.get_velocity_NED(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) {
|
} else if (gps.status() >= AP_GPS::GPS_OK_FIX_3D) {
|
||||||
ground_speed = ahrs.groundspeed();
|
ground_speed = ahrs.groundspeed();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user