]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/altimeter.hxx
Improve gyro heading indicator failure simulation
[flightgear.git] / src / Instrumentation / altimeter.hxx
index 1e4aa12022153d8023e271e5afdfed34b34e2eee..121cafa7ce72b2ea1af6a8c0bc146112b09d8fca 100644 (file)
@@ -1,5 +1,6 @@
 // altimeter.hxx - an altimeter tied to the static port.
 // Written by David Megginson, started 2002.
+// Updated by John Denker to match changes in altimeter.cxx in 2007
 //
 // This file is in the Public Domain and comes with no warranty.
 
@@ -7,15 +8,10 @@
 #ifndef __INSTRUMENTS_ALTIMETER_HXX
 #define __INSTRUMENTS_ALTIMETER_HXX 1
 
-#ifndef __cplusplus
-# error This library requires C++
-#endif
-
 #include <simgear/props/props.hxx>
+#include <simgear/props/tiedpropertylist.hxx>
 #include <simgear/structure/subsystem_mgr.hxx>
-
-
-class SGInterpTable;
+#include <Environment/atmosphere.hxx>
 
 
 /**
@@ -36,25 +32,38 @@ class Altimeter : public SGSubsystem
 
 public:
 
-    Altimeter (SGPropertyNode *node);
+    Altimeter (SGPropertyNode *node, double quantum = 0);
     virtual ~Altimeter ();
 
     virtual void init ();
+    virtual void reinit ();
     virtual void update (double dt);
+    virtual void bind();
+    virtual void unbind();
 
-private:
+    double getSettingInHg() const;
+    void setSettingInHg( double value );
+    double getSettingHPa() const;
+    void setSettingHPa( double value );
 
-    string _name;
-    int _num;
+private:
+    SGPropertyNode_ptr _rootNode;
     string _static_pressure;
+    double _tau;
+    double _quantum;
+    double _kollsman;
+    double _raw_PA;
+    double _settingInHg;
 
     SGPropertyNode_ptr _serviceable_node;
-    SGPropertyNode_ptr _setting_node;
     SGPropertyNode_ptr _pressure_node;
+    SGPropertyNode_ptr _press_alt_node;
+    SGPropertyNode_ptr _mode_c_node;
     SGPropertyNode_ptr _altitude_node;
 
-    SGInterpTable * _altitude_table;
-    
+    FGAltimeter _altimeter;
+
+    simgear::TiedPropertyList _tiedProperties;
 };
 
 #endif // __INSTRUMENTS_ALTIMETER_HXX