forked from Archive/PX4-Autopilot
EKF: fix time of sample receive setting
This commit is contained in:
parent
de02aebafd
commit
2096e24c06
|
@ -180,9 +180,8 @@ void EstimatorInterface::setAirspeedData(uint64_t time_usec, float *data)
|
||||||
if (time_usec > _time_last_airspeed) {
|
if (time_usec > _time_last_airspeed) {
|
||||||
airspeedSample airspeed_sample_new;
|
airspeedSample airspeed_sample_new;
|
||||||
airspeed_sample_new.airspeed = *data;
|
airspeed_sample_new.airspeed = *data;
|
||||||
airspeed_sample_new.time_us -= _params.airspeed_delay_ms * 1000;
|
airspeed_sample_new.time_us = time_usec -_params.airspeed_delay_ms * 1000;
|
||||||
|
airspeed_sample_new.time_us -= FILTER_UPDATE_PERRIOD_MS * 1000 / 2;
|
||||||
airspeed_sample_new.time_us = time_usec -= FILTER_UPDATE_PERRIOD_MS * 1000 / 2;
|
|
||||||
_time_last_airspeed = time_usec;
|
_time_last_airspeed = time_usec;
|
||||||
|
|
||||||
_airspeed_buffer.push(airspeed_sample_new);
|
_airspeed_buffer.push(airspeed_sample_new);
|
||||||
|
|
Loading…
Reference in New Issue