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 reinit ();
40 virtual void update (double dt);
42 virtual void unbind();
44 double getSettingInHg() const;
45 void setSettingInHg( double value );
46 double getSettingHPa() const;
47 void setSettingHPa( double value );
50 SGPropertyNode_ptr _rootNode;
51 string _static_pressure;
58 SGPropertyNode_ptr _serviceable_node;
59 SGPropertyNode_ptr _pressure_node;
60 SGPropertyNode_ptr _press_alt_node;
61 SGPropertyNode_ptr _mode_c_node;
62 SGPropertyNode_ptr _altitude_node;
64 FGAltimeter _altimeter;
66 simgear::TiedPropertyList _tiedProperties;
69 #endif // __INSTRUMENTS_ALTIMETER_HXX