]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/heading_indicator.hxx
6e414c9c4a2af4120b0a6fb5b2a9849e5be76fe7
[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/misc/props.hxx>
15 #include <Main/fgfs.hxx>
16
17
18 /**
19  * Model a vacuum-powered heading indicator.
20  *
21  * This first, simple draft is hard-wired to vacuum pump #1.
22  *
23  * Input properties:
24  *
25  * /instrumentation/heading-indicator/serviceable
26  * /instrumentation/heading-indicator/offset-deg
27  * /orientation/heading-deg
28  * /systems/vacuum[0]/suction-inhg
29  *
30  * Output properties:
31  *
32  * /instrumentation/heading-indicator/indicated-heading-deg
33  */
34 class HeadingIndicator : public FGSubsystem
35 {
36
37 public:
38
39     HeadingIndicator ();
40     virtual ~HeadingIndicator ();
41
42     virtual void init ();
43     virtual void bind ();
44     virtual void unbind ();
45     virtual void update (double dt);
46
47 private:
48
49     double _spin;
50     double _last_heading_deg;
51
52     SGPropertyNode_ptr _serviceable_node;
53     SGPropertyNode_ptr _offset_node;
54     SGPropertyNode_ptr _heading_in_node;
55     SGPropertyNode_ptr _suction_node;
56     SGPropertyNode_ptr _heading_out_node;
57     
58 };
59
60 #endif // __INSTRUMENTS_HEADING_INDICATOR_HXX