mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 23:53:33 +08:00
airspeed sensors apply offset separately
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user