]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/vertical_speed_indicator.hxx
7c16f27d2d124e62904c228e9ed4151f6492f0ec
[flightgear.git] / src / Instrumentation / vertical_speed_indicator.hxx
1 // vertical_speed_indicator.hxx - a regular VSI tied to the static port.
2 // Written by David Megginson, started 2002.
3 //
4 // Last change by E. van den Berg, 17.02.1013
5 //
6 // This file is in the Public Domain and comes with no warranty.
7
8
9 #ifndef __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX
10 #define __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX 1
11
12 #ifndef __cplusplus
13 # error This library requires C++
14 #endif
15
16 #include <simgear/props/props.hxx>
17 #include <simgear/structure/subsystem_mgr.hxx>
18
19
20 /**
21  * Model a non-instantaneous VSI tied to the static port.
22  *
23  * Input properties:
24  *
25  * /instrumentation/"name"/serviceable
26  * "static_port"/pressure-inhg
27  *
28  * Output properties:
29  *
30  * /instrumentation/"name"/indicated-speed-fpm
31  * /instrumentation/"name"/indicated-speed-mps
32  * /instrumentation/"name"/indicated-speed-kts
33  */
34 class VerticalSpeedIndicator : public SGSubsystem
35 {
36
37 public:
38
39     VerticalSpeedIndicator ( SGPropertyNode *node );
40     virtual ~VerticalSpeedIndicator ();
41
42     virtual void init ();
43     virtual void reinit ();
44     virtual void update (double dt);
45
46 private:
47
48     double _casing_pressure_Pa;
49     double _casing_airmass_kg;
50     double _casing_density_kgpm3;
51     double _orifice_massflow_kgps;
52
53     std::string _name;
54     int _num;
55     std::string _static_pressure;
56     std::string _static_temperature;
57
58     SGPropertyNode_ptr _serviceable_node;
59     SGPropertyNode_ptr _pressure_node;
60     SGPropertyNode_ptr _temperature_node;
61     SGPropertyNode_ptr _speed_fpm_node;
62     SGPropertyNode_ptr _speed_mps_node;
63     SGPropertyNode_ptr _speed_kts_node;
64     SGPropertyNode_ptr _speed_up_node;
65     
66 };
67
68 #endif // __INSTRUMENTS_VERTICAL_SPEED_INDICATOR_HXX