Browse Source

sensors: use filtered diff pressure to calculate airspeed

sbg
Thomas Gubler 11 years ago
parent
commit
be349b989a
  1. 4
      src/modules/sensors/sensors.cpp

4
src/modules/sensors/sensors.cpp

@ -1031,8 +1031,8 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw) @@ -1031,8 +1031,8 @@ Sensors::diff_pres_poll(struct sensor_combined_s &raw)
raw.differential_pressure_filtered_pa = _diff_pres.differential_pressure_filtered_pa;
raw.differential_pressure_counter++;
_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 */

Loading…
Cancel
Save