diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-10 19:24:37 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2013-11-10 19:25:38 +0100 |
commit | ae9fae5aae2aacbdb97aab9a858dccbe39e4d40a (patch) | |
tree | e8b9bba577d13202416d98aa3b10939fbb159d38 /src/modules/systemlib | |
parent | c63995e91c188b476aa2608b42a366f68dced423 (diff) | |
download | px4-firmware-ae9fae5aae2aacbdb97aab9a858dccbe39e4d40a.tar.gz px4-firmware-ae9fae5aae2aacbdb97aab9a858dccbe39e4d40a.tar.bz2 px4-firmware-ae9fae5aae2aacbdb97aab9a858dccbe39e4d40a.zip |
fix MEAS airspeed and airspeed calibration
Diffstat (limited to 'src/modules/systemlib')
-rw-r--r-- | src/modules/systemlib/airspeed.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/systemlib/airspeed.c b/src/modules/systemlib/airspeed.c index 310fbf60f..1a479c205 100644 --- a/src/modules/systemlib/airspeed.c +++ b/src/modules/systemlib/airspeed.c @@ -59,7 +59,7 @@ float calc_indicated_airspeed(float differential_pressure) { - if (differential_pressure > 0) { + if (differential_pressure > 0.0f) { return sqrtf((2.0f*differential_pressure) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C); } else { return -sqrtf((2.0f*fabsf(differential_pressure)) / CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C); |