ekf2: use alpha filter class

This commit is contained in:
bresch
2024-12-18 14:11:08 +01:00
committed by Matthias Grob
parent fa5a781e20
commit 480c232bfd
4 changed files with 13 additions and 14 deletions
+7 -2
View File
@@ -490,8 +490,13 @@ private:
Dcmf _R_to_earth{}; ///< transformation matrix from body frame to earth frame from last EKF prediction
Vector2f _accel_lpf_NE{}; ///< Low pass filtered horizontal earth frame acceleration (m/sec**2)
float _height_rate_lpf{0.0f};
static constexpr float _kAccelHorizLpfTimeConstant = 1.f;
AlphaFilter<Vector2f> _accel_horiz_lpf{_kAccelHorizLpfTimeConstant}; ///< Low pass filtered horizontal earth frame acceleration (m/sec**2)
#if defined(CONFIG_EKF2_WIND)
static constexpr float _kHeightRateLpfTimeConstant = 10.f;
AlphaFilter<float> _height_rate_lpf{_kHeightRateLpfTimeConstant};
#endif // CONFIG_EKF2_WIND
SquareMatrixState P{}; ///< state covariance matrix