-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Header: FGAtmosphere.h
Author: Jon Berndt
HISTORY
--------------------------------------------------------------------------------
11/24/98 JSB Created
-07/23/99 TP Added implementation of 1959 Standard Atmosphere
- Moved calculation of Mach number to FGTranslation
- Updated to '76 model
-
+07/23/99 TP Added implementation of 1959 Standard Atmosphere
+ Moved calculation of Mach number to FGPropagate
+ Updated to '76 model
-********************************************************************************
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SENTRY
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#ifndef FGAtmosphere_H
#define FGAtmosphere_H
-/*******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
INCLUDES
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
#include "FGModel.h"
-#include "FGMatrix33.h"
#include "FGColumnVector3.h"
-#include "FGColumnVector4.h"
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DEFINITIONS
namespace JSBSim {
/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-COMMENTS, REFERENCES, and NOTES [use "class documentation" below for API docs]
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-[1] Anderson, John D. "Introduction to Flight, Third Edition", McGraw-Hill,
- 1989, ISBN 0-07-001641-0
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DOCUMENTATION
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
/** Models the standard atmosphere.
@author Tony Peden, Jon Berndt
@version $Id$
- @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGAtmosphere.h?rev=HEAD&content-type=text/vnd.viewcvs-markup">
- Header File </a>
- @see <a href="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jsbsim/JSBSim/FGAtmosphere.cpp?rev=HEAD&content-type=text/vnd.viewcvs-markup">
- Source File </a>
+ @see Anderson, John D. "Introduction to Flight, Third Edition", McGraw-Hill,
+ 1989, ISBN 0-07-001641-0
*/
-/******************************************************************************
+/*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
CLASS DECLARATION
-*******************************************************************************/
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/
class FGAtmosphere : public FGModel {
public:
inline double GetDensity(void) const {return *density;}
/// Returns the pressure in psf.
inline double GetPressure(void) const {return *pressure;}
+ /// Returns the pressure at an arbitrary altitude in psf
+ double GetPressure(double alt);
/// Returns the speed of sound in ft/sec.
inline double GetSoundSpeed(void) const {return soundspeed;}
/// Provides the external atmosphere model with an interface to set the pressure.
inline void SetExPressure(double p) { exPressure=p; }
+ /// Sets the temperature deviation at sea-level in degrees Fahrenheit
+ inline void SetSLTempDev(double d) { T_dev_sl = d; }
+ /// Gets the temperature deviation at sea-level in degrees Fahrenheit
+ inline double GetSLTempDev(void) const { return T_dev_sl; }
+ /// Sets the current delta-T in degrees Fahrenheit
+ inline void SetDeltaT(double d) { delta_T = d; }
+ /// Gets the current delta-T in degrees Fahrenheit
+ inline double GetDeltaT(void) const { return delta_T; }
+ /// Gets the at-altitude temperature deviation in degrees Fahrenheit
+ inline double GetTempDev(void) const { return T_dev; }
+ /// Gets the density altitude in feet
+ inline double GetDensityAltitude(void) const { return density_altitude; }
+
/// Sets the wind components in NED frame.
inline void SetWindNED(double wN, double wE, double wD) { vWindNED(1)=wN; vWindNED(2)=wE; vWindNED(3)=wD;}
void unbind(void);
-private:
+protected:
double rho;
enum tType {ttStandard, ttBerndt, ttNone} turbType;
bool useExternal;
double exTemperature,exDensity,exPressure;
double intTemperature, intDensity, intPressure;
+ double T_dev_sl, T_dev, delta_T, density_altitude;
double MagnitudedAccelDt, MagnitudeAccel, Magnitude;
double TurbGain;
} // namespace JSBSim
-/******************************************************************************/
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#endif