19 { 24.8925f, 2.6766f, 0.1327f, 0.0040f, 8.1294e-5f, 1.1624e-6f },
20 { 3.3640e3f, 198.8920f, 5.1247f, 0.0741f, 6.364e-4f, 3.0197e-6f }
22 float a[2] = { 239.15f, 299.15f };
26#define POT_2(x) ((x)*(x))
27#define POT_3(x) ((x)*(x)*(x))
28#define POT_4(x) ((x)*(x)*(x)*(x))
29#define POT_5(x) ((x)*(x)*(x)*(x)*(x))
38float atmosphere_t::calculateSaturationVaporPressure(
float temp)
40 if (PWS.range1Begin <=
temp &&
temp < PWS.range2Begin)
42 return (PWS.s[0][0] + PWS.s[0][1] * ((
temp - PWS.a[0]))
46 + PWS.s[0][5] *
POT_5((
temp - PWS.a[0])));
48 else if (PWS.range2Begin <=
temp &&
temp <= PWS.rangeEnd)
50 return (PWS.s[1][0] + PWS.s[1][1] * ((
temp - PWS.a[1]))
54 + PWS.s[1][5] *
POT_5((
temp - PWS.a[1])));
71float atmosphere_t::calculateGasConstantHumAir(
72 float humidity,
float pressure,
float temperature)
74 float satVapPressure = calculateSaturationVaporPressure(temperature);
93float atmosphere_t::calculateAirDensity(
94 float humidity,
float pressure,
float temperature)
98 return pressure /
gasConst / temperature;
computes properties of earth's atmosphere
#define CELSIUS_TO_KELVIN_OFFSET
#define ONE_MINUS_RATIO_GAS_CONSTANTS
#define GAS_CONST_DRY_AIR
mathematical vector of arbitrary type and size
settings to allow compiling embedded software on a PC target