]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/Atmosphere.hpp
Patch from Melchior Franz:
[flightgear.git] / src / FDM / YASim / Atmosphere.hpp
1 #ifndef _ATMOSPHERE_HPP
2 #define _ATMOSPHERE_HPP
3
4 namespace yasim {
5
6 class Atmosphere {
7 public:
8     static float getStdTemperature(float alt);
9     static float getStdPressure(float alt);
10     static float getStdDensity(float alt);
11
12     static float calcVCAS(float spd, float pressure, float temp);
13     static float calcVEAS(float spd, float pressure, float temp);
14     static float calcMach(float spd, float temp);
15     static float calcDensity(float pressure, float temp);
16     
17     // Given ambient ("0") pressure/density/temperature values,
18     // calculate the properties of static air (air accelerated to the
19     // aircraft's speed) at a given velocity.  Includes
20     // compressibility, but not shock effects.
21     static void calcStaticAir(float p0, float t0, float d0, float v,
22                               float* pOut, float* tOut, float* dOut);
23
24 private:
25     static float getRecord(float alt, int idx);
26     static float data[][4];
27 };
28
29 }; // namespace yasim
30 #endif // _ATMOSPHERE_HPP