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
14.12.1999 Christian Mayer minor internal changes
53
*****************************************************************************/
55
/****************************************************************************/
57
/****************************************************************************/
58
#ifndef FGWeatherParse_H
59
#define FGWeatherParse_H
61
/****************************************************************************/
63
/****************************************************************************/
68
#include <simgear/compiler.h>
71
#include <simgear/misc/sgstream.hxx>
73
#include "FGPhysicalProperties.h"
75
/****************************************************************************/
77
/****************************************************************************/
80
/****************************************************************************/
81
/* CLASS DECLARATION */
82
/****************************************************************************/
89
vector<entry> weather_station;
93
/************************************************************************/
94
/* A line (i.e. entry) in the data file looks like: */
95
/* yyyy mm dd hh XXXXX BBBBB LLLLLL UUUUU VVVVV TTTTT DDDDD PPPPP pppp */
96
/************************************************************************/
103
unsigned int station_number; // The XXXXX
104
float lat; // The BBBBBB negative = south
105
float lon; // The LLLLLLL negative = west
106
float x_wind; // The UUUUU negative = to the weat
107
float y_wind; // The VVVVV negative = to the south
108
float temperature; // The TTTTT in degC
109
float dewpoint; // The DDDDD in degC
110
float airpressure; // The PPPPP in hPa
111
float airpressure_history[4]; // The pppp in hPa
117
void input(const char *file);
119
unsigned int stored_stations(void) const
121
return weather_station.size();
124
entry getEntry(const unsigned int nr) const
126
return weather_station[nr];
129
FGPhysicalProperties getFGPhysicalProperties(const unsigned int nr) const;
130
void getPosition(const unsigned int nr, sgVec2 pos) const;
133
/****************************************************************************/
134
#endif /*FGWeatherParse_H*/