1 /*****************************************************************************
3 Header: FGWeatherParse.h
4 Author: Christian Mayer
7 -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) --------
9 This program is free software; you can redistribute it and/or modify it under
10 the terms of the GNU General Public License as published by the Free Software
11 Foundation; either version 2 of the License, or (at your option) any later
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 You should have received a copy of the GNU General Public License along with
20 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21 Place - Suite 330, Boston, MA 02111-1307, USA.
23 Further information about the GNU General Public License can also be found on
24 the world wide web at http://www.gnu.org.
26 FUNCTIONAL DESCRIPTION
27 ------------------------------------------------------------------------------
28 Parse the weather that can be downloaded from
30 http://129.13.102.67/out/flight/yymmddhhdata.txt.gz
32 where yy stands for the year, mm for the month, dd for the day and hh for the
34 The columns are explained at
36 http://129.13.102.67/out/flight/kopf.txt
38 and a list of the stations can be found at
40 http://129.13.102.67/out/flight/wmoconv.txt.gz
42 Many thanks to Georg Mueller (Georg.Mueller@imk.fzk.de) of the
44 Institut fuer Meteorologie und Klimaforschung, Universitaet Karlsruhe
46 for makeking such a service aviable.
47 You can also visit his homepage at http://www.wetterzentrale.de
50 ------------------------------------------------------------------------------
51 18.10.1999 Christian Mayer Created
52 *****************************************************************************/
54 /****************************************************************************/
56 /****************************************************************************/
57 #ifndef FGWeatherParse_H
58 #define FGWeatherParse_H
60 /****************************************************************************/
62 /****************************************************************************/
63 #include <Include/compiler.h>
66 #include <Misc/fgstream.hxx>
68 #include "FGPhysicalProperties.h"
70 /****************************************************************************/
72 /****************************************************************************/
75 /****************************************************************************/
76 /* CLASS DECLARATION */
77 /****************************************************************************/
84 vector<entry> weather_station;
88 /************************************************************************/
89 /* A line (i.e. entry) in the data file looks like: */
90 /* yyyy mm dd hh XXXXX BBBBB LLLLLL UUUUU VVVVV TTTTT DDDDD PPPPP pppp */
91 /************************************************************************/
98 unsigned int station_number; // The XXXXX
99 float lat; // The BBBBBB negative = south
100 float lon; // The LLLLLLL negative = west
101 float x_wind; // The UUUUU negative = to the weat
102 float y_wind; // The VVVVV negative = to the south
103 float temperature; // The TTTTT in degC
104 float dewpoint; // The DDDDD in degC
105 float airpressure; // The PPPPP in hPa
106 float airpressure_history[4]; // The pppp in hPa
112 void input(const char *file);
114 unsigned int stored_stations(void) const
116 return weather_station.size();
119 entry getEntry(const unsigned int nr) const
121 return weather_station[nr];
124 FGPhysicalProperties2D getFGPhysicalProperties2D(const unsigned int nr) const;
127 /****************************************************************************/
128 #endif /*FGWeatherParse_H*/