]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/attitude_indicator.hxx
#346 related: missing status message for property server
[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  * Input properties:
24  *
25  * /instrumentation/"name"/config/tumble-flag
26  * /instrumentation/"name"/serviceable
27  * /instrumentation/"name"/caged-flag
28  * /instrumentation/"name"/tumble-norm
29  * /orientation/pitch-deg
30  * /orientation/roll-deg
31  * "vacuum-system"/suction-inhg
32  *
33  * Output properties:
34  *
35  * /instrumentation/"name"/indicated-pitch-deg
36  * /instrumentation/"name"/indicated-roll-deg
37  * /instrumentation/"name"/tumble-norm
38  */
39 class AttitudeIndicator : public SGSubsystem
40 {
41
42 public:
43
44     AttitudeIndicator ( SGPropertyNode *node );
45     virtual ~AttitudeIndicator ();
46
47     virtual void init ();
48     virtual void bind ();
49     virtual void unbind ();
50     virtual void update (double dt);
51
52 private:
53
54     string _name;
55     int _num;
56     string _suction;
57
58     Gyro _gyro;
59
60     SGPropertyNode_ptr _tumble_flag_node;
61     SGPropertyNode_ptr _caged_node;
62     SGPropertyNode_ptr _tumble_node;
63     SGPropertyNode_ptr _pitch_in_node;
64     SGPropertyNode_ptr _roll_in_node;
65     SGPropertyNode_ptr _suction_node;
66     SGPropertyNode_ptr _pitch_int_node;
67     SGPropertyNode_ptr _roll_int_node;
68     SGPropertyNode_ptr _pitch_out_node;
69     SGPropertyNode_ptr _roll_out_node;
70     
71     double spin_thresh;
72     double max_roll_error;
73     double max_pitch_error;
74 };
75
76 #endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX