FGEnvironment::FGEnvironment()
: visibility_m(32000),
+ temperature_sea_level_degc(20),
+ pressure_sea_level_inhg(28),
wind_from_heading_deg(0),
wind_speed_kt(0),
wind_from_north_fps(0),
}
+double
+FGEnvironment::get_visibility_m () const
+{
+ return visibility_m;
+}
+
+double
+FGEnvironment::get_temperature_sea_level_degc () const
+{
+ return temperature_sea_level_degc;
+}
+
+double
+FGEnvironment::get_pressure_sea_level_inhg () const
+{
+ return pressure_sea_level_inhg;
+}
+
+double
+FGEnvironment::get_wind_from_heading_deg () const
+{
+ return wind_from_heading_deg;
+}
+
+double
+FGEnvironment::get_wind_speed_kt () const
+{
+ return wind_speed_kt;
+}
+
+double
+FGEnvironment::get_wind_from_north_fps () const
+{
+ return wind_from_north_fps;
+}
+
+double
+FGEnvironment::get_wind_from_east_fps () const
+{
+ return wind_from_east_fps;
+}
+
+double
+FGEnvironment::get_wind_from_down_fps () const
+{
+ return wind_from_down_fps;
+}
+
+
+
void
FGEnvironment::set_visibility_m (double v)
{
visibility_m = v;
}
+void
+FGEnvironment::set_temperature_sea_level_degc (double t)
+{
+ temperature_sea_level_degc = t;
+}
+
+void
+FGEnvironment::set_pressure_sea_level_inhg (double p)
+{
+ pressure_sea_level_inhg = p;
+}
+
void
FGEnvironment::set_wind_from_heading_deg (double h)
{
FGEnvironment();
virtual ~FGEnvironment();
- inline virtual double get_visibility_m () const { return visibility_m; }
- inline virtual double get_wind_from_heading_deg () const {
- return wind_from_heading_deg;
- }
- inline virtual double get_wind_speed_kt () const { return wind_speed_kt; }
- inline virtual double get_wind_from_north_fps () const {
- return wind_from_north_fps;
- }
- inline virtual double get_wind_from_east_fps () const {
- return wind_from_east_fps;
- }
- inline virtual double get_wind_from_down_fps () const {
- return wind_from_down_fps;
- }
+ virtual double get_visibility_m () const;
+ virtual double get_temperature_sea_level_degc () const;
+ virtual double get_pressure_sea_level_inhg () const;
+ virtual double get_wind_from_heading_deg () const;
+ virtual double get_wind_speed_kt () const;
+ virtual double get_wind_from_north_fps () const;
+ virtual double get_wind_from_east_fps () const;
+ virtual double get_wind_from_down_fps () const;
virtual void set_visibility_m (double v);
+ virtual void set_temperature_sea_level_degc (double t);
+ virtual void set_pressure_sea_level_inhg (double p);
virtual void set_wind_from_heading_deg (double h);
virtual void set_wind_speed_kt (double s);
virtual void set_wind_from_north_fps (double n);
void _recalc_ne ();
double visibility_m;
+ double temperature_sea_level_degc;
+ double pressure_sea_level_inhg;
double wind_from_heading_deg;
double wind_speed_kt;
fgTie("/environment/visibility-m", _environment,
&FGEnvironment::get_visibility_m, &FGEnvironment::set_visibility_m);
fgSetArchivable("/environment/visibility-m");
+ fgTie("/environment/temperature-sea-level-degc", _environment,
+ &FGEnvironment::get_temperature_sea_level_degc,
+ &FGEnvironment::set_temperature_sea_level_degc);
+ fgSetArchivable("/environment/temperature-sea-level-degc");
+ fgTie("/environment/pressure-sea-level-inhg", _environment,
+ &FGEnvironment::get_pressure_sea_level_inhg,
+ &FGEnvironment::set_pressure_sea_level_inhg);
+ fgSetArchivable("/environment/pressure-sea-level-inhg");
fgTie("/environment/wind-from-heading-deg", _environment,
&FGEnvironment::get_wind_from_heading_deg,
&FGEnvironment::set_wind_from_heading_deg);
#include <Cockpit/panel_io.hxx>
#include <GUI/gui.h>
-#ifndef FG_NEW_ENVIRONMENT
-# include <WeatherCM/FGLocalWeatherDatabase.h>
-#else
-# include <Environment/environment.hxx>
-#endif
-
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Environment/environment.hxx>
+# include <Environment/environment_mgr.hxx>
#endif
#include "fg_init.hxx"
// $Id$
+#include <Environment/environment_mgr.hxx>
+
#include "globals.hxx"
#include "fg_props.hxx"
}
}
+const FGEnvironment *
+FGGlobals::get_environment () const
+{
+ return environment_mgr->getEnvironment();
+}
+
+const FGEnvironment *
+FGGlobals::get_environment (double lat, double lon, double alt) const
+{
+ return environment_mgr->getEnvironment(lat, lon, alt);
+}
+
// end of globals.cxx
typedef vector<string> string_list;
-#include <Environment/environment_mgr.hxx>
-
// Forward declarations
class FGEnvironmentMgr;
inline void set_environment_mgr(FGEnvironmentMgr * mgr) {
environment_mgr = mgr;
}
- inline const FGEnvironment * get_environment() const {
- return environment_mgr->getEnvironment();
- }
- inline const FGEnvironment * get_environment(double lat, double lon,
- double alt) const {
- return environment_mgr->getEnvironment(lat, lon, alt);
- }
+ const FGEnvironment * get_environment() const;
+ const FGEnvironment * get_environment(double lat, double lon,
+ double alt) const;
inline FGSoundMgr *get_soundmgr() const { return soundmgr; }
inline void set_soundmgr( FGSoundMgr *sm ) { soundmgr = sm; }
#include <Main/viewer.hxx>
#include <Objects/obj.hxx>
-#ifndef FG_NEW_ENVIRONMENT
-# include <WeatherCM/FGLocalWeatherDatabase.h>
-#else
-# include <Environment/environment.hxx>
-#endif
-
#include "newcache.hxx"
#include "scenery.hxx"
#include "tilemgr.hxx"