mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-23 17:18:28 -04:00
AP_NavEKF3: use use_EKFGSFYaw to reduce code duplication
This commit is contained in:
parent
a31ea88ff5
commit
6dfd2f2ff9
@ -1464,12 +1464,8 @@ bool NavEKF3_core::EKFGSF_resetMainFilterYaw()
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
float yawEKFGSF, yawVarianceEKFGSF, velInnovLength;
|
float yawEKFGSF, yawVarianceEKFGSF;
|
||||||
if (yawEstimator->getYawData(yawEKFGSF, yawVarianceEKFGSF) &&
|
if (EKFGSF_getYaw(yawEKFGSF, yawVarianceEKFGSF)) {
|
||||||
is_positive(yawVarianceEKFGSF) &&
|
|
||||||
yawVarianceEKFGSF < sq(radians(GSF_YAW_ACCURACY_THRESHOLD_DEG)) &&
|
|
||||||
(assume_zero_sideslip() || (yawEstimator->getVelInnovLength(velInnovLength) && velInnovLength < frontend->maxYawEstVelInnov))) {
|
|
||||||
|
|
||||||
// keep roll and pitch and reset yaw
|
// keep roll and pitch and reset yaw
|
||||||
rotationOrder order;
|
rotationOrder order;
|
||||||
bestRotationOrder(order);
|
bestRotationOrder(order);
|
||||||
|
Loading…
Reference in New Issue
Block a user