1 // attitude_indicator.hxx - a vacuum-powered attitude indicator.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain and comes with no warranty.
7 #ifndef __INSTRUMENTS_MRG_HXX
8 #define __INSTRUMENTS_MRG_HXX 1
11 #include <simgear/props/props.hxx>
12 #include <simgear/structure/subsystem_mgr.hxx>
18 * Model an electrically-powered master reference gyro.
22 * /instrumentation/"name"/config/tumble-flag
23 * /instrumentation/"name"/serviceable
24 * /instrumentation/"name"/caged-flag
25 * /instrumentation/"name"/tumble-norm
26 * /orientation/pitch-deg
27 * /orientation/roll-deg
31 * /instrumentation/"name"/indicated-pitch-deg
32 * /instrumentation/"name"/indicated-roll-deg
33 * /instrumentation/"name"/tumble-norm
36 class MasterReferenceGyro : public SGSubsystem
41 MasterReferenceGyro ( SGPropertyNode *node );
42 MasterReferenceGyro ();
43 virtual ~MasterReferenceGyro ();
47 virtual void unbind ();
48 virtual void update (double dt);
52 static const double gravity; //conversion factor
60 double _indicated_roll;
61 double _indicated_pitch;
62 double _indicated_hdg;
63 double _indicated_pitch_rate;
64 double _indicated_roll_rate;
65 double _indicated_hdg_rate;
66 double _last_roll_rate;
67 double _last_pitch_rate;
68 double _last_yaw_rate;
75 SGPropertyNode_ptr _tumble_flag_node;
76 SGPropertyNode_ptr _caged_node;
77 SGPropertyNode_ptr _off_node;
78 SGPropertyNode_ptr _tumble_node;
79 SGPropertyNode_ptr _pitch_in_node;
80 SGPropertyNode_ptr _roll_in_node;
81 SGPropertyNode_ptr _hdg_in_node;
82 SGPropertyNode_ptr _hdg_mag_in_node;
83 SGPropertyNode_ptr _g_in_node;
84 SGPropertyNode_ptr _electrical_node;
85 SGPropertyNode_ptr _pitch_int_node;
86 SGPropertyNode_ptr _roll_int_node;
87 SGPropertyNode_ptr _hdg_int_node;
88 SGPropertyNode_ptr _pitch_out_node;
89 SGPropertyNode_ptr _roll_out_node;
90 SGPropertyNode_ptr _hdg_out_node;
91 SGPropertyNode_ptr _hdg_mag_out_node;
92 SGPropertyNode_ptr _pitch_rate_out_node;
93 SGPropertyNode_ptr _roll_rate_out_node;
94 SGPropertyNode_ptr _hdg_rate_out_node;
95 SGPropertyNode_ptr _error_out_node;
96 SGPropertyNode_ptr _yaw_rate_node;
97 SGPropertyNode_ptr _roll_rate_node;
98 SGPropertyNode_ptr _pitch_rate_node;
99 SGPropertyNode_ptr _responsiveness_node;
100 SGPropertyNode_ptr _hdg_input_source_node;
101 SGPropertyNode_ptr _fast_erect_node;
104 #endif // __INSTRUMENTS_MRG_HXX