]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/attitude_indicator.hxx
b75ccd317822d49ec138e30527899b21b305ac54
[flightgear.git] / src / Instrumentation / attitude_indicator.hxx
1 // attitude_indicator.hxx - a vacuum-powered attitude 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_ATTITUDE_INDICATOR_HXX
8 #define __INSTRUMENTS_ATTITUDE_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 #include "gyro.hxx"
18
19
20 /**
21  * Model a vacuum-powered attitude indicator.
22  *
23  * This first, simple draft is hard-wired to vacuum pump #1.
24  *
25  * Input properties:
26  *
27  * /instrumentation/attitude-indicator/config/tumble-flag
28  * /instrumentation/attitude-indicator/serviceable
29  * /orientation/pitch-deg
30  * /orientation/roll-deg
31  * /systems/vacuum[0]/suction-inhg
32  *
33  * Output properties:
34  *
35  * /instrumentation/attitude-indicator/indicated-pitch-deg
36  * /instrumentation/attitude-indicator/indicated-roll-deg
37  */
38 class AttitudeIndicator : public FGSubsystem
39 {
40
41 public:
42
43     AttitudeIndicator ();
44     virtual ~AttitudeIndicator ();
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
55     double _tumble;
56
57     SGPropertyNode_ptr _tumble_flag_node;
58     SGPropertyNode_ptr _pitch_in_node;
59     SGPropertyNode_ptr _roll_in_node;
60     SGPropertyNode_ptr _suction_node;
61     SGPropertyNode_ptr _pitch_out_node;
62     SGPropertyNode_ptr _roll_out_node;
63     
64 };
65
66 #endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX