Added support for battery voltage and differential pressure to logging and plot script

This commit is contained in:
Lorenz Meier
2013-01-09 16:37:45 +01:00
parent e1a6f1b910
commit 16e49c447d
11 changed files with 388 additions and 23 deletions
+9
View File
@@ -42,6 +42,10 @@
#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[])
{
@@ -55,3 +59,8 @@ int16_t_from_bytes(uint8_t bytes[])
return u.w;
}
float get_air_density(float static_pressure, float temperature_celsius)
{
return static_pressure/(air_gas_constant * (temperature_celsius + absolute_null_kelvin));
}