- virtual double GetPressureRatio(void) const { return (*pressure)*rSLpressure; }
- /// Returns the ratio of at-altitude sound speed over the sea level value.
- virtual double GetSoundSpeedRatio(void) const { return soundspeed*rSLsoundspeed; }
-
- /// Tells the simulator to use an externally calculated atmosphere model.
- virtual void UseExternal(void);
- /// Tells the simulator to use the internal atmosphere model.
- virtual void UseInternal(void); //this is the default
- /// Gets the boolean that tells if the external atmosphere model is being used.
- virtual bool External(void) { return useExternal; }
-
- /// Provides the external atmosphere model with an interface to set the temperature.
- virtual void SetExTemperature(double t) { exTemperature=t; }
- /// Provides the external atmosphere model with an interface to set the density.
- virtual void SetExDensity(double d) { exDensity=d; }
- /// Provides the external atmosphere model with an interface to set the pressure.
- virtual void SetExPressure(double p) { exPressure=p; }
-
- /// Sets the temperature deviation at sea-level in degrees Fahrenheit
- virtual void SetSLTempDev(double d) { T_dev_sl = d; }
- /// Gets the temperature deviation at sea-level in degrees Fahrenheit
- virtual double GetSLTempDev(void) const { return T_dev_sl; }
- /// Sets the current delta-T in degrees Fahrenheit
- virtual void SetDeltaT(double d) { delta_T = d; }
- /// Gets the current delta-T in degrees Fahrenheit
- virtual double GetDeltaT(void) const { return delta_T; }
- /// Gets the at-altitude temperature deviation in degrees Fahrenheit
- virtual double GetTempDev(void) const { return T_dev; }
- /// Gets the density altitude in feet
- virtual double GetDensityAltitude(void) const { return density_altitude; }
-
- // TOTAL WIND access functions (wind + gust + turbulence)
-
- /// Retrieves the total wind components in NED frame.
- virtual const FGColumnVector3& GetTotalWindNED(void) const { return vTotalWindNED; }
-
- /// Retrieves a total wind component in NED frame.
- virtual double GetTotalWindNED(int idx) const {return vTotalWindNED(idx);}
-
- // WIND access functions
-
- /// Sets the wind components in NED frame.
- virtual void SetWindNED(double wN, double wE, double wD) { vWindNED(1)=wN; vWindNED(2)=wE; vWindNED(3)=wD;}
-
- /// Sets a wind component in NED frame.
- virtual void SetWindNED(int idx, double wind) { vWindNED(idx)=wind;}
-
- /// Retrieves the wind components in NED frame.
- virtual FGColumnVector3& GetWindNED(void) { return vWindNED; }
-
- /// Retrieves a wind component in NED frame.
- virtual double GetWindNED(int idx) const {return vWindNED(idx);}
-
- /** Retrieves the direction that the wind is coming from.
- The direction is defined as north=0 and increases counterclockwise.
- The wind heading is returned in radians.*/
- virtual double GetWindPsi(void) const { return psiw; }
-
- /** Sets the direction that the wind is coming from.
- The direction is defined as north=0 and increases counterclockwise to 2*pi (radians). The
- vertical component of wind is assumed to be zero - and is forcibly set to zero. This function
- sets the vWindNED vector components based on the supplied direction. The magnitude of
- the wind set in the vector is preserved (assuming the vertical component is non-zero).
- @param dir wind direction in the horizontal plane, in radians.*/
- virtual void SetWindPsi(double dir);
+ virtual double GetPressureRatio(void) const { return Pressure*rSLpressure; }
+
+ /** Sets the sea level pressure for modeling.
+ @param pressure The pressure in the units specified.
+ @param unit the unit of measure that the specified pressure is
+ supplied in.*/
+ virtual void SetPressureSL(ePressure unit, double pressure);
+ //@}
+
+ // *************************************************************************
+ /// @name Density access functions.
+ //@{
+ /** Returns the density in slugs/ft^3.
+ This function may only be used if Run() is called first. */
+ virtual double GetDensity(void) const {return Density;}