Plane: Whitespace fixes
This commit is contained in:
parent
205fc7b55d
commit
42e67d5849
@ -173,19 +173,19 @@ void Plane::calc_airspeed_errors()
|
||||
|
||||
void Plane::calc_gndspeed_undershoot()
|
||||
{
|
||||
// Use the component of ground speed in the forward direction
|
||||
// This prevents flyaway if wind takes plane backwards
|
||||
// Use the component of ground speed in the forward direction
|
||||
// This prevents flyaway if wind takes plane backwards
|
||||
if (gps.status() >= AP_GPS::GPS_OK_FIX_2D) {
|
||||
Vector2f gndVel = ahrs.groundspeed_vector();
|
||||
const Matrix3f &rotMat = ahrs.get_rotation_body_to_ned();
|
||||
Vector2f yawVect = Vector2f(rotMat.a.x,rotMat.b.x);
|
||||
Vector2f gndVel = ahrs.groundspeed_vector();
|
||||
const Matrix3f &rotMat = ahrs.get_rotation_body_to_ned();
|
||||
Vector2f yawVect = Vector2f(rotMat.a.x,rotMat.b.x);
|
||||
if (!yawVect.is_zero()) {
|
||||
yawVect.normalize();
|
||||
float gndSpdFwd = yawVect * gndVel;
|
||||
groundspeed_undershoot = (aparm.min_gndspeed_cm > 0) ? (aparm.min_gndspeed_cm - gndSpdFwd*100) : 0;
|
||||
}
|
||||
} else {
|
||||
groundspeed_undershoot = 0;
|
||||
groundspeed_undershoot = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user