airspeed sensors apply offset separately

This commit is contained in:
Daniel Agar
2017-07-06 10:05:07 -04:00
parent c45d369004
commit eb067291bf
12 changed files with 10 additions and 71 deletions
@@ -75,7 +75,6 @@ AirspeedSim::AirspeedSim(int bus, int address, unsigned conversion_interval, con
VDev("AIRSPEEDSIM", path),
_reports(nullptr),
_retries(0),
_max_differential_pressure_pa(0),
_sensor_ok(false),
_last_published_sensor_ok(true), /* initialize differently to force publication */
_measure_ticks(0),
@@ -123,7 +123,6 @@ protected:
void update_status();
struct work_s _work;
float _max_differential_pressure_pa;
bool _sensor_ok;
bool _last_published_sensor_ok;
unsigned _measure_ticks;
@@ -194,18 +194,11 @@ MEASAirspeedSim::collect()
struct differential_pressure_s report;
/* track maximum differential pressure measured (so we can work out top speed). */
if (diff_press_pa_raw > _max_differential_pressure_pa) {
_max_differential_pressure_pa = diff_press_pa_raw;
}
report.timestamp = hrt_absolute_time();
report.error_count = perf_event_count(_comms_errors);
report.temperature = temperature;
report.differential_pressure_filtered_pa = _filter.apply(diff_press_pa_raw);
report.differential_pressure_filtered_pa = _filter.apply(diff_press_pa_raw);
report.differential_pressure_raw_pa = diff_press_pa_raw;
report.max_differential_pressure_pa = _max_differential_pressure_pa;
if (_airspeed_pub != nullptr && !(_pub_blocked)) {
/* publish it */
@@ -281,18 +274,6 @@ MEASAirspeedSim::cycle()
USEC2TICK(CONVERSION_INTERVAL));
}
/**
correct for 5V rail voltage if the system_power ORB topic is
available
See http://uav.tridgell.net/MS4525/MS4525-offset.png for a graph of
offset versus voltage for 3 sensors
*/
void
MEASAirspeedSim::voltage_correction(float &diff_press_pa, float &temperature)
{
}
/**
* Local functions in support of the shell command.
*/