diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-03-23 16:50:18 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-03-23 16:50:18 +0100 |
commit | d1e2e855a3c4b7ba07b91988238e09fc67d2effa (patch) | |
tree | c6b29a570e1b3bb7124c3a80f15f27a41d49ba38 | |
parent | e5b22810994e8eeda6819041eb02b9f30b258558 (diff) | |
parent | 70b3a851941c4cb6e57684035751c03a909a60fb (diff) | |
download | px4-firmware-d1e2e855a3c4b7ba07b91988238e09fc67d2effa.tar.gz px4-firmware-d1e2e855a3c4b7ba07b91988238e09fc67d2effa.tar.bz2 px4-firmware-d1e2e855a3c4b7ba07b91988238e09fc67d2effa.zip |
Merged airspeed sensor use
-rw-r--r-- | src/modules/sensors/sensors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 2ec8a669f..91a8d5670 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1032,8 +1032,8 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw) raw.differential_pressure_filtered_pa = _diff_pres.differential_pressure_filtered_pa; _airspeed.timestamp = _diff_pres.timestamp; - _airspeed.indicated_airspeed_m_s = calc_indicated_airspeed(_diff_pres.differential_pressure_pa); - _airspeed.true_airspeed_m_s = calc_true_airspeed(_diff_pres.differential_pressure_pa + raw.baro_pres_mbar * 1e2f, + _airspeed.indicated_airspeed_m_s = calc_indicated_airspeed(_diff_pres.differential_pressure_filtered_pa); + _airspeed.true_airspeed_m_s = calc_true_airspeed(_diff_pres.differential_pressure_filtered_pa + raw.baro_pres_mbar * 1e2f, raw.baro_pres_mbar * 1e2f, raw.baro_temp_celcius - PCB_TEMP_ESTIMATE_DEG); /* announce the airspeed if needed, just publish else */ |