34 #ifndef FGATMOSPHERE_H 35 #define FGATMOSPHERE_H 42 #include "models/FGModel.h" 48 #define ID_ATMOSPHERE "$Id: FGAtmosphere.h,v 1.32 2016/01/10 15:56:30 bcoconni Exp $" 88 enum eTemperature {eNoTempUnit=0, eFahrenheit, eCelsius, eRankine, eKelvin};
91 enum ePressure {eNoPressUnit=0, ePSF, eMillibars, ePascals, eInchesHg};
106 bool Run(
bool Holding);
108 bool InitModel(
void);
151 virtual double GetPressure(
void)
const {
return Pressure;}
155 virtual double GetPressure(
double altitude)
const = 0;
158 virtual double GetPressureSL(
ePressure to=ePSF)
const {
return ConvertFromPSF(SLpressure, to); }
178 virtual double GetDensity(
double altitude)
const;
190 virtual double GetSoundSpeed(
void)
const {
return Soundspeed;}
213 virtual double GetDensityAltitude()
const {
return DensityAltitude;}
215 virtual double GetPressureAltitude()
const {
return PressureAltitude;}
222 double SLtemperature, SLdensity, SLpressure, SLsoundspeed;
223 double Temperature, Density, Pressure, Soundspeed;
224 double rSLtemperature, rSLdensity, rSLpressure, rSLsoundspeed;
226 double PressureAltitude;
227 double DensityAltitude;
229 const double SutherlandConstant, Beta;
230 double Viscosity, KinematicViscosity;
236 virtual double ConvertToRankine(
double t,
eTemperature unit)
const;
239 virtual double ConvertToPSF(
double t,
ePressure unit=ePSF)
const;
242 virtual double ConvertFromPSF(
double t,
ePressure unit=ePSF)
const;
244 virtual void bind(
void);
245 void Debug(
int from);
virtual void SetPressureSL(ePressure unit, double pressure)
Sets the sea level pressure for modeling.
virtual void SetTemperatureSL(double t, eTemperature unit=eFahrenheit)
Sets the Sea Level temperature.
void Calculate(double altitude)
Calculate the atmosphere for the given altitude.
virtual double GetSoundSpeedSL(void) const
Returns the sea level speed of sound in ft/sec.
ePressure
Enums for specifying pressure units.
virtual double GetPressure(void) const
Returns the pressure in psf.
virtual double GetAbsoluteViscosity(void) const
Returns the absolute viscosity.
virtual ~FGAtmosphere()
Destructor.
virtual double GetPressureRatio(void) const
Returns the ratio of at-altitude pressure over the sea level value.
virtual double GetDensitySL(void) const
Returns the sea level density in slugs/ft^3.
virtual double GetSoundSpeed(void) const
Returns the speed of sound in ft/sec.
virtual double GetTemperatureRatio(double h) const
Returns the ratio of the temperature as modeled at the supplied altitude over the sea level value...
Base class for all scheduled JSBSim models.
virtual double GetTemperatureSL() const
Returns the actual, modeled sea level temperature in degrees Rankine.
bool Run(bool Holding)
Runs the atmosphere forces model; called by the Executive.
Models an empty, abstract base atmosphere class.
virtual double GetDensity(void) const
Returns the density in slugs/ft^3.
FGAtmosphere(FGFDMExec *)
Constructor.
eTemperature
Enums for specifying temperature units.
virtual double GetSoundSpeedRatio(void) const
Returns the ratio of at-altitude sound speed over the sea level value.
virtual void SetTemperature(double t, double h, eTemperature unit=eFahrenheit)=0
Sets the temperature at the supplied altitude.
Encapsulates the JSBSim simulation executive.
virtual double GetDensityRatio(void) const
Returns the ratio of at-altitude density over the sea level value.
virtual double GetTemperatureRatio() const
Returns the ratio of the at-current-altitude temperature as modeled over the sea level value...
virtual double GetTemperature() const
Returns the actual, modeled temperature at the current altitude in degrees Rankine.
virtual double GetKinematicViscosity(void) const
Returns the kinematic viscosity.