64 Name =
"FGAtmosphere";
97 if (Holding)
return false;
175 targetTemp = t + 459.67;
178 targetTemp = (t + 273.15) * 1.8;
201 targetTemp = t - 459.67;
204 targetTemp = t/1.8 - 273.15;
223 double targetPressure=0;
230 targetPressure =
p*2.08854342;
233 targetPressure =
p*0.0208854342;
236 targetPressure =
p*70.7180803;
239 throw(
"Undefined pressure unit given");
242 return targetPressure;
247 double targetPressure=0;
254 targetPressure =
p/2.08854342;
257 targetPressure =
p/0.0208854342;
260 targetPressure =
p/70.7180803;
263 throw(
"Undefined pressure unit given");
266 return targetPressure;
316 if (from == 0) std::cout <<
"Instantiated: FGAtmosphere" << std::endl;
317 if (from == 1) std::cout <<
"Destroyed: FGAtmosphere" << std::endl;
static const double StdDaySLsoundspeed
bool Run(bool Holding) override
Runs the atmosphere forces model; called by the Executive.
struct JSBSim::FGAtmosphere::Inputs in
eTemperature
Enums for specifying temperature units.
double ConvertToPSF(double t, ePressure unit=ePSF) const
Converts to PSF (pounds per square foot) from one of several unit systems.
void Debug(int from) override
virtual void SetTemperatureSL(double t, eTemperature unit=eFahrenheit)
Sets the Sea Level temperature.
virtual double GetSoundSpeed(void) const
Returns the speed of sound in ft/sec.
bool InitModel(void) override
virtual double CalculatePressureAltitude(double pressure, double geometricAlt)
Calculates the pressure altitude given any temperature or pressure bias.
virtual double GetDensityRatio(void) const
Returns the ratio of at-altitude density over the sea level value.
FGAtmosphere(FGFDMExec *)
Constructor.
virtual void SetPressureSL(ePressure unit, double pressure)
Sets the sea level pressure for modeling.
double ConvertFromRankine(double t, eTemperature unit) const
Converts from Rankine to one of several unit systems.
virtual ~FGAtmosphere()
Destructor.
virtual double GetDensityAltitude() const
virtual double GetDensitySL(void) const
Returns the sea level density in slugs/ft^3.
virtual double GetTemperatureSL() const
Returns the actual, modeled sea level temperature in degrees Rankine.
double KinematicViscosity
virtual double GetTemperatureRatio() const
Returns the ratio of the at-current-altitude temperature as modeled over the sea level value.
static double Reng
Specific gas constant for air - ft*lbf/slug/R.
static constexpr double SutherlandConstant
virtual double GetTemperature() const
Returns the actual, modeled temperature at the current altitude in degrees Rankine.
double ConvertToRankine(double t, eTemperature unit) const
Converts to Rankine from one of several unit systems.
virtual double GetDensity(void) const
Returns the density in slugs/ft^3.
virtual double GetPressureRatio(void) const
Returns the ratio of at-altitude pressure over the sea level value.
double ConvertFromPSF(double t, ePressure unit=ePSF) const
Converts from PSF (pounds per square foot) to one of several unit systems.
virtual double GetPressure(void) const
Returns the pressure in psf.
static constexpr double StdDaySLpressure
static constexpr double StdDaySLtemperature
virtual double GetSoundSpeedSL(void) const
Returns the sea level speed of sound in ft/sec.
virtual void Calculate(double altitude)
Calculate the atmosphere for the given altitude.
ePressure
Enums for specifying pressure units.
virtual double CalculateDensityAltitude(double density, double geometricAlt)
Calculates the density altitude given any temperature or pressure bias.
static constexpr double SHRatio
virtual double GetSoundSpeedRatio(void) const
Returns the ratio of at-altitude sound speed over the sea level value.
static constexpr double Beta
virtual double GetPressureAltitude() const
FGPropertyManager * PropertyManager
bool InitModel(void) override
FGModel(FGFDMExec *)
Constructor.
virtual bool Run(bool Holding)
Runs the model; called by the Executive.
Class wrapper for property handling.
double GetDouble(const std::string &name, double defaultValue=0.0) const
Get a double value for a property.