X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Faltimeter.hxx;h=121cafa7ce72b2ea1af6a8c0bc146112b09d8fca;hb=ccb890447ae2f950b8032649ca8b8190bdafaf90;hp=73c1c2c02aa628f6b80fde0c28d7c65df4f83150;hpb=980012e1682fdb27c9b9ec27edea0b549d603f9d;p=flightgear.git diff --git a/src/Instrumentation/altimeter.hxx b/src/Instrumentation/altimeter.hxx index 73c1c2c02..121cafa7c 100644 --- a/src/Instrumentation/altimeter.hxx +++ b/src/Instrumentation/altimeter.hxx @@ -1,5 +1,6 @@ // altimeter.hxx - an altimeter tied to the static port. // Written by David Megginson, started 2002. +// Updated by John Denker to match changes in altimeter.cxx in 2007 // // This file is in the Public Domain and comes with no warranty. @@ -7,15 +8,10 @@ #ifndef __INSTRUMENTS_ALTIMETER_HXX #define __INSTRUMENTS_ALTIMETER_HXX 1 -#ifndef __cplusplus -# error This library requires C++ -#endif - #include +#include #include - - -class SGInterpTable; +#include /** @@ -23,34 +19,51 @@ class SGInterpTable; * * Input properties: * - * /instrumentation/altimeter/serviceable - * /instrumentation/altimeter/setting-inhg - * /systems/static[0]/pressure-inhg + * /instrumentation//serviceable + * /instrumentation//setting-inhg + * * * Output properties: * - * /instrumentation/altimeter/indicated-altitude-ft + * /instrumentation//indicated-altitude-ft */ class Altimeter : public SGSubsystem { public: - Altimeter (); + Altimeter (SGPropertyNode *node, double quantum = 0); virtual ~Altimeter (); virtual void init (); + virtual void reinit (); virtual void update (double dt); + virtual void bind(); + virtual void unbind(); + + double getSettingInHg() const; + void setSettingInHg( double value ); + double getSettingHPa() const; + void setSettingHPa( double value ); private: + SGPropertyNode_ptr _rootNode; + string _static_pressure; + double _tau; + double _quantum; + double _kollsman; + double _raw_PA; + double _settingInHg; SGPropertyNode_ptr _serviceable_node; - SGPropertyNode_ptr _setting_node; SGPropertyNode_ptr _pressure_node; + SGPropertyNode_ptr _press_alt_node; + SGPropertyNode_ptr _mode_c_node; SGPropertyNode_ptr _altitude_node; - SGInterpTable * _altitude_table; - + FGAltimeter _altimeter; + + simgear::TiedPropertyList _tiedProperties; }; #endif // __INSTRUMENTS_ALTIMETER_HXX