]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/attitude_indicator.hxx
ignore resets for now because every z/Z key press would trigger a call to NOAA. We...
[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 #include <simgear/structure/subsystem_mgr.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  * /instrumentation/attitude-indicator/caged-flag
30  * /instrumentation/attitude-indicator/tumble-norm
31  * /orientation/pitch-deg
32  * /orientation/roll-deg
33  * /systems/vacuum[0]/suction-inhg
34  *
35  * Output properties:
36  *
37  * /instrumentation/attitude-indicator/indicated-pitch-deg
38  * /instrumentation/attitude-indicator/indicated-roll-deg
39  * /instrumentation/attitude-indicator/tumble-norm
40  */
41 class AttitudeIndicator : public SGSubsystem
42 {
43
44 public:
45
46     AttitudeIndicator ();
47     virtual ~AttitudeIndicator ();
48
49     virtual void init ();
50     virtual void bind ();
51     virtual void unbind ();
52     virtual void update (double dt);
53
54 private:
55
56     Gyro _gyro;
57
58     SGPropertyNode_ptr _tumble_flag_node;
59     SGPropertyNode_ptr _caged_node;
60     SGPropertyNode_ptr _tumble_node;
61     SGPropertyNode_ptr _pitch_in_node;
62     SGPropertyNode_ptr _roll_in_node;
63     SGPropertyNode_ptr _suction_node;
64     SGPropertyNode_ptr _pitch_int_node;
65     SGPropertyNode_ptr _roll_int_node;
66     SGPropertyNode_ptr _pitch_out_node;
67     SGPropertyNode_ptr _roll_out_node;
68     
69 };
70
71 #endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX