]> git.mxchange.org Git - flightgear.git/blob - src/Environment/metarproperties.hxx
Bugfix - untie property.
[flightgear.git] / src / Environment / metarproperties.hxx
1 // metarproperties.hxx -- Parse a METAR and write properties
2 //
3 // Written by David Megginson, started May 2002.
4 // Rewritten by Torsten Dreyer, August 2010
5 //
6 // Copyright (C) 2002  David Megginson - david@megginson.com
7 //
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.
12 //
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.
17 //
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.
21 //
22
23 #ifndef __METARPROPERTIES_HXX
24 #define __METARPROPERTIES_HXX
25
26 #include <Airports/simple.hxx>
27 #include <simgear/props/props.hxx>
28 #include "tiedpropertylist.hxx"
29
30 namespace Environment {
31
32 class MetarProperties : public SGReferenced
33 {
34 public:
35     MetarProperties( SGPropertyNode_ptr rootNode );
36     virtual ~MetarProperties();
37
38     SGPropertyNode_ptr get_root_node() const { return _rootNode; }
39
40 private:
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
45     SGPropertyNode_ptr _rootNode;
46     SGPropertyNode_ptr _metarValidNode;
47     std::string _metar;
48     std::string _station_id;
49     double _station_elevation;
50     double _station_latitude;
51     double _station_longitude;
52     double _min_visibility;
53     double _max_visibility;
54     int _base_wind_dir;
55     int _base_wind_range_from;
56     int _base_wind_range_to;
57     double _wind_speed;
58     double _wind_from_north_fps;
59     double _wind_from_east_fps;
60     double _gusts;
61     double _temperature;
62     double _dewpoint;
63     double _humidity;
64     double _pressure;
65     double _sea_level_temperature;
66     double _sea_level_dewpoint;
67     double _sea_level_pressure;
68     double _rain;
69     double _hail;
70     double _snow;
71     bool _snow_cover;
72
73     TiedPropertyList _tiedProperties;
74 };
75
76 } // namespace
77 #endif // __METARPROPERTIES_HXX