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