]> git.mxchange.org Git - flightgear.git/blob - src/FDM/YASim/Atmosphere.hpp
Use SG_LOG for debugging messages from the YASim helicopter model.
[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, float density);
14     static float calcMach(float spd, float temp);
15     static float calcStdDensity(float pressure, float temp);
16
17     static float spdFromMach(float mach, float temp);
18     static float spdFromVCAS(float vcas, float pressure, float temp);
19     
20     // Given ambient ("0") pressure/density/temperature values,
21     // calculate the properties of static air (air accelerated to the
22     // aircraft's speed) at a given velocity.  Includes
23     // compressibility, but not shock effects.
24     static void calcStaticAir(float p0, float t0, float d0, float v,
25                               float* pOut, float* tOut, float* dOut);
26
27 private:
28     static float getRecord(float alt, int idx);
29     static float data[][4];
30 };
31
32 }; // namespace yasim
33 #endif // _ATMOSPHERE_HPP