]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/vertical_speed_indicator.hxx
httpd: better handling of first-time notifications
[flightgear.git] / src / Instrumentation / vertical_speed_indicator.hxx
index 876fc5ef4e819d5235b84cf2b94ac299b06b275a..7c16f27d2d124e62904c228e9ed4151f6492f0ec 100644 (file)
@@ -1,6 +1,8 @@
 // vertical_speed_indicator.hxx - a regular VSI tied to the static port.
 // Written by David Megginson, started 2002.
 //
+// Last change by E. van den Berg, 17.02.1013
+//
 // This file is in the Public Domain and comes with no warranty.
 
 
@@ -11,8 +13,8 @@
 # error This library requires C++
 #endif
 
-#include <simgear/misc/props.hxx>
-#include <Main/fgfs.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/structure/subsystem_mgr.hxx>
 
 
 /**
  *
  * Input properties:
  *
- * /instrumentation/vertical-speed-indicator/serviceable
- * /systems/static[0]/pressure-inhg
+ * /instrumentation/"name"/serviceable
+ * "static_port"/pressure-inhg
  *
  * Output properties:
  *
- * /instrumentation/vertical-speed-indicator/indicated-speed-fpm
+ * /instrumentation/"name"/indicated-speed-fpm
+ * /instrumentation/"name"/indicated-speed-mps
+ * /instrumentation/"name"/indicated-speed-kts
  */
-class VerticalSpeedIndicator : public FGSubsystem
+class VerticalSpeedIndicator : public SGSubsystem
 {
 
 public:
 
-    VerticalSpeedIndicator ();
+    VerticalSpeedIndicator ( SGPropertyNode *node );
     virtual ~VerticalSpeedIndicator ();
 
     virtual void init ();
+    virtual void reinit ();
     virtual void update (double dt);
 
 private:
 
-    double _internal_pressure_inhg;
+    double _casing_pressure_Pa;
+    double _casing_airmass_kg;
+    double _casing_density_kgpm3;
+    double _orifice_massflow_kgps;
+
+    std::string _name;
+    int _num;
+    std::string _static_pressure;
+    std::string _static_temperature;
 
     SGPropertyNode_ptr _serviceable_node;
     SGPropertyNode_ptr _pressure_node;
-    SGPropertyNode_ptr _speed_node;
+    SGPropertyNode_ptr _temperature_node;
+    SGPropertyNode_ptr _speed_fpm_node;
+    SGPropertyNode_ptr _speed_mps_node;
+    SGPropertyNode_ptr _speed_kts_node;
+    SGPropertyNode_ptr _speed_up_node;
     
 };