![]() |
JSBSim Flight Dynamics Model 1.0 (23 February 2013)
An Open Source Flight Dynamics and Control Software Library in C++
|
Models an empty, abstract base atmosphere class. More...
#include <FGAtmosphere.h>
Inheritance diagram for FGAtmosphere:
Collaboration diagram for FGAtmosphere:Classes | |
| struct | Inputs |
Public Types | |
| enum | ePressure { eNoPressUnit = 0, ePSF, eMillibars, ePascals, eInchesHg } |
Enums for specifying pressure units. | |
| enum | eTemperature { eNoTempUnit = 0, eFahrenheit, eCelsius, eRankine, eKelvin } |
Enums for specifying temperature units. | |
Public Member Functions | |
| FGAtmosphere (FGFDMExec *) | |
| Constructor. | |
| virtual | ~FGAtmosphere () |
| Destructor. | |
| virtual double | GetDensityAltitude () const |
| virtual double | GetPressureAltitude () const |
| bool | InitModel (void) |
| bool | Run (bool Holding) |
| Runs the atmosphere forces model; called by the Executive. | |
Temperature access functions. | |
There are several ways to get the temperature, and several modeled temperature values that can be retrieved. | |
| virtual double | GetTemperature () const |
| Returns the actual, modeled temperature at the current altitude in degrees Rankine. | |
| virtual double | GetTemperature (double altitude) const =0 |
| Returns the actual modeled temperature in degrees Rankine at a specified altitude. | |
| virtual double | GetTemperatureSL () const |
| Returns the actual, modeled sea level temperature in degrees Rankine. | |
| virtual double | GetTemperatureRatio () const |
| Returns the ratio of the at-current-altitude temperature as modeled over the sea level value. | |
| virtual double | GetTemperatureRatio (double h) const |
| Returns the ratio of the temperature as modeled at the supplied altitude over the sea level value. | |
| virtual void | SetTemperatureSL (double t, eTemperature unit=eFahrenheit) |
| Sets the Sea Level temperature. | |
| virtual void | SetTemperature (double t, double h, eTemperature unit=eFahrenheit)=0 |
| Sets the temperature at the supplied altitude. | |
Pressure access functions. | |
| virtual double | GetPressure (void) const |
| Returns the pressure in psf. | |
| virtual double | GetPressure (double altitude) const =0 |
| Returns the pressure at a specified altitude in psf. | |
| virtual double | GetPressureSL (ePressure to=ePSF) const |
| virtual double | GetPressureRatio (void) const |
| Returns the ratio of at-altitude pressure over the sea level value. | |
| virtual void | SetPressureSL (ePressure unit, double pressure) |
| Sets the sea level pressure for modeling. | |
Density access functions. | |
| virtual double | GetDensity (void) const |
| Returns the density in slugs/ft^3. | |
| virtual double | GetDensity (double altitude) const |
| Returns the density in slugs/ft^3 at a given altitude in ft. | |
| virtual double | GetDensitySL (void) const |
| Returns the sea level density in slugs/ft^3. | |
| virtual double | GetDensityRatio (void) const |
| Returns the ratio of at-altitude density over the sea level value. | |
Speed of sound access functions. | |
| virtual double | GetSoundSpeed (void) const |
| Returns the speed of sound in ft/sec. | |
| virtual double | GetSoundSpeedSL (void) const |
| Returns the sea level speed of sound in ft/sec. | |
| virtual double | GetSoundSpeedRatio (void) const |
| Returns the ratio of at-altitude sound speed over the sea level value. | |
Viscosity access functions. | |
| virtual double | GetAbsoluteViscosity (void) const |
| Returns the absolute viscosity. | |
| virtual double | GetKinematicViscosity (void) const |
| Returns the kinematic viscosity. | |
Public Attributes | |
| struct JSBSim::FGAtmosphere::Inputs | in |
Protected Member Functions | |
| virtual void | bind (void) |
| void | Calculate (double altitude) |
| Calculate the atmosphere for the given altitude. | |
| virtual double | ConvertFromPSF (double t, ePressure unit=ePSF) const |
| virtual double | ConvertToPSF (double t, ePressure unit=ePSF) const |
| virtual double | ConvertToRankine (double t, eTemperature unit) const |
| void | Debug (int from) |
Protected Attributes | |
| const double | Beta |
| double | Density |
| double | DensityAltitude |
| double | KinematicViscosity |
| double | Pressure |
| double | PressureAltitude |
| double | rSLdensity |
| double | rSLpressure |
| double | rSLsoundspeed |
| double | rSLtemperature |
| double | SLdensity |
| double | SLpressure |
| double | SLsoundspeed |
| double | SLtemperature |
| double | Soundspeed |
| const double | SutherlandConstant |
| double | Temperature |
| double | Viscosity |
Definition at line 84 of file FGAtmosphere.h.
| virtual double GetDensity | ( | void | ) | const [inline, virtual] |
This function may only be used if Run() is called first.
Definition at line 175 of file FGAtmosphere.h.
Referenced by FGInitialCondition::GetVequivalentKtsIC(), FGOutputSocket::Print(), FGInitialCondition::SetAltitudeASLFtIC(), and FGInitialCondition::SetVequivalentKtsIC().
{return Density;}
Here is the caller graph for this function:| double GetDensity | ( | double | altitude | ) | const [virtual] |
Definition at line 151 of file FGAtmosphere.cpp.
References FGAtmosphere::GetPressure(), and FGAtmosphere::GetTemperature().
{
return GetPressure(altitude)/(Reng * GetTemperature(altitude));
}
Here is the call graph for this function:| virtual double GetTemperature | ( | double | altitude | ) | const [pure virtual] |
| altitude | The altitude above sea level (ASL) in feet. |
Implemented in FGStandardAtmosphere.
| virtual double GetTemperature | ( | ) | const [inline, virtual] |
Definition at line 117 of file FGAtmosphere.h.
Referenced by FGAtmosphere::Calculate(), FGAtmosphere::GetDensity(), FGInitialCondition::GetMachIC(), FGStandardAtmosphere::GetPressure(), FGAtmosphere::GetTemperatureRatio(), FGAtmosphere::GetTemperatureSL(), FGInitialCondition::GetVcalibratedKtsIC(), FGInitialCondition::SetAltitudeASLFtIC(), FGInitialCondition::SetMachIC(), FGStandardAtmosphere::SetTemperature(), and FGInitialCondition::SetVcalibratedKtsIC().
{return Temperature;}
Here is the caller graph for this function:| virtual double GetTemperatureRatio | ( | ) | const [inline, virtual] |
Definition at line 130 of file FGAtmosphere.h.
References FGAtmosphere::GetTemperature().
{ return GetTemperature()*rSLtemperature; }
Here is the call graph for this function:| virtual double GetTemperatureRatio | ( | double | h | ) | const [inline, virtual] |
Definition at line 134 of file FGAtmosphere.h.
References FGAtmosphere::GetTemperature().
{ return GetTemperature(h)*rSLtemperature; }
Here is the call graph for this function:| virtual double GetTemperatureSL | ( | ) | const [inline, virtual] |
Definition at line 126 of file FGAtmosphere.h.
References FGAtmosphere::GetTemperature().
{ return GetTemperature(0.0); }
Here is the call graph for this function:| bool Run | ( | bool | Holding | ) | [virtual] |
Can pass in a value indicating if the executive is directing the simulation to Hold.
| Holding | if true, the executive has been directed to hold the sim from advancing time. Some models may ignore this flag, such as the Input model, which may need to be active to listen on a socket for the "Resume" command to be given. |
Reimplemented from FGModel.
Reimplemented in MSIS.
Definition at line 100 of file FGAtmosphere.cpp.
References FGAtmosphere::Calculate(), and FGModel::Run().
Referenced by FGFDMExec::Initialize(), and FGStandardAtmosphere::PrintStandardAtmosphereTable().
{
if (FGModel::Run(Holding)) return true;
if (Holding) return false;
Calculate(in.altitudeASL);
Debug(2);
return false;
}
Here is the call graph for this function:
Here is the caller graph for this function:| void SetPressureSL | ( | ePressure | unit, |
| double | pressure | ||
| ) | [virtual] |
| pressure | The pressure in the units specified. |
| unit | the unit of measure that the specified pressure is supplied in. |
Reimplemented in FGStandardAtmosphere.
Definition at line 141 of file FGAtmosphere.cpp.
{
double press = ConvertToPSF(pressure, unit);
SLpressure = press;
}
| virtual void SetTemperature | ( | double | t, |
| double | h, | ||
| eTemperature | unit = eFahrenheit |
||
| ) | [pure virtual] |
| t | The temperature value in the unit provided. |
| h | The altitude in feet above sea level. |
| unit | The unit of the temperature. |
Implemented in FGStandardAtmosphere.
| void SetTemperatureSL | ( | double | t, |
| eTemperature | unit = eFahrenheit |
||
| ) | [virtual] |
| t | the temperature value in the unit provided. |
| unit | the unit of the temperature. |
Reimplemented in FGStandardAtmosphere.
Definition at line 161 of file FGAtmosphere.cpp.
{
SLtemperature = ConvertToRankine(t, unit);
}