X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FEnvironment%2Fmetarproperties.hxx;h=7d108100defbf7f0d338197c6ca55c4571225d19;hb=c71c9aee0a321192d01f89f161cbdbd6112491b6;hp=060cb69f5e40be14f0977c05afaa043e58206bb4;hpb=121190e73ac560e1d0e52b5f70e705b21905089c;p=flightgear.git diff --git a/src/Environment/metarproperties.hxx b/src/Environment/metarproperties.hxx index 060cb69f5..7d108100d 100644 --- a/src/Environment/metarproperties.hxx +++ b/src/Environment/metarproperties.hxx @@ -25,10 +25,12 @@ #include #include -#include "tiedpropertylist.hxx" +#include namespace Environment { +class MagneticVariation; + class MetarProperties : public SGReferenced { public: @@ -36,11 +38,27 @@ public: virtual ~MetarProperties(); SGPropertyNode_ptr get_root_node() const { return _rootNode; } + virtual bool isValid() const { return _metarValidNode->getBoolValue(); } + virtual const std::string & getStationId() const { return _station_id; } + virtual void setStationId( const std::string & value ); + virtual void setMetar( const std::string & value ) { set_metar( value.c_str() ); } private: const char * get_metar() const { return _metar.c_str(); } void set_metar( const char * metar ); const char * get_station_id() const { return _station_id.c_str(); } + void set_station_id( const char * value ); + const char * get_decoded() const { return _decoded.c_str(); } + double get_magnetic_variation_deg() const; + double get_magnetic_dip_deg() const; + double get_wind_from_north_fps() const { return _wind_from_north_fps; } + double get_wind_from_east_fps() const { return _wind_from_east_fps; } + double get_base_wind_dir() const { return _base_wind_dir; } + double get_wind_speed() const { return _wind_speed; } + void set_wind_from_north_fps( double value ); + void set_wind_from_east_fps( double value ); + void set_base_wind_dir( double value ); + void set_wind_speed( double value ); SGPropertyNode_ptr _rootNode; SGPropertyNode_ptr _metarValidNode; @@ -69,9 +87,16 @@ private: double _hail; double _snow; bool _snow_cover; - - TiedPropertyList _tiedProperties; + std::string _decoded; +protected: + simgear::TiedPropertyList _tiedProperties; + MagneticVariation * _magneticVariation; }; +inline void MetarProperties::set_station_id( const char * value ) +{ + _station_id = value; +} + } // namespace #endif // __METARPROPERTIES_HXX