Merge pull request #482 from thomasgubler/airspeed

fix scaling (unit) of airspeed in HIL
This commit is contained in:
Lorenz Meier 2013-10-23 14:32:28 -07:00
commit b131453443
1 changed files with 2 additions and 2 deletions

View File

@ -422,13 +422,13 @@ handle_message(mavlink_message_t *msg)
hil_sensors.accelerometer_counter = hil_counter;
/* differential pressure */
hil_sensors.differential_pressure_pa = imu.diff_pressure;
hil_sensors.differential_pressure_pa = imu.diff_pressure * 1e2f; //from hPa to Pa
hil_sensors.differential_pressure_counter = hil_counter;
/* airspeed from differential pressure, ambient pressure and temp */
struct airspeed_s airspeed;
float ias = calc_indicated_airspeed(imu.diff_pressure);
float ias = calc_indicated_airspeed(hil_sensors.differential_pressure_pa);
// XXX need to fix this
float tas = ias;