f614545fc5
Instrumentation and systems are now configureable from xml files. The two generic configurations generic-systems.xml and generic-instrumentation.xml configures the systems and instrumentation as it was hardcoded. You can override the generic configurations in a similar way as you override the autopilot configuration.
67 lines
1.4 KiB
C++
67 lines
1.4 KiB
C++
// turn_indicator.hxx - an electric-powered turn indicator.
|
|
// Written by David Megginson, started 2003.
|
|
//
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
#ifndef __INSTRUMENTS_TURN_INDICATOR_HXX
|
|
#define __INSTRUMENTS_TURN_INDICATOR_HXX 1
|
|
|
|
#ifndef __cplusplus
|
|
# error This library requires C++
|
|
#endif
|
|
|
|
#include <simgear/props/props.hxx>
|
|
#include <simgear/structure/subsystem_mgr.hxx>
|
|
|
|
#include "gyro.hxx"
|
|
|
|
|
|
/**
|
|
* Model an electric-powered turn indicator.
|
|
*
|
|
* This class does not model the slip/skid ball; that is properly
|
|
* a separate instrument.
|
|
*
|
|
* Input properties:
|
|
*
|
|
* /instrumentation/"name"/serviceable
|
|
* /instrumentation/"name"/spin
|
|
* /orientation/roll-rate-degps
|
|
* /orientation/yaw-rate-degps
|
|
* /systems/electrical/outputs/turn-coordinator
|
|
*
|
|
* Output properties:
|
|
*
|
|
* /instrumentation/"name"/indicated-turn-rate
|
|
*/
|
|
class TurnIndicator : public SGSubsystem
|
|
{
|
|
|
|
public:
|
|
|
|
TurnIndicator ( SGPropertyNode *node );
|
|
TurnIndicator ();
|
|
virtual ~TurnIndicator ();
|
|
|
|
virtual void init ();
|
|
virtual void bind ();
|
|
virtual void unbind ();
|
|
virtual void update (double dt);
|
|
|
|
private:
|
|
|
|
Gyro _gyro;
|
|
double _last_rate;
|
|
|
|
string name;
|
|
int num;
|
|
|
|
SGPropertyNode_ptr _roll_rate_node;
|
|
SGPropertyNode_ptr _yaw_rate_node;
|
|
SGPropertyNode_ptr _electric_current_node;
|
|
SGPropertyNode_ptr _rate_out_node;
|
|
|
|
};
|
|
|
|
#endif // __INSTRUMENTS_TURN_INDICATOR_HXX
|