mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 05:10:34 +08:00
ekf2: reinit baro height on sensor or calibration change
- handle reset on delayed time horizon
This commit is contained in:
@@ -229,9 +229,8 @@ void EstimatorInterface::setBaroData(const baroSample &baro_sample)
|
||||
// limit data rate to prevent data being lost
|
||||
if (time_us >= static_cast<int64_t>(_baro_buffer->get_newest().time_us + _min_obs_interval_us)) {
|
||||
|
||||
baroSample baro_sample_new;
|
||||
baroSample baro_sample_new{baro_sample};
|
||||
baro_sample_new.time_us = time_us;
|
||||
baro_sample_new.hgt = baro_sample.hgt;
|
||||
|
||||
_baro_buffer->push(baro_sample_new);
|
||||
_time_last_baro_buffer_push = _newest_high_rate_imu_sample.time_us;
|
||||
|
||||
Reference in New Issue
Block a user