Code_TYMPAN  4.2.0
Industrial site acoustic simulation
meteo.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14 */
15 
21 #ifndef __METEO_H
22 #define __METEO_H
23 
24 #include <map>
26 
30 class meteo
31 {
32 public:
34  meteo() : c0(340.), wind_angle(0.) {}
36  meteo(const double& windAngle, const double& sound_speed) : c0(sound_speed),
37  wind_angle(RADIANS(windAngle)) {}
38 
39  ~meteo() {}
40 
46  virtual void setC0(const double& c) { c0 = c; }
48  virtual double getC0() const { return c0; }
49 
54  virtual void setWindAngle(const double& windAngle) { wind_angle = RADIANS(windAngle); init(); }
56  virtual double getWindAngle() const { return DEGRES(wind_angle); }
57 
62  virtual void init() {}
63 
64 protected:
65  double c0;
66  double wind_angle;
67 };
68 
69 #endif //__METEO_H
meteo()
Default constructor.
Definition: meteo.h:34
virtual double getWindAngle() const
Get the windrose oriented wind angle in radian (clockwise angle with 0 for a wind from north to south...
Definition: meteo.h:56
virtual double getC0() const
Get sound speed.
Definition: meteo.h:48
#define RADIANS(a)
Definition: mathlib.h:82
virtual void setC0(const double &c)
Set sound speed.
Definition: meteo.h:46
double c0
Ground sound speed (z = 0)
Definition: meteo.h:65
meteo(const double &windAngle, const double &sound_speed)
Constructor.
Definition: meteo.h:36
NxReal c
Definition: NxVec3.cpp:345
~meteo()
Definition: meteo.h:39
virtual void init()
Init parameters as needed.
Definition: meteo.h:62
Weather data class for the simulation.
Definition: meteo.h:30
Math library.
double wind_angle
The windrose oriented wind angle in radian (clockwise angle with 0 for a wind from north to south) ...
Definition: meteo.h:66
virtual void setWindAngle(const double &windAngle)
Define wind: angle given in windrose orientation (clockwise angle with 0 for a wind from north to sou...
Definition: meteo.h:54
#define DEGRES(a)
Definition: mathlib.h:83