AP_Airspeed: a bit more filtering

this helps reduce noise at low speed
This commit is contained in:
Andrew Tridgell 2012-09-19 15:28:43 +10:00
parent 69c29f5196
commit f3f9d644d9
2 changed files with 1 additions and 4 deletions

View File

@ -11,7 +11,6 @@
#include <FastSerial.h>
#include <AP_Common.h>
#include <AP_Airspeed.h>
#include <LowPassFilter.h>
// table of user settable parameters
const AP_Param::GroupInfo AP_Airspeed::var_info[] PROGMEM = {
@ -71,5 +70,5 @@ void AP_Airspeed::read(void)
}
_airspeed_raw = _source->read();
airspeed_pressure = max((_airspeed_raw - _offset), 0);
_airspeed = sqrt(airspeed_pressure * _ratio);
_airspeed = 0.7 * _airspeed + 0.3 * sqrt(airspeed_pressure * _ratio);
}

View File

@ -6,8 +6,6 @@
#include <AP_Common.h>
#include <AP_Param.h>
#include <AP_AnalogSource.h>
#include <Filter.h>
#include <AverageFilter.h>
class AP_Airspeed
{