AP_NavEKF3: Don't allow yaw alignment until tilt alignment completed

This commit is contained in:
Paul Riseborough 2021-03-13 17:38:23 +11:00 committed by Andrew Tridgell
parent a07427fd30
commit 073e273732

View File

@ -41,7 +41,7 @@ void NavEKF3_core::controlMagYawReset()
// check if the spin rate is OK - high spin rates can cause angular alignment errors // check if the spin rate is OK - high spin rates can cause angular alignment errors
bool angRateOK = deltaRotVecTemp.length() < 0.1745f; bool angRateOK = deltaRotVecTemp.length() < 0.1745f;
initialResetAllowed = angRateOK; initialResetAllowed = angRateOK && tiltAlignComplete;
flightResetAllowed = angRateOK && !onGround; flightResetAllowed = angRateOK && !onGround;
} }