2002-09-27 22:03:48 +00:00
|
|
|
// vertical_speed_indicator.hxx - a regular VSI tied to the static port.
|
|
|
|
// Written by David Megginson, started 2002.
|
|
|
|
//
|
|
|
|
// This file is in the Public Domain and comes with no warranty.
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX
|
|
|
|
#define __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_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>
|
2002-09-27 22:03:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Model a non-instantaneous VSI tied to the static port.
|
|
|
|
*
|
|
|
|
* Input properties:
|
|
|
|
*
|
|
|
|
* /instrumentation/vertical-speed-indicator/serviceable
|
|
|
|
* /systems/static[0]/pressure-inhg
|
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
|
|
|
* /instrumentation/vertical-speed-indicator/indicated-speed-fpm
|
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class VerticalSpeedIndicator : public SGSubsystem
|
2002-09-27 22:03:48 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
VerticalSpeedIndicator ();
|
|
|
|
virtual ~VerticalSpeedIndicator ();
|
|
|
|
|
|
|
|
virtual void init ();
|
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
double _internal_pressure_inhg;
|
|
|
|
|
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _pressure_node;
|
|
|
|
SGPropertyNode_ptr _speed_node;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX
|