]> git.mxchange.org Git - flightgear.git/blobdiff - src/Environment/environment_ctrl.hxx
ignore resets for now because every z/Z key press would trigger a call to NOAA. We...
[flightgear.git] / src / Environment / environment_ctrl.hxx
index f9e0d59304a319572bb27e957e0843374d20e689..d22e30641496a8d2abb0dc01fa08f4f16cd517df 100644 (file)
@@ -24,6 +24,8 @@
 #define _ENVIRONMENT_CTRL_HXX
 
 #include <simgear/compiler.h>
+#include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/environment/metar.hxx>
 
 #ifdef SG_HAVE_STD_INCLUDES
 #  include <cmath>
@@ -37,8 +39,6 @@ SG_USING_STD(vector);
 
 class SGPropertyNode;
 
-#include <Main/fgfs.hxx>
-
 #include "environment.hxx"
 
 
@@ -46,7 +46,7 @@ class SGPropertyNode;
 /**
  * Interface to control environment information for a specific location.
  */
-class FGEnvironmentCtrl : public FGSubsystem
+class FGEnvironmentCtrl : public SGSubsystem
 {
 
 public:
@@ -134,4 +134,27 @@ private:
 };
 
 
+\f
+/**
+ * Interplation controller using the SGMetar class
+ */
+class FGMetarEnvironmentCtrl : public FGEnvironmentCtrl
+{
+public:
+    FGMetarEnvironmentCtrl ();
+    virtual ~FGMetarEnvironmentCtrl ();
+
+    virtual void init ();
+    virtual void reinit ();
+    virtual void update (double delta_time_sec);
+
+    virtual void setEnvironment (FGEnvironment * environment);
+
+private:
+    FGInterpolateEnvironmentCtrl *env;
+
+    char *_icao;
+    void fetch_data (const char *icao);
+};
+
 #endif // _ENVIRONMENT_CTRL_HXX