1 /*****************************************************************************
3 Module: FGPhysicalProperties_bind.cpp
4 Author: Christian Mayer
6 Called by: main program
8 -------- Copyright (C) 2002 Christian Mayer (fgfs@christianmayer.de) --------
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
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
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.
24 Further information about the GNU General Public License can also be found on
25 the world wide web at http://www.gnu.org.
27 FUNCTIONAL DESCRIPTION
28 ------------------------------------------------------------------------------
29 Initialice the FGPhysicalProperties struct to something sensible(?)
32 ------------------------------------------------------------------------------
33 15.03.2002 Christian Mayer Created
34 *****************************************************************************/
36 #include "FGPhysicalProperties.h"
39 WeatherPrecision FGPhysicalProperties::getWind_x( int number ) const
41 if (number >= Wind.size())
43 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
47 map<Altitude,FGWindItem>::const_iterator it = Wind.begin();
55 return it->second.x();
58 void FGPhysicalProperties::setWind_x( int number, WeatherPrecision x)
60 if (number >= Wind.size())
62 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
65 map<Altitude,FGWindItem>::iterator it = Wind.begin();
76 WeatherPrecision FGPhysicalProperties::getWind_y( int number ) const
78 if (number >= Wind.size())
80 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
84 map<Altitude,FGWindItem>::const_iterator it = Wind.begin();
92 return it->second.y();
95 void FGPhysicalProperties::setWind_y( int number, WeatherPrecision y)
97 if (number >= Wind.size())
99 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
102 map<Altitude,FGWindItem>::iterator it = Wind.begin();
113 WeatherPrecision FGPhysicalProperties::getWind_z( int number ) const
115 if (number >= Wind.size())
117 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
121 map<Altitude,FGWindItem>::const_iterator it = Wind.begin();
129 return it->second.z();
132 void FGPhysicalProperties::setWind_z( int number, WeatherPrecision z)
134 if (number >= Wind.size())
136 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
139 map<Altitude,FGWindItem>::iterator it = Wind.begin();
150 WeatherPrecision FGPhysicalProperties::getWind_a( int number ) const
152 if (number >= Wind.size())
154 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
158 map<Altitude,FGWindItem>::const_iterator it = Wind.begin();
169 void FGPhysicalProperties::setWind_a( int number, WeatherPrecision a)
171 if (number >= Wind.size())
173 cerr << "Error: There are " << Wind.size() << " entries for wind, but number " << number << " got requested!\n";
176 map<Altitude,FGWindItem>::iterator it = Wind.begin();
187 WeatherPrecision FGPhysicalProperties::getTurbulence_x( int number ) const
189 if (number >= Turbulence.size())
191 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
195 map<Altitude,FGTurbulenceItem>::const_iterator it = Turbulence.begin();
203 return it->second.x();
206 void FGPhysicalProperties::setTurbulence_x( int number, WeatherPrecision x)
208 if (number >= Turbulence.size())
210 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
213 map<Altitude,FGTurbulenceItem>::iterator it = Turbulence.begin();
224 WeatherPrecision FGPhysicalProperties::getTurbulence_y( int number ) const
226 if (number >= Turbulence.size())
228 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
232 map<Altitude,FGTurbulenceItem>::const_iterator it = Turbulence.begin();
240 return it->second.y();
243 void FGPhysicalProperties::setTurbulence_y( int number, WeatherPrecision y)
245 if (number >= Turbulence.size())
247 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
250 map<Altitude,FGTurbulenceItem>::iterator it = Turbulence.begin();
261 WeatherPrecision FGPhysicalProperties::getTurbulence_z( int number ) const
263 if (number >= Turbulence.size())
265 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
269 map<Altitude,FGTurbulenceItem>::const_iterator it = Turbulence.begin();
277 return it->second.z();
280 void FGPhysicalProperties::setTurbulence_z( int number, WeatherPrecision z)
282 if (number >= Turbulence.size())
284 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
287 map<Altitude,FGTurbulenceItem>::iterator it = Turbulence.begin();
298 WeatherPrecision FGPhysicalProperties::getTurbulence_a( int number ) const
300 if (number >= Turbulence.size())
302 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
306 map<Altitude,FGTurbulenceItem>::const_iterator it = Turbulence.begin();
317 void FGPhysicalProperties::setTurbulence_a( int number, WeatherPrecision a)
319 if (number >= Turbulence.size())
321 cerr << "Error: There are " << Turbulence.size() << " entries for Turbulence, but number " << number << " got requested!\n";
324 map<Altitude,FGTurbulenceItem>::iterator it = Turbulence.begin();
335 WeatherPrecision FGPhysicalProperties::getTemperature_x( int number ) const
337 if (number >= Temperature.size())
339 cerr << "Error: There are " << Temperature.size() << " entries for Temperature, but number " << number << " got requested!\n";
343 map<Altitude,WeatherPrecision>::const_iterator it = Temperature.begin();
354 void FGPhysicalProperties::setTemperature_x( int number, WeatherPrecision x)
356 if (number >= Temperature.size())
358 cerr << "Error: There are " << Temperature.size() << " entries for Temperature, but number " << number << " got requested!\n";
361 map<Altitude,WeatherPrecision>::iterator it = Temperature.begin();
372 WeatherPrecision FGPhysicalProperties::getTemperature_a( int number ) const
374 if (number >= Temperature.size())
376 cerr << "Error: There are " << Temperature.size() << " entries for Temperature, but number " << number << " got requested!\n";
380 map<Altitude,WeatherPrecision>::const_iterator it = Temperature.begin();
391 void FGPhysicalProperties::setTemperature_a( int number, WeatherPrecision a)
393 if (number >= Temperature.size())
395 cerr << "Error: There are " << Temperature.size() << " entries for Temperature, but number " << number << " got requested!\n";
398 map<Altitude,WeatherPrecision>::iterator it = Temperature.begin();
408 WeatherPrecision FGPhysicalProperties::getVaporPressure_x( int number ) const
410 if (number >= VaporPressure.size())
412 cerr << "Error: There are " << VaporPressure.size() << " entries for VaporPressure, but number " << number << " got requested!\n";
416 map<Altitude,WeatherPrecision>::const_iterator it = VaporPressure.begin();
427 void FGPhysicalProperties::setVaporPressure_x( int number, WeatherPrecision x)
429 if (number >= VaporPressure.size())
431 cerr << "Error: There are " << Temperature.size() << " entries for VaporPressure, but number " << number << " got requested!\n";
434 map<Altitude,WeatherPrecision>::iterator it = VaporPressure.begin();
445 WeatherPrecision FGPhysicalProperties::getVaporPressure_a( int number ) const
447 if (number >= VaporPressure.size())
449 cerr << "Error: There are " << VaporPressure.size() << " entries for VaporPressure, but number " << number << " got requested!\n";
453 map<Altitude,WeatherPrecision>::const_iterator it = VaporPressure.begin();
464 void FGPhysicalProperties::setVaporPressure_a( int number, WeatherPrecision a)
466 if (number >= VaporPressure.size())
468 cerr << "Error: There are " << VaporPressure.size() << " entries for VaporPressure, but number " << number << " got requested!\n";
471 map<Altitude,WeatherPrecision>::iterator it = VaporPressure.begin();