]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/environment.hxx
Don't restore initial screen geometry because there is nothing in fg_os* to resize...
[flightgear.git] / src / Environment / environment.hxx
index 264072d653e66a1cc9c17e260d048b0be22e07c8..11eccd91b9dac4485bfdbfc5fd41abd3f38d6e0d 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 
 #include <simgear/compiler.h>
 
-#include <Main/fgfs.hxx>
-
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <cmath>
 #else
 #  include <math.h>
 #endif
 
-class SGInterpTable;
-
 
 /**
  * Model the natural environment.
@@ -53,11 +49,16 @@ public:
   FGEnvironment();
   FGEnvironment (const FGEnvironment &environment);
   virtual ~FGEnvironment();
+
+  virtual void copy (const FGEnvironment &environment);
+
+  virtual void read (const SGPropertyNode * node);
   
   virtual double get_visibility_m () const;
 
   virtual double get_temperature_sea_level_degc () const;
   virtual double get_temperature_degc () const;
+  virtual double get_temperature_degf () const;
   virtual double get_dewpoint_sea_level_degc () const;
   virtual double get_dewpoint_degc () const;
   virtual double get_pressure_sea_level_inhg () const;
@@ -70,6 +71,9 @@ public:
   virtual double get_wind_from_east_fps () const;
   virtual double get_wind_from_down_fps () const;
 
+  virtual double get_turbulence_magnitude_norm () const;
+  virtual double get_turbulence_rate_hz () const;
+
   virtual void set_visibility_m (double v);
 
   virtual void set_temperature_sea_level_degc (double t);
@@ -85,17 +89,14 @@ public:
   virtual void set_wind_from_east_fps (double e);
   virtual void set_wind_from_down_fps (double d);
 
-protected:
-
-  friend class FGEnvironmentMgr;
+  virtual void set_turbulence_magnitude_norm (double t);
+  virtual void set_turbulence_rate_hz (double t);
 
   virtual double get_elevation_ft () const;
   virtual void set_elevation_ft (double elevation_ft);
 
 private:
 
-  void _setup_tables ();
-
   void _recalc_hdgspd ();
   void _recalc_ne ();
 
@@ -107,9 +108,6 @@ private:
   void _recalc_alt_pressure ();
   void _recalc_density ();
 
-  SGInterpTable * _temperature_degc_table;
-  SGInterpTable * _pressure_inhg_table;
-
   double elevation_ft;
 
   double visibility_m;
@@ -123,6 +121,9 @@ private:
   double pressure_inhg;
   double density_slugft3;
 
+  double turbulence_magnitude_norm;
+  double turbulence_rate_hz;
+
   double wind_from_heading_deg;
   double wind_speed_kt;
 
@@ -132,4 +133,7 @@ private:
 
 };
 
+void interpolate (const FGEnvironment * env1, const FGEnvironment * env2,
+                  double fraction, FGEnvironment * result);
+
 #endif // _ENVIRONMENT_HXX