]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/attitude_indicator.hxx
gsdi correction, wind correction is not needed anymore, as wind composant was removed...
[flightgear.git] / src / Instrumentation / attitude_indicator.hxx
index b75ccd317822d49ec138e30527899b21b305ac54..14453511d21e651b3ee5a57dd0f6a62869087051 100644 (file)
@@ -11,8 +11,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>
 
 #include "gyro.hxx"
 
 /**
  * Model a vacuum-powered attitude indicator.
  *
- * This first, simple draft is hard-wired to vacuum pump #1.
- *
  * Input properties:
  *
- * /instrumentation/attitude-indicator/config/tumble-flag
- * /instrumentation/attitude-indicator/serviceable
+ * /instrumentation/"name"/config/tumble-flag
+ * /instrumentation/"name"/serviceable
+ * /instrumentation/"name"/caged-flag
+ * /instrumentation/"name"/tumble-norm
  * /orientation/pitch-deg
  * /orientation/roll-deg
- * /systems/vacuum[0]/suction-inhg
+ * "vacuum-system"/suction-inhg
  *
  * Output properties:
  *
- * /instrumentation/attitude-indicator/indicated-pitch-deg
- * /instrumentation/attitude-indicator/indicated-roll-deg
+ * /instrumentation/"name"/indicated-pitch-deg
+ * /instrumentation/"name"/indicated-roll-deg
+ * /instrumentation/"name"/tumble-norm
  */
-class AttitudeIndicator : public FGSubsystem
+class AttitudeIndicator : public SGSubsystem
 {
 
 public:
 
-    AttitudeIndicator ();
+    AttitudeIndicator ( SGPropertyNode *node );
     virtual ~AttitudeIndicator ();
 
     virtual void init ();
+    virtual void reinit ();
     virtual void bind ();
     virtual void unbind ();
     virtual void update (double dt);
 
 private:
 
-    Gyro _gyro;
+    std::string _name;
+    int _num;
+    std::string _suction;
 
-    double _tumble;
+    Gyro _gyro;
 
     SGPropertyNode_ptr _tumble_flag_node;
+    SGPropertyNode_ptr _caged_node;
+    SGPropertyNode_ptr _tumble_node;
     SGPropertyNode_ptr _pitch_in_node;
     SGPropertyNode_ptr _roll_in_node;
     SGPropertyNode_ptr _suction_node;
+    SGPropertyNode_ptr _pitch_int_node;
+    SGPropertyNode_ptr _roll_int_node;
     SGPropertyNode_ptr _pitch_out_node;
     SGPropertyNode_ptr _roll_out_node;
     
+    double spin_thresh;
+    double max_roll_error;
+    double max_pitch_error;
 };
 
 #endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX