]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/altimeter.hxx
Make more use of SGGeod
[flightgear.git] / src / Instrumentation / altimeter.hxx
1 // altimeter.hxx - an altimeter tied to the static port.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain and comes with no warranty.
5
6
7 #ifndef __INSTRUMENTS_ALTIMETER_HXX
8 #define __INSTRUMENTS_ALTIMETER_HXX 1
9
10 #ifndef __cplusplus
11 # error This library requires C++
12 #endif
13
14 #include <simgear/props/props.hxx>
15 #include <simgear/structure/subsystem_mgr.hxx>
16
17
18 class SGInterpTable;
19
20
21 /**
22  * Model a barometric altimeter tied to the static port.
23  *
24  * Input properties:
25  *
26  * /instrumentation/"name"/serviceable
27  * /instrumentation/"name"/setting-inhg
28  * "static_port"/pressure-inhg
29  *
30  * Output properties:
31  *
32  * /instrumentation/"name"/indicated-altitude-ft
33  */
34 class Altimeter : public SGSubsystem
35 {
36
37 public:
38
39     Altimeter (SGPropertyNode *node);
40     Altimeter ();
41     virtual ~Altimeter ();
42
43     virtual void init ();
44     virtual void update (double dt);
45
46 private:
47
48     string name;
49     int num;
50     string static_port;
51
52     SGPropertyNode_ptr _serviceable_node;
53     SGPropertyNode_ptr _setting_node;
54     SGPropertyNode_ptr _pressure_node;
55     SGPropertyNode_ptr _altitude_node;
56
57     SGInterpTable * _altitude_table;
58     
59 };
60
61 #endif // __INSTRUMENTS_ALTIMETER_HXX