]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/heading_indicator_dg.hxx
Performance optimization
[flightgear.git] / src / Instrumentation / heading_indicator_dg.hxx
index 89c22f3b9f0b2c22fd59de9aa4d12dfb8ef298d8..f5035b15934b2515ccfeda4e26a21660f9aa77b9 100644 (file)
@@ -1,64 +1,69 @@
-// heading_indicator.hxx - a vacuum-powered heading indicator.
-// Written by David Megginson, started 2002.
-//
-// This file is in the Public Domain and comes with no warranty.
-
-
-#ifndef __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX
-#define __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX 1
-
-
-#include <simgear/props/props.hxx>
-#include <simgear/structure/subsystem_mgr.hxx>
-
-#include "gyro.hxx"
-
-
-/**
- * Model an electrically-powered heading indicator.
- *
- * Input properties:
- *
- * /instrumentation/"name"/serviceable
- * /instrumentation/"name"/spin
- * /instrumentation/"name"/offset-deg
- * /orientation/heading-deg
- * /systems/electrical/outputs/DG
- *
- * Output properties:
- *
- * /instrumentation/"name"/indicated-heading-deg
- */
-class HeadingIndicatorDG : public SGSubsystem
-{
-
-public:
-
-    HeadingIndicatorDG ( SGPropertyNode *node );
-    HeadingIndicatorDG ();
-    virtual ~HeadingIndicatorDG ();
-
-    virtual void init ();
-    virtual void bind ();
-    virtual void unbind ();
-    virtual void update (double dt);
-
-private:
-
-    Gyro _gyro;
-    double _last_heading_deg;
-
-    string name;
-    int num;
-    //string vacuum_system;
-
-    SGPropertyNode_ptr _offset_node;
-    SGPropertyNode_ptr _heading_in_node;
-    SGPropertyNode_ptr _serviceable_node;
-    SGPropertyNode_ptr _heading_out_node;
-    SGPropertyNode_ptr _electrical_node;
-    SGPropertyNode_ptr _error_node;
-    SGPropertyNode_ptr _nav1_error_node;
-};
-
-#endif // __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX
+// heading_indicator.hxx - a vacuum-powered heading indicator.\r
+// Written by David Megginson, started 2002.\r
+//\r
+// This file is in the Public Domain and comes with no warranty.\r
+\r
+\r
+#ifndef __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX\r
+#define __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX 1\r
+\r
+\r
+#include <simgear/props/props.hxx>\r
+#include <simgear/structure/subsystem_mgr.hxx>\r
+#include <simgear/math/sg_random.h>\r
+\r
+#include "gyro.hxx"\r
+\r
+\r
+/**\r
+ * Model an electrically-powered heading indicator.\r
+ *\r
+ * Input properties:\r
+ *\r
+ * /instrumentation/"name"/serviceable\r
+ * /instrumentation/"name"/spin\r
+ * /instrumentation/"name"/offset-deg\r
+ * /orientation/heading-deg\r
+ * /systems/electrical/outputs/DG\r
+ *\r
+ * Output properties:\r
+ *\r
+ * /instrumentation/"name"/indicated-heading-deg\r
+ */\r
+class HeadingIndicatorDG : public SGSubsystem\r
+{\r
+\r
+public:\r
+\r
+    HeadingIndicatorDG ( SGPropertyNode *node );\r
+    HeadingIndicatorDG ();\r
+    virtual ~HeadingIndicatorDG ();\r
+\r
+    virtual void init ();\r
+    virtual void bind ();\r
+    virtual void unbind ();\r
+    virtual void update (double dt);\r
+\r
+private:\r
+\r
+    Gyro _gyro;\r
+    double _last_heading_deg;\r
+\r
+    std::string name;\r
+    int num;\r
+    //string vacuum_system;\r
+\r
+    SGPropertyNode_ptr _offset_node;\r
+    SGPropertyNode_ptr _heading_in_node;\r
+    SGPropertyNode_ptr _serviceable_node;\r
+    SGPropertyNode_ptr _heading_out_node;\r
+    SGPropertyNode_ptr _electrical_node;\r
+    SGPropertyNode_ptr _error_node;\r
+    SGPropertyNode_ptr _nav1_error_node;\r
+    SGPropertyNode_ptr _align_node;\r
+    SGPropertyNode_ptr _yaw_rate_node;\r
+    SGPropertyNode_ptr _heading_bug_error_node;\r
+    SGPropertyNode_ptr _g_node;\r
+};\r
+\r
+#endif // __INSTRUMENTS_HEADING_INDICATOR_ELEC_HXX\r