]> git.mxchange.org Git - flightgear.git/blob - src/WeatherCM/FGPhysicalProperty.cpp
0abca2743ac362c86f3ec3cd50ba09416b2c4ed5
[flightgear.git] / src / WeatherCM / FGPhysicalProperty.cpp
1 /*****************************************************************************
2
3  Module:       FGPhysicalProperty.cpp
4  Author:       Christian Mayer
5  Date started: 28.05.99
6  Called by:    main program
7
8  ---------- Copyright (C) 1999  Christian Mayer (vader@t-online.de) ----------
9
10  This program is free software; you can redistribute it and/or modify it under
11  the terms of the GNU General Public License as published by the Free Software
12  Foundation; either version 2 of the License, or (at your option) any later
13  version.
14
15  This program is distributed in the hope that it will be useful, but WITHOUT
16  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
18  details.
19
20  You should have received a copy of the GNU General Public License along with
21  this program; if not, write to the Free Software Foundation, Inc., 59 Temple
22  Place - Suite 330, Boston, MA  02111-1307, USA.
23
24  Further information about the GNU General Public License can also be found on
25  the world wide web at http://www.gnu.org.
26
27 FUNCTIONAL DESCRIPTION
28 ------------------------------------------------------------------------------
29 Initialice the FGPhysicalProperty struct to something sensible(?)
30
31 HISTORY
32 ------------------------------------------------------------------------------
33 29.05.1999 Christian Mayer      Created
34 16.06.1999 Durk Talsma          Portability for Linux
35 20.06.1999 Christian Mayer      added lots of consts
36 *****************************************************************************/
37
38 /****************************************************************************/
39 /* INCLUDES                                                                 */
40 /****************************************************************************/
41 #include "FGPhysicalProperty.h"
42 #include "FGWeatherDefs.h"
43
44 /****************************************************************************/
45 /********************************** CODE ************************************/
46 /****************************************************************************/
47 FGPhysicalProperty::FGPhysicalProperty()
48 {
49     Wind.setx(0.0);             //Wind vector
50     Wind.sety(0.0);             //Wind vector
51     Wind.setz(0.0);             //Wind vector
52
53     Turbulence.setx(0.0);       //Turbulence vector
54     Turbulence.sety(0.0);       //Turbulence vector
55     Turbulence.setz(0.0);       //Turbulence vector
56
57     Temperature = FG_WEATHER_DEFAULT_TEMPERATURE;       //a nice warm day
58     AirPressure = FG_WEATHER_DEFAULT_AIRPRESSURE;       //mbar, that's ground level
59     VaporPressure = FG_WEATHER_DEFAULT_VAPORPRESSURE;   //that gives about 50% relatvie humidity
60 }
61
62 FGPhysicalProperty::FGPhysicalProperty(const FGPhysicalProperties& p, const WeatherPrecition& altitude)
63 {
64     Wind = p.WindAt(altitude);
65     Turbulence = p.TurbulenceAt(altitude);
66     Temperature = p.TemperatureAt(altitude);
67     AirPressure = p.AirPressureAt(altitude);
68     VaporPressure = p.VaporPressureAt(altitude);
69 }
70
71