updateYawInRotMat with hidden rotation sequence handling

This commit is contained in:
kamilritz
2020-08-27 09:51:56 +10:00
committed by Paul Riseborough
parent 419b70e4b5
commit 9797e4d28f
4 changed files with 12 additions and 9 deletions
+6
View File
@@ -99,3 +99,9 @@ matrix::Dcmf updateEuler312YawInRotMat(float yaw, const matrix::Dcmf& rot_in) {
atan2f(-rot_in(2, 0), rot_in(2, 2))); // pitch
return taitBryan312ToRotMat(rotVec312);
}
matrix::Dcmf updateYawInRotMat(float yaw, const matrix::Dcmf& rot_in) {
return shouldUse321RotationSequence(rot_in) ?
updateEuler321YawInRotMat(yaw, rot_in) :
updateEuler312YawInRotMat(yaw, rot_in);
}