X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInstrumentation%2Faltimeter.hxx;h=f57c1ad37400d2503835dfdc4c6dde4ce2ef0d02;hb=9fa790bcac7e535bb06cd228ae15178f1b10b26f;hp=b653a4c13ad13fc2e8166880547d74b03200515c;hpb=8d5714084e76ab923c08aae431dbdb9e516aaf96;p=flightgear.git diff --git a/src/Instrumentation/altimeter.hxx b/src/Instrumentation/altimeter.hxx index b653a4c13..f57c1ad37 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
- - -class SGInterpTable; +#include +#include +#include +#include /** @@ -23,38 +19,50 @@ 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 FGSubsystem +class Altimeter : public SGSubsystem { public: - Altimeter (); + Altimeter (SGPropertyNode *node, double quantum = 0); virtual ~Altimeter (); virtual void init (); - virtual void bind (); - virtual void unbind (); virtual void update (double dt); + virtual void bind(); + virtual void unbind(); -private: + double getSettingInHg() const; + void setSettingInHg( double value ); + double getSettingHPa() const; + void setSettingHPa( double value ); - double _spin; +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