]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/heading_indicator.hxx
#346 related: missing status message for property server
[flightgear.git] / src / Instrumentation / heading_indicator.hxx
1 // heading_indicator.hxx - a vacuum-powered heading indicator.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_HEADING_INDICATOR_HXX
8 #define __INSTRUMENTS_HEADING_INDICATOR_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/props/props.hxx>
15 #include <simgear/structure/subsystem_mgr.hxx>
16
17 #include "gyro.hxx"
18
19
20 /**
21  * Model a vacuum-powered heading indicator.
22  *
23  * Input properties:
24  *
25  * /instrumentation/"name"/serviceable
26  * /instrumentation/"name"/spin
27  * /instrumentation/"name"/offset-deg
28  * /orientation/heading-deg
29  * "vacuum_system"/suction-inhg
30  *
31  * Output properties:
32  *
33  * /instrumentation/"name"/indicated-heading-deg
34  */
35 class HeadingIndicator : public SGSubsystem
36 {
37
38 public:
39
40     HeadingIndicator ( SGPropertyNode *node );
41     HeadingIndicator ();
42     virtual ~HeadingIndicator ();
43
44     virtual void init ();
45     virtual void bind ();
46     virtual void unbind ();
47     virtual void update (double dt);
48
49 private:
50
51     Gyro _gyro;
52     double _last_heading_deg;
53
54     string _name;
55     int _num;
56     string _suction;
57
58     SGPropertyNode_ptr _offset_node;
59     SGPropertyNode_ptr _heading_in_node;
60     SGPropertyNode_ptr _suction_node;
61     SGPropertyNode_ptr _heading_out_node;
62     SGPropertyNode_ptr _heading_bug_error_node;
63     SGPropertyNode_ptr _heading_bug_node;
64
65 };
66
67 #endif // __INSTRUMENTS_HEADING_INDICATOR_HXX