]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/turn_indicator.hxx
This is step "1" of probably "many" in the process of separating out the
[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
16 #include <Main/fgfs.hxx>
17
18 #include "gyro.hxx"
19
20
21 /**
22  * Model an electric-powered turn indicator.
23  *
24  * This class does not model the slip/skid ball; that is properly 
25  * a separate instrument.
26  *
27  * Input properties:
28  *
29  * /instrumentation/turn-indicator/serviceable
30  * /instrumentation/turn-indicator/spin
31  * /orientation/roll-rate-degps
32  * /orientation/yaw-rate-degps
33  * /systems/electrical/outputs/turn-coordinator
34  *
35  * Output properties:
36  *
37  * /instrumentation/turn-indicator/indicated-turn-rate
38  */
39 class TurnIndicator : public FGSubsystem
40 {
41
42 public:
43
44     TurnIndicator ();
45     virtual ~TurnIndicator ();
46
47     virtual void init ();
48     virtual void bind ();
49     virtual void unbind ();
50     virtual void update (double dt);
51
52 private:
53
54     Gyro _gyro;
55     double _last_rate;
56
57     SGPropertyNode_ptr _roll_rate_node;
58     SGPropertyNode_ptr _yaw_rate_node;
59     SGPropertyNode_ptr _electric_current_node;
60     SGPropertyNode_ptr _rate_out_node;
61     
62 };
63
64 #endif // __INSTRUMENTS_TURN_INDICATOR_HXX