mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 16:03:34 +08:00
adopted ekf_interface.cpp
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user