diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-21 23:45:16 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-01-21 23:45:16 +0100 |
commit | 2ebb1812f1eea47f06e79650242416493ce279b9 (patch) | |
tree | 1957033e730cf778fa85f90036e9f963c8e2d6a6 /apps/systemlib/conversions.c | |
parent | 48e497e4069a2f8773d90f2d1887967a81e487d8 (diff) | |
download | px4-firmware-2ebb1812f1eea47f06e79650242416493ce279b9.tar.gz px4-firmware-2ebb1812f1eea47f06e79650242416493ce279b9.tar.bz2 px4-firmware-2ebb1812f1eea47f06e79650242416493ce279b9.zip |
Implemented airspeed measurement. Untested
Diffstat (limited to 'apps/systemlib/conversions.c')
-rw-r--r-- | apps/systemlib/conversions.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/systemlib/conversions.c b/apps/systemlib/conversions.c index fed97f101..2b8003e45 100644 --- a/apps/systemlib/conversions.c +++ b/apps/systemlib/conversions.c @@ -42,10 +42,6 @@ #include "conversions.h" -#define air_gas_constant 8.31432f -#define air_density_sea_level 1.225f -#define absolute_null_kelvin 273.15f - int16_t int16_t_from_bytes(uint8_t bytes[]) { @@ -154,5 +150,5 @@ void quat2rot(const float Q[4], float R[9]) float get_air_density(float static_pressure, float temperature_celsius) { - return static_pressure / (air_gas_constant * (temperature_celsius + absolute_null_kelvin)); + return static_pressure / (CONSTANTS_AIR_GAS_CONST * (temperature_celsius + CONSTANTS_ABSOLUTE_NULL_KELVIN)); } |