diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-10-23 14:32:28 -0700 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-10-23 14:32:28 -0700 |
commit | b131453443032e1f101ea54254908cf608b71ec1 (patch) | |
tree | 4bb96ecd60b6de4f8d696ec745ed1e99aedf2338 | |
parent | c4901579e7a11d654482ae509d36e346d1b6dec4 (diff) | |
parent | 8cffd2b8a33ccb4d556a181d5a6e55111c1b1f53 (diff) | |
download | px4-firmware-b131453443032e1f101ea54254908cf608b71ec1.tar.gz px4-firmware-b131453443032e1f101ea54254908cf608b71ec1.tar.bz2 px4-firmware-b131453443032e1f101ea54254908cf608b71ec1.zip |
Merge pull request #482 from thomasgubler/airspeed
fix scaling (unit) of airspeed in HIL
-rw-r--r-- | src/modules/mavlink/mavlink_receiver.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/mavlink/mavlink_receiver.cpp b/src/modules/mavlink/mavlink_receiver.cpp index 8243748dc..c51a6de08 100644 --- a/src/modules/mavlink/mavlink_receiver.cpp +++ b/src/modules/mavlink/mavlink_receiver.cpp @@ -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; |