@@ -673,15 +673,20 @@ void Kalman3D_Wave<T, with_gyro_bias, with_accel_bias>::measurement_update_acc_o
673
673
S_mat.noalias () += J_aw * P_aw_aw * J_aw.transpose ();
674
674
675
675
if constexpr (with_accel_bias) {
676
- const Matrix3 P_th_ba = Pext.template block <3 ,3 >(OFF_TH, off_ba);
677
- const Matrix3 P_aw_ba = Pext.template block <3 ,3 >(off_aw, off_ba);
678
- const Matrix3 P_ba_ba = Pext.template block <3 ,3 >(off_ba, off_ba);
676
+ const Matrix3 P_th_ba = Pext.template block <3 ,3 >(OFF_TH, off_ba); // θ–ba
677
+ const Matrix3 P_aw_ba = Pext.template block <3 ,3 >(off_aw, off_ba); // aw–ba
678
+ const Matrix3 P_ba_ba = Pext.template block <3 ,3 >(off_ba, off_ba); // ba–ba
679
679
680
+ // Pull the *other orientation* blocks directly (don't rely on transpose of θ–ba / aw–ba)
681
+ const Matrix3 P_ba_th = Pext.template block <3 ,3 >(off_ba, OFF_TH); // ba–θ
682
+ const Matrix3 P_ba_aw = Pext.template block <3 ,3 >(off_ba, off_aw); // ba–aw
683
+
684
+ // Cross terms
680
685
S_mat.noalias () += J_att * P_th_ba * J_ba.transpose ();
681
686
S_mat.noalias () += J_aw * P_aw_ba * J_ba.transpose ();
682
687
683
- S_mat.noalias () += J_ba * P_th_ba. transpose () * J_att.transpose ();
684
- S_mat.noalias () += J_ba * P_aw_ba. transpose () * J_aw.transpose ();
688
+ S_mat.noalias () += J_ba * P_ba_th * J_att.transpose ();
689
+ S_mat.noalias () += J_ba * P_ba_aw * J_aw.transpose ();
685
690
686
691
S_mat.noalias () += J_ba * P_ba_ba * J_ba.transpose ();
687
692
}
0 commit comments