mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-18 14:10:35 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user