]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/altimeter.hxx
Fix bug 191, uninitialised HUD color.
[flightgear.git] / src / Instrumentation / altimeter.hxx
1 // altimeter.hxx - an altimeter tied to the static port.
2 // Written by David Megginson, started 2002.
3 // Updated by John Denker to match changes in altimeter.cxx in 2007
4 //
5 // This file is in the Public Domain and comes with no warranty.
6
7
8 #ifndef __INSTRUMENTS_ALTIMETER_HXX
9 #define __INSTRUMENTS_ALTIMETER_HXX 1
10
11 #include <simgear/props/props.hxx>
12 #include <simgear/structure/subsystem_mgr.hxx>
13 #include <Environment/atmosphere.hxx>
14
15
16 /**
17  * Model a barometric altimeter tied to the static port.
18  *
19  * Input properties:
20  *
21  * /instrumentation/<name>/serviceable
22  * /instrumentation/<name>/setting-inhg
23  * <static_pressure>
24  *
25  * Output properties:
26  *
27  * /instrumentation/<name>/indicated-altitude-ft
28  */
29 class Altimeter : public SGSubsystem
30 {
31
32 public:
33
34     Altimeter (SGPropertyNode *node, double quantum = 0);
35     virtual ~Altimeter ();
36
37     virtual void init ();
38     virtual void update (double dt);
39
40 private:
41
42     string _name;
43     int _num;
44     string _static_pressure;
45     double _tau;
46     double _quantum;
47     double _kollsman;
48     double raw_PA;
49
50     SGPropertyNode_ptr _serviceable_node;
51     SGPropertyNode_ptr _setting_node;
52     SGPropertyNode_ptr _pressure_node;
53     SGPropertyNode_ptr _press_alt_node;
54     SGPropertyNode_ptr _mode_c_node;
55     SGPropertyNode_ptr _altitude_node;
56
57     FGAltimeter _altimeter;
58 };
59
60 #endif // __INSTRUMENTS_ALTIMETER_HXX