]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/inst_vertical_speed_indicator.hxx
#346 related: missing status message for property server
[flightgear.git] / src / Instrumentation / inst_vertical_speed_indicator.hxx
1 // inst_vertical_speed_indicator.hxx -- Instantaneous VSI (emulation calibrated to standard atmosphere).
2 //
3 // Started September 2004.
4 //
5 // Copyright (C) 2004
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
11 //
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 // General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20 //
21
22 #ifndef __INST_VERTICAL_SPEED_INDICATOR_HXX
23 #define __INST_VERTICAL_SPEED_INDICATOR_HXX 1
24
25 #ifndef __cplusplus
26 # error This library requires C++
27 #endif
28
29 #include <simgear/props/props.hxx>
30 #include <simgear/structure/subsystem_mgr.hxx>
31
32
33 class SGInterpTable;
34
35
36 /**
37  * Model an instantaneous VSI tied to the external pressure.
38  *
39  * Input properties:
40  *
41  * /instrumentation/inst-vertical-speed-indicator/serviceable
42  * /environment/pressure-inhg
43  * /environment/pressure-sea-level-inhg
44  * /sim/speed-up
45  * /sim/freeze/master
46  *
47  * Output properties:
48  *
49  * /instrumentation/inst-vertical-speed-indicator/indicated-speed-fps
50  * /instrumentation/inst-vertical-speed-indicator/indicated-speed-fpm
51  */
52 class InstVerticalSpeedIndicator : public SGSubsystem
53 {
54
55 public:
56
57     InstVerticalSpeedIndicator ( SGPropertyNode *node );
58     virtual ~InstVerticalSpeedIndicator ();
59
60     virtual void init ();
61     virtual void update (double dt);
62
63 private:
64
65     string _name;
66     int _num;
67
68     double _internal_pressure_inhg;
69     double _internal_sea_inhg;
70
71     double _speed_ft_per_s;
72
73     SGPropertyNode_ptr _serviceable_node;
74     SGPropertyNode_ptr _freeze_node;
75     SGPropertyNode_ptr _pressure_node;
76     SGPropertyNode_ptr _sea_node;
77     SGPropertyNode_ptr _speed_up_node;
78     SGPropertyNode_ptr _speed_node;
79     SGPropertyNode_ptr _speed_min_node;
80
81     SGInterpTable * _pressure_table;
82     SGInterpTable * _altitude_table;
83 };
84
85 #endif // __INST_VERTICAL_SPEED_INDICATOR_HXX