]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/altimeter.hxx
NavDisplay enhancements for Syd.
[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/props/tiedpropertylist.hxx>
13 #include <simgear/structure/subsystem_mgr.hxx>
14 #include <Environment/atmosphere.hxx>
15
16
17 /**
18  * Model a barometric altimeter tied to the static port.
19  *
20  * Input properties:
21  *
22  * /instrumentation/<name>/serviceable
23  * /instrumentation/<name>/setting-inhg
24  * <static_pressure>
25  *
26  * Output properties:
27  *
28  * /instrumentation/<name>/indicated-altitude-ft
29  */
30 class Altimeter : public SGSubsystem
31 {
32
33 public:
34
35     Altimeter (SGPropertyNode *node, double quantum = 0);
36     virtual ~Altimeter ();
37
38     virtual void init ();
39     virtual void update (double dt);
40     virtual void bind();
41     virtual void unbind();
42
43     double getSettingInHg() const;
44     void setSettingInHg( double value );
45     double getSettingHPa() const;
46     void setSettingHPa( double value );
47
48 private:
49     SGPropertyNode_ptr _rootNode;
50     string _static_pressure;
51     double _tau;
52     double _quantum;
53     double _kollsman;
54     double raw_PA;
55     double _settingInHg;
56
57     SGPropertyNode_ptr _serviceable_node;
58     SGPropertyNode_ptr _pressure_node;
59     SGPropertyNode_ptr _press_alt_node;
60     SGPropertyNode_ptr _mode_c_node;
61     SGPropertyNode_ptr _altitude_node;
62
63     FGAltimeter _altimeter;
64
65     simgear::TiedPropertyList _tiedProperties;
66 };
67
68 #endif // __INSTRUMENTS_ALTIMETER_HXX