mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 07:13:34 +08:00
ekf2: fix EV height bias predict call
- needs to be called every iteration
This commit is contained in:
@@ -41,6 +41,7 @@
|
|||||||
void Ekf::controlExternalVisionFusion()
|
void Ekf::controlExternalVisionFusion()
|
||||||
{
|
{
|
||||||
_ev_pos_b_est.predict(_dt_ekf_avg);
|
_ev_pos_b_est.predict(_dt_ekf_avg);
|
||||||
|
_ev_hgt_b_est.predict(_dt_ekf_avg);
|
||||||
|
|
||||||
// Check for new external vision data
|
// Check for new external vision data
|
||||||
extVisionSample ev_sample;
|
extVisionSample ev_sample;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ void Ekf::controlEvHeightFusion(const extVisionSample &ev_sample, const bool com
|
|||||||
|
|
||||||
HeightBiasEstimator &bias_est = _ev_hgt_b_est;
|
HeightBiasEstimator &bias_est = _ev_hgt_b_est;
|
||||||
|
|
||||||
bias_est.predict(_dt_ekf_avg);
|
// bias_est.predict(_dt_ekf_avg) called by controlExternalVisionFusion()
|
||||||
|
|
||||||
// correct position for offset relative to IMU
|
// correct position for offset relative to IMU
|
||||||
const Vector3f pos_offset_body = _params.ev_pos_body - _params.imu_pos_body;
|
const Vector3f pos_offset_body = _params.ev_pos_body - _params.imu_pos_body;
|
||||||
|
|||||||
Reference in New Issue
Block a user