Skip to content

Commit 8a31789

Browse files
authored
Update Kalman3D_Wave.h
1 parent 2d33e9a commit 8a31789

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

bbn_wave_freq_m5atomS3/Kalman3D_Wave.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -673,15 +673,20 @@ void Kalman3D_Wave<T, with_gyro_bias, with_accel_bias>::measurement_update_acc_o
673673
S_mat.noalias() += J_aw * P_aw_aw * J_aw.transpose();
674674

675675
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
679679

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
680685
S_mat.noalias() += J_att * P_th_ba * J_ba.transpose();
681686
S_mat.noalias() += J_aw * P_aw_ba * J_ba.transpose();
682687

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();
685690

686691
S_mat.noalias() += J_ba * P_ba_ba * J_ba.transpose();
687692
}

0 commit comments

Comments
 (0)