ekf2: improve attitude estimation without horizontal aiding

- fake_pos only if at rest or tilt variances becomes large
 - fake pos: don't run when grav fusion is enabled
 - gravity fusion enabled by default
 - gravity: only fuse when accel norm and lpf norm are consistent

Co-authored-by: bresch <brescianimathieu@gmail.com>
This commit is contained in:
Daniel Agar
2024-01-10 12:45:09 -05:00
parent 8158a14eff
commit ed0d26de8a
9 changed files with 650 additions and 631 deletions
+9
View File
@@ -250,6 +250,7 @@ bool EKF2::multi_init(int imu, int mag)
_estimator_states_pub.advertise();
_estimator_status_flags_pub.advertise();
_estimator_status_pub.advertise();
#if defined(CONFIG_EKF2_GNSS)
_yaw_est_pub.advertise();
#endif // CONFIG_EKF2_GNSS
@@ -313,6 +314,14 @@ bool EKF2::multi_init(int imu, int mag)
# endif // CONFIG_EKF2_GNSS_YAW
#endif // CONFIG_EKF2_GNSS
#if defined(CONFIG_EKF2_GRAVITY_FUSION)
if (_param_ekf2_imu_ctrl.get() & static_cast<int32_t>(ImuCtrl::GravityVector)) {
_estimator_aid_src_gravity_pub.advertise();
}
#endif // CONFIG_EKF2_GRAVITY_FUSION
#if defined(CONFIG_EKF2_RANGE_FINDER)
// RNG advertise