]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/turn_indicator.hxx
fix NAV receiver vs GPS bugs
[flightgear.git] / src / Instrumentation / turn_indicator.hxx
1 // turn_indicator.hxx - an electric-powered turn indicator.
2 // Written by David Megginson, started 2003.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_TURN_INDICATOR_HXX
8 #define __INSTRUMENTS_TURN_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 an electric-powered turn indicator.
22  *
23  * This class does not model the slip/skid ball; that is properly 
24  * a separate instrument.
25  *
26  * Input properties:
27  *
28  * /instrumentation/"name"/serviceable
29  * /instrumentation/"name"/spin
30  * /orientation/roll-rate-degps
31  * /orientation/yaw-rate-degps
32  * /systems/electrical/outputs/turn-coordinator
33  *
34  * Output properties:
35  *
36  * /instrumentation/"name"/indicated-turn-rate
37  */
38 class TurnIndicator : public SGSubsystem
39 {
40
41 public:
42
43     TurnIndicator ( SGPropertyNode *node );
44     virtual ~TurnIndicator ();
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     double _last_rate;
55
56     string _name;
57     int _num;
58
59     SGPropertyNode_ptr _roll_rate_node;
60     SGPropertyNode_ptr _yaw_rate_node;
61     SGPropertyNode_ptr _electric_current_node;
62     SGPropertyNode_ptr _rate_out_node;
63     
64 };
65
66 #endif // __INSTRUMENTS_TURN_INDICATOR_HXX