1 /*****************************************************************************
3 Header: FGMicroWeather.h
4 Author: Christian Mayer
7 ---------- Copyright (C) 1999 Christian Mayer (vader@t-online.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 Store the single weather areas
31 ------------------------------------------------------------------------------
32 28.05.1999 Christian Mayer Created
33 16.06.1999 Durk Talsma Portability for Linux
34 20.06.1999 Christian Mayer added lots of consts
35 30.06.1999 Christian Mayer STL portability
36 *****************************************************************************/
38 /****************************************************************************/
40 /****************************************************************************/
41 #ifndef FGMicroWeather_H
42 #define FGMicroWeather_H
44 /****************************************************************************/
46 /****************************************************************************/
47 //Include all the simulated weather features
49 #include "FGSnowRain.h"
51 #include "FGAirPressureItem.h"
52 #include "FGTemperatureItem.h"
53 #include "FGWindItem.h"
54 #include "FGTurbulenceItem.h"
55 #include "FGVaporPressureItem.h"
57 #include "FGWeatherDefs.h"
58 #include "FGPhysicalProperties.h"
59 #include "FGPhysicalProperty.h"
60 #include <Voronoi/point2d.h>
64 /****************************************************************************/
66 /****************************************************************************/
68 FG_USING_NAMESPACE(std);
70 /****************************************************************************/
71 /* CLASS DECLARATION */
72 /****************************************************************************/
77 typedef vector<Point2D> positionList;
78 typedef positionList::iterator positionListIt;
79 typedef positionList::const_iterator const_positionListIt;
80 positionList position; //the points that specify the outline of the
81 //micro weather (lat/lon)
84 FGPhysicalProperties2D StoredWeather; //property if nothing is specified
87 /************************************************************************/
88 /* Constructor and Destructor */
89 /************************************************************************/
90 FGMicroWeather(const FGPhysicalProperties2D& p, const positionList& points);
93 /************************************************************************/
94 /* Add a feature to the micro weather */
95 /************************************************************************/
96 void addWind(const FGWindItem& x);
97 void addTurbulence(const FGTurbulenceItem& x);
98 void addTemperature(const FGTemperatureItem& x);
99 void addAirPressure(const FGAirPressureItem& x);
100 void addVaporPressure(const FGVaporPressureItem& x);
101 void addCloud(const FGCloudItem& x);
103 void setSnowRainIntensity(const WeatherPrecition& x);
104 void setSnowRainType(const SnowRainType& x);
105 void setLightningProbability(const WeatherPrecition& x);
107 void setStoredWeather(const FGPhysicalProperties2D& x);
109 /************************************************************************/
110 /* get physical properties in the micro weather */
111 /* NOTE: I don't neet to speify a positon as the properties don't */
112 /* change in a micro weather */
113 /************************************************************************/
114 inline FGPhysicalProperty get(const WeatherPrecition& altitude) const
116 return FGPhysicalProperty(StoredWeather, altitude);
119 /************************************************************************/
120 /* return true if p is inside this micro weather */
121 /************************************************************************/
122 inline bool hasPoint(const Point3D& p) const { return hasPoint((Point2D) p); }
123 bool hasPoint(const Point2D& p) const;
126 /****************************************************************************/
127 #endif /*FGMicroWeather_H*/