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
5 // This file is in the Public Domain and comes with no warranty.
8 #ifndef __INSTRUMENTS_ALTIMETER_HXX
9 #define __INSTRUMENTS_ALTIMETER_HXX 1
11 #include <simgear/props/props.hxx>
12 #include <simgear/props/tiedpropertylist.hxx>
13 #include <simgear/structure/subsystem_mgr.hxx>
14 #include <Environment/atmosphere.hxx>
18 * Model a barometric altimeter tied to the static port.
22 * /instrumentation/<name>/serviceable
23 * /instrumentation/<name>/setting-inhg
28 * /instrumentation/<name>/indicated-altitude-ft
30 class Altimeter : public SGSubsystem
35 Altimeter (SGPropertyNode *node, double quantum = 0);
36 virtual ~Altimeter ();
39 virtual void update (double dt);
41 virtual void unbind();
43 double getSettingInHg() const;
44 void setSettingInHg( double value );
45 double getSettingHPa() const;
46 void setSettingHPa( double value );
49 SGPropertyNode_ptr _rootNode;
50 string _static_pressure;
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;
63 FGAltimeter _altimeter;
65 simgear::TiedPropertyList _tiedProperties;
68 #endif // __INSTRUMENTS_ALTIMETER_HXX