2001-12-01 06:22:24 +00:00
|
|
|
#ifndef _ATMOSPHERE_HPP
|
|
|
|
#define _ATMOSPHERE_HPP
|
|
|
|
|
|
|
|
namespace yasim {
|
|
|
|
|
|
|
|
class Atmosphere {
|
|
|
|
public:
|
|
|
|
static float getStdTemperature(float alt);
|
|
|
|
static float getStdPressure(float alt);
|
|
|
|
static float getStdDensity(float alt);
|
|
|
|
|
|
|
|
static float calcVCAS(float spd, float pressure, float temp);
|
2002-06-10 08:47:29 +00:00
|
|
|
static float calcVEAS(float spd, float pressure, float temp, float density);
|
2001-12-01 06:22:24 +00:00
|
|
|
static float calcMach(float spd, float temp);
|
2002-06-10 08:47:29 +00:00
|
|
|
static float calcStdDensity(float pressure, float temp);
|
2003-03-02 01:43:39 +00:00
|
|
|
|
|
|
|
static float spdFromMach(float mach, float temp);
|
|
|
|
static float spdFromVCAS(float vcas, float pressure, float temp);
|
2001-12-24 13:54:03 +00:00
|
|
|
|
|
|
|
// Given ambient ("0") pressure/density/temperature values,
|
|
|
|
// calculate the properties of static air (air accelerated to the
|
|
|
|
// aircraft's speed) at a given velocity. Includes
|
|
|
|
// compressibility, but not shock effects.
|
|
|
|
static void calcStaticAir(float p0, float t0, float d0, float v,
|
|
|
|
float* pOut, float* tOut, float* dOut);
|
2001-12-01 06:22:24 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
static float getRecord(float alt, int idx);
|
|
|
|
static float data[][4];
|
|
|
|
};
|
|
|
|
|
|
|
|
}; // namespace yasim
|
|
|
|
#endif // _ATMOSPHERE_HPP
|