1 // metarproperties.hxx -- Parse a METAR and write properties
3 // Written by David Megginson, started May 2002.
4 // Rewritten by Torsten Dreyer, August 2010
6 // Copyright (C) 2002 David Megginson - david@megginson.com
8 // This program is free software; you can redistribute it and/or
9 // modify it under the terms of the GNU General Public License as
10 // published by the Free Software Foundation; either version 2 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful, but
14 // WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the Free Software
20 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef __METARPROPERTIES_HXX
24 #define __METARPROPERTIES_HXX
26 #include <Airports/simple.hxx>
27 #include <simgear/props/props.hxx>
28 #include "tiedpropertylist.hxx"
30 namespace Environment {
32 class MetarProperties : public SGReferenced
35 MetarProperties( SGPropertyNode_ptr rootNode );
36 virtual ~MetarProperties();
38 SGPropertyNode_ptr get_root_node() const { return _rootNode; }
41 const char * get_metar() const { return _metar.c_str(); }
42 void set_metar( const char * metar );
43 const char * get_station_id() const { return _station_id.c_str(); }
44 const char * get_decoded() const { return _decoded.c_str(); }
46 SGPropertyNode_ptr _rootNode;
47 SGPropertyNode_ptr _metarValidNode;
49 std::string _station_id;
50 double _station_elevation;
51 double _station_latitude;
52 double _station_longitude;
53 double _min_visibility;
54 double _max_visibility;
56 int _base_wind_range_from;
57 int _base_wind_range_to;
59 double _wind_from_north_fps;
60 double _wind_from_east_fps;
66 double _sea_level_temperature;
67 double _sea_level_dewpoint;
68 double _sea_level_pressure;
75 TiedPropertyList _tiedProperties;
79 #endif // __METARPROPERTIES_HXX