]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/attitude_indicator.hxx
Moved random ground cover object management code (userdata.[ch]xx) over
[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/props/props.hxx>
15
16 #include <Main/fgfs.hxx>
17
18 #include "gyro.hxx"
19
20
21 /**
22  * Model a vacuum-powered attitude indicator.
23  *
24  * This first, simple draft is hard-wired to vacuum pump #1.
25  *
26  * Input properties:
27  *
28  * /instrumentation/attitude-indicator/config/tumble-flag
29  * /instrumentation/attitude-indicator/serviceable
30  * /instrumentation/attitude-indicator/caged-flag
31  * /instrumentation/attitude-indicator/tumble-norm
32  * /orientation/pitch-deg
33  * /orientation/roll-deg
34  * /systems/vacuum[0]/suction-inhg
35  *
36  * Output properties:
37  *
38  * /instrumentation/attitude-indicator/indicated-pitch-deg
39  * /instrumentation/attitude-indicator/indicated-roll-deg
40  * /instrumentation/attitude-indicator/tumble-norm
41  */
42 class AttitudeIndicator : public FGSubsystem
43 {
44
45 public:
46
47     AttitudeIndicator ();
48     virtual ~AttitudeIndicator ();
49
50     virtual void init ();
51     virtual void bind ();
52     virtual void unbind ();
53     virtual void update (double dt);
54
55 private:
56
57     Gyro _gyro;
58
59     SGPropertyNode_ptr _tumble_flag_node;
60     SGPropertyNode_ptr _caged_node;
61     SGPropertyNode_ptr _tumble_node;
62     SGPropertyNode_ptr _pitch_in_node;
63     SGPropertyNode_ptr _roll_in_node;
64     SGPropertyNode_ptr _suction_node;
65     SGPropertyNode_ptr _pitch_int_node;
66     SGPropertyNode_ptr _roll_int_node;
67     SGPropertyNode_ptr _pitch_out_node;
68     SGPropertyNode_ptr _roll_out_node;
69     
70 };
71
72 #endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX