[math] convert PPRZ_ISA_M_OF_P_CONST from define to static const float

so it doesn't have to be recomputed every time
This commit is contained in:
Felix Ruess
2013-09-06 17:13:42 +02:00
parent f106f62596
commit 37a59a425e
+1 -1
View File
@@ -46,7 +46,7 @@
#define PPRZ_ISA_GRAVITY 9.80665 #define PPRZ_ISA_GRAVITY 9.80665
#define PPRZ_ISA_AIR_GAS_CONSTANT (8.31447/0.0289644) #define PPRZ_ISA_AIR_GAS_CONSTANT (8.31447/0.0289644)
#define PPRZ_ISA_M_OF_P_CONST (PPRZ_ISA_AIR_GAS_CONSTANT*PPRZ_ISA_SEA_LEVEL_TEMP/PPRZ_ISA_GRAVITY) static const float PPRZ_ISA_M_OF_P_CONST = (PPRZ_ISA_AIR_GAS_CONSTANT*PPRZ_ISA_SEA_LEVEL_TEMP/PPRZ_ISA_GRAVITY);
/** /**
* Get absolute altitude from pressure (using simplified equation). * Get absolute altitude from pressure (using simplified equation).