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.
|
|
|
|
//
|
2013-02-17 16:50:44 +01:00
|
|
|
// Last change by E. van den Berg, 17.02.1013
|
|
|
|
//
|
2002-09-27 22:03:48 +00:00
|
|
|
// 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:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/serviceable
|
|
|
|
* "static_port"/pressure-inhg
|
2002-09-27 22:03:48 +00:00
|
|
|
*
|
|
|
|
* Output properties:
|
|
|
|
*
|
2004-10-16 12:37:39 +00:00
|
|
|
* /instrumentation/"name"/indicated-speed-fpm
|
2013-02-17 16:50:44 +01:00
|
|
|
* /instrumentation/"name"/indicated-speed-mps
|
|
|
|
* /instrumentation/"name"/indicated-speed-kts
|
2002-09-27 22:03:48 +00:00
|
|
|
*/
|
2003-09-24 17:20:55 +00:00
|
|
|
class VerticalSpeedIndicator : public SGSubsystem
|
2002-09-27 22:03:48 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
2004-10-16 12:37:39 +00:00
|
|
|
VerticalSpeedIndicator ( SGPropertyNode *node );
|
2002-09-27 22:03:48 +00:00
|
|
|
virtual ~VerticalSpeedIndicator ();
|
|
|
|
|
|
|
|
virtual void init ();
|
2012-09-17 00:12:29 +02:00
|
|
|
virtual void reinit ();
|
2002-09-27 22:03:48 +00:00
|
|
|
virtual void update (double dt);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2013-02-17 16:50:44 +01:00
|
|
|
double _casing_pressure_Pa;
|
|
|
|
double _casing_airmass_kg;
|
|
|
|
double _casing_density_kgpm3;
|
|
|
|
double _orifice_massflow_kgps;
|
2002-09-27 22:03:48 +00:00
|
|
|
|
2011-10-17 17:41:59 +01:00
|
|
|
std::string _name;
|
2006-12-06 22:11:43 +00:00
|
|
|
int _num;
|
2011-10-17 17:41:59 +01:00
|
|
|
std::string _static_pressure;
|
2013-02-17 16:50:44 +01:00
|
|
|
std::string _static_temperature;
|
2004-10-16 12:37:39 +00:00
|
|
|
|
2002-09-27 22:03:48 +00:00
|
|
|
SGPropertyNode_ptr _serviceable_node;
|
|
|
|
SGPropertyNode_ptr _pressure_node;
|
2013-02-17 16:50:44 +01:00
|
|
|
SGPropertyNode_ptr _temperature_node;
|
|
|
|
SGPropertyNode_ptr _speed_fpm_node;
|
|
|
|
SGPropertyNode_ptr _speed_mps_node;
|
|
|
|
SGPropertyNode_ptr _speed_kts_node;
|
2011-08-06 12:54:21 +02:00
|
|
|
SGPropertyNode_ptr _speed_up_node;
|
2002-09-27 22:03:48 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX
|