Browse Source

adopted ekf_interface.cpp

master
CarlOlsson 9 years ago committed by Roman Bapst
parent
commit
d440c883b5
  1. 4
      EKF/estimator_interface.cpp

4
EKF/estimator_interface.cpp

@ -206,11 +206,11 @@ void EstimatorInterface::setAirspeedData(uint64_t time_usec, float *data) @@ -206,11 +206,11 @@ void EstimatorInterface::setAirspeedData(uint64_t time_usec, float *data)
return;
}
if (time_usec > _time_last_airspeed) {
if (time_usec - _time_last_airspeed > 1000000) { //Limit the airspeed update rate to 1 Hz for now
airspeedSample airspeed_sample_new;
airspeed_sample_new.airspeed = *data;
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 -= FILTER_UPDATE_PERRIOD_MS * 1000 / 2; //typo PeRRiod
_time_last_airspeed = time_usec;
_airspeed_buffer.push(airspeed_sample_new);

Loading…
Cancel
Save