2002-09-24 14:51:37 +00:00
|
|
|
// attitude_indicator.hxx - a vacuum-powered attitude indicator.
|
|
|
|
// Written by David Megginson, started 2002.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __INSTRUMENTS_ATTITUDE_INDICATOR_HXX
|
|
|
|
#define __INSTRUMENTS_ATTITUDE_INDICATOR_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <simgear/misc/props.hxx>
|
|
|
|
#include <Main/fgfs.hxx>
|
|
|
|
|
2003-01-25 19:49:27 +00:00
|
|
|
#include "gyro.hxx"
|
|
|
|
|
2002-09-24 14:51:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a vacuum-powered attitude indicator.
|
|
|
|
*
|
|
|
|
* This first, simple draft is hard-wired to vacuum pump #1.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
2003-04-04 03:25:02 +00:00
|
|
|
* /instrumentation/attitude-indicator/config/tumble-flag
|
2002-09-24 14:51:37 +00:00
|
|
|
* /instrumentation/attitude-indicator/serviceable
|
2003-04-05 14:37:12 +00:00
|
|
|
* /instrumentation/attitude-indicator/caged-flag
|
|
|
|
* /instrumentation/attitude-indicator/tumble-norm
|
2002-09-24 14:51:37 +00:00
|
|
|
* /orientation/pitch-deg
|
|
|
|
* /orientation/roll-deg
|
|
|
|
* /systems/vacuum[0]/suction-inhg
|
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
|
|
|
* /instrumentation/attitude-indicator/indicated-pitch-deg
|
|
|
|
* /instrumentation/attitude-indicator/indicated-roll-deg
|
2003-04-05 14:37:12 +00:00
|
|
|
* /instrumentation/attitude-indicator/tumble-norm
|
2002-09-24 14:51:37 +00:00
|
|
|
*/
|
|
|
|
class AttitudeIndicator : public FGSubsystem
|
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
AttitudeIndicator ();
|
|
|
|
virtual ~AttitudeIndicator ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void bind ();
|
|
|
|
virtual void unbind ();
|
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2003-01-25 19:49:27 +00:00
|
|
|
Gyro _gyro;
|
|
|
|
|
2003-04-04 03:25:02 +00:00
|
|
|
SGPropertyNode_ptr _tumble_flag_node;
|
2003-04-05 14:37:12 +00:00
|
|
|
SGPropertyNode_ptr _caged_node;
|
|
|
|
SGPropertyNode_ptr _tumble_node;
|
2002-09-24 14:51:37 +00:00
|
|
|
SGPropertyNode_ptr _pitch_in_node;
|
|
|
|
SGPropertyNode_ptr _roll_in_node;
|
|
|
|
SGPropertyNode_ptr _suction_node;
|
|
|
|
SGPropertyNode_ptr _pitch_out_node;
|
|
|
|
SGPropertyNode_ptr _roll_out_node;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_ATTITUDE_INDICATOR_HXX
|