shouldUse321RotationSequence(const Dcmf& R)

This commit is contained in:
Kamil Ritz
2020-08-27 09:51:56 +10:00
committed by Paul Riseborough
parent 4872f2a545
commit 15afa8ae17
5 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -723,7 +723,7 @@ void Ekf::fuseHeading()
_R_to_earth = Dcmf(_state.quat_nominal);
// determine if a 321 or 312 Euler sequence is best
if (fabsf(_R_to_earth(2, 0)) < fabsf(_R_to_earth(2, 1))) {
if (shouldUse321RotationSequence(_R_to_earth)) {
// rolled more than pitched so use 321 rotation order to calculate the observed yaw angle
Eulerf euler321(_state.quat_nominal);
predicted_hdg = euler321(2);