]> git.mxchange.org Git - flightgear.git/blob - src/Instrumentation/altimeter.hxx
Decrease the error (slightly) from a power glide.
[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/misc/props.hxx>
15 #include <Main/fgfs.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/altimeter/serviceable
27  * /instrumentation/altimeter/setting-inhg
28  * /systems/static[0]/pressure-inhg
29  *
30  * Output properties:
31  *
32  * /instrumentation/altimeter/indicated-altitude-ft
33  */
34 class Altimeter : public FGSubsystem
35 {
36
37 public:
38
39     Altimeter ();
40     virtual ~Altimeter ();
41
42     virtual void init ();
43     virtual void bind ();
44     virtual void unbind ();
45     virtual void update (double dt);
46
47 private:
48
49     SGPropertyNode_ptr _serviceable_node;
50     SGPropertyNode_ptr _setting_node;
51     SGPropertyNode_ptr _pressure_node;
52     SGPropertyNode_ptr _altitude_node;
53
54     SGInterpTable * _altitude_table;
55     
56 };
57
58 #endif // __INSTRUMENTS_ALTIMETER_HXX