2003-01-25 21:13:13 +00:00
|
|
|
// slip_skid_ball.hxx - an slip-skid ball.
|
|
|
|
// Written by David Megginson, started 2003.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __INSTRUMENTS_SLIP_SKID_BALL_HXX
|
|
|
|
#define __INSTRUMENTS_SLIP_SKID_BALL_HXX 1
|
|
|
|
|
|
|
|
#ifndef __cplusplus
|
|
|
|
# error This library requires C++
|
|
|
|
#endif
|
|
|
|
|
2003-05-06 23:46:24 +00:00
|
|
|
#include <simgear/props/props.hxx>
|
2003-09-24 17:20:55 +00:00
|
|
|
#include <simgear/structure/subsystem_mgr.hxx>
|
2003-01-25 21:13:13 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a slip-skid ball.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/serviceable
|
2003-01-25 21:13:13 +00:00
|
|
|
* /accelerations/pilot/y-accel-fps_sec
|
|
|
|
* /accelerations/pilot/z-accel-fps_sec
|
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/indicated-slip-skid
|
2003-01-25 21:13:13 +00:00
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class SlipSkidBall : public SGSubsystem
|
2003-01-25 21:13:13 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
SlipSkidBall ( SGPropertyNode *node );
|
2003-01-25 21:13:13 +00:00
|
|
|
virtual ~SlipSkidBall ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
double _last_pos;
|
|
|
|
|
2006-12-06 22:11:43 +00:00
|
|
|
string _name;
|
|
|
|
int _num;
|
2004-10-16 12:37:39 +00:00
|
|
|
|
2003-01-26 15:56:11 +00:00
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
2003-01-25 21:13:13 +00:00
|
|
|
SGPropertyNode_ptr _y_accel_node;
|
|
|
|
SGPropertyNode_ptr _z_accel_node;
|
|
|
|
SGPropertyNode_ptr _out_node;
|
2003-11-10 21:57:14 +00:00
|
|
|
SGPropertyNode_ptr _override_node;
|
|
|
|
|
2003-01-25 21:13:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_SLIP_SKID_BALL_HXX
|