From d9bfd5a425df1bad7e3c53a64adce871e299a6b9 Mon Sep 17 00:00:00 2001 From: ehofman Date: Fri, 25 Jul 2008 18:38:29 +0000 Subject: [PATCH] This should apply, and everything should build cleanly, in isolation from the SimGear change. It changes all the SG_xxxx to be the 'real' includes, and gets rid of many #ifdef SG_HAVE_STD_INCLUDES. As an added bonus, rather than replacing 'SG_USING_NAMESPACE(std)' with 'using namespace std', I just fixed the small number of places to use std:: explicitly. So we're no longer polluting the global namespace with the entire contents of std, in many cases. There is one more 'mechanical' change to come - getting rid of SG_USING_STD(X), but I want to keep that separate from everything else. (There's another mechnical change, replacing with and so on *everywhere*, but one step at a time) --- configure.ac | 1 - src/AIModel/AIBase.cxx | 2 +- src/ATC/trafficcontrol.hxx | 2 +- src/ATCDCL/ATC.hxx | 2 +- src/ATCDCL/atis.cxx | 2 +- src/ATCDCL/ground.cxx | 2 +- src/ATCDCL/ground.hxx | 2 +- src/ATCDCL/tower.hxx | 2 +- src/Airports/apt_loader.cxx | 2 +- src/Airports/apt_loader.hxx | 2 +- src/Airports/calc_loc.cxx | 2 +- src/Airports/dynamics.cxx | 2 +- src/Airports/groundnetwork.cxx | 2 +- src/Airports/groundnetwork.hxx | 2 +- src/Airports/parking.cxx | 2 +- src/Airports/parking.hxx | 2 +- src/Airports/runways.cxx | 3 +- src/Airports/runways.hxx | 2 +- src/Airports/simple.cxx | 2 +- src/Airports/simple.hxx | 2 +- src/Autopilot/route_mgr.hxx | 2 +- src/Autopilot/xmlauto.hxx | 2 +- src/Cockpit/hud.cxx | 4 +- src/Cockpit/hud.hxx | 3 +- src/Cockpit/panel_io.cxx | 4 +- src/Cockpit/panel_io.hxx | 2 +- src/Environment/atmosphere.hxx | 6 +- src/Environment/environment.hxx | 7 +- src/Environment/environment_ctrl.hxx | 7 +- src/Environment/fgclouds.hxx | 2 +- src/FDM/Balloon.h | 87 ----- src/FDM/Balloon/.cvsignore | 3 - src/FDM/Balloon/BalloonSim.cpp | 345 ------------------ src/FDM/Balloon/BalloonSim.h | 115 ------ src/FDM/Balloon/Makefile.am | 5 - src/FDM/JSBSim/JSBSim.cxx | 2 +- src/FDM/LaRCsim/IO360.cxx | 4 +- src/FDM/LaRCsim/LaRCsimIC.cxx | 2 +- src/FDM/MagicCarpet.cxx | 121 ------ src/FDM/MagicCarpet.hxx | 46 --- src/FDM/Makefile.am | 4 +- src/FDM/SP/Makefile.am | 5 +- src/FDM/UIUCModel/uiuc_controlInput.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_CD.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_CL.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_CY.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_Cm.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_Cn.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_Croll.cpp | 2 +- .../UIUCModel/uiuc_menu_controlSurface.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_engine.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_fog.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_gear.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_geometry.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_ice.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_init.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_mass.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_misc.cpp | 2 +- src/FDM/UIUCModel/uiuc_menu_record.cpp | 2 +- src/FDM/UIUCModel/uiuc_parsefile.h | 2 +- src/FDM/YASim/Rotor.cpp | 4 +- src/GUI/gui_funcs.cxx | 4 +- src/GUI/mouse.cxx | 2 +- src/GUI/property_list.cxx | 4 +- src/Input/fgjs.cxx | 6 +- src/Input/input.cxx | 4 +- src/Input/jsinput.cxx | 2 +- src/Instrumentation/HUD/HUD.cxx | 4 +- src/Instrumentation/HUD/HUD.hxx | 11 +- src/Instrumentation/attitude_indicator.cxx | 4 +- src/Instrumentation/heading_indicator.cxx | 4 +- src/Instrumentation/heading_indicator_dg.cxx | 4 +- src/Instrumentation/heading_indicator_fg.cxx | 4 +- src/Instrumentation/mrg.cxx | 4 +- src/Instrumentation/turn_indicator.cxx | 4 +- src/Main/bootstrap.cxx | 2 +- src/Main/fg_commands.cxx | 4 +- src/Main/fg_init.cxx | 6 +- src/Main/fg_init.hxx | 2 +- src/Main/fg_io.cxx | 4 +- src/Main/fg_io.hxx | 2 +- src/Main/fg_os_common.cxx | 3 + src/Main/fg_props.cxx | 2 +- src/Main/globals.hxx | 2 +- src/Main/logger.cxx | 2 +- src/Main/options.cxx | 3 +- src/MultiPlayer/multiplaymgr.hxx | 2 +- src/Navaids/awynet.hxx | 2 +- src/Navaids/fix.hxx | 2 +- src/Navaids/fixlist.hxx | 2 +- src/Navaids/navdb.cxx | 2 +- src/Navaids/navdb.hxx | 2 +- src/Navaids/navlist.hxx | 2 +- src/Navaids/navrecord.hxx | 20 +- src/Network/ATC-Inputs.cxx | 2 +- src/Network/ATC-Main.cxx | 2 +- src/Network/ATC-Outputs.cxx | 2 +- src/Network/AV400.cxx | 2 - src/Network/AV400.hxx | 2 +- src/Network/atlas.hxx | 2 +- src/Network/garmin.cxx | 2 +- src/Network/garmin.hxx | 2 +- src/Network/generic.hxx | 2 +- src/Network/httpd.cxx | 2 +- src/Network/joyclient.hxx | 2 +- src/Network/jpg-httpd.cxx | 2 +- src/Network/jsclient.hxx | 2 +- src/Network/lfsglass.hxx | 2 +- src/Network/multiplay.cxx | 2 +- src/Network/multiplay.hxx | 2 +- src/Network/native.hxx | 2 +- src/Network/native_ctrls.hxx | 2 +- src/Network/nmea.cxx | 3 - src/Network/nmea.hxx | 2 +- src/Network/opengc.hxx | 2 +- src/Network/props.hxx | 2 +- src/Network/protocol.hxx | 2 +- src/Network/pve.hxx | 2 +- src/Network/ray.hxx | 2 +- src/Network/rul.hxx | 2 +- src/Systems/electrical.hxx | 2 +- src/Systems/pitot.hxx | 2 +- src/Time/light.cxx | 6 +- src/Time/sunsolver.cxx | 9 +- src/Time/sunsolver.hxx | 6 +- tests/test-up.cxx | 2 +- utils/TerraSync/terrasync.cxx | 4 +- 128 files changed, 158 insertions(+), 913 deletions(-) delete mode 100644 src/FDM/Balloon.h delete mode 100644 src/FDM/Balloon/.cvsignore delete mode 100644 src/FDM/Balloon/BalloonSim.cpp delete mode 100644 src/FDM/Balloon/BalloonSim.h delete mode 100644 src/FDM/Balloon/Makefile.am delete mode 100644 src/FDM/MagicCarpet.cxx delete mode 100644 src/FDM/MagicCarpet.hxx diff --git a/configure.ac b/configure.ac index 24e6c9f52..dde173e08 100644 --- a/configure.ac +++ b/configure.ac @@ -652,7 +652,6 @@ AC_CONFIG_FILES([ \ src/Cockpit/Makefile \ src/Cockpit/built_in/Makefile \ src/Environment/Makefile \ - src/FDM/Balloon/Makefile \ src/FDM/ExternalNet/Makefile \ src/FDM/ExternalPipe/Makefile \ src/FDM/JSBSim/Makefile \ diff --git a/src/AIModel/AIBase.cxx b/src/AIModel/AIBase.cxx index 391cc577b..69c69d890 100644 --- a/src/AIModel/AIBase.cxx +++ b/src/AIModel/AIBase.cxx @@ -26,7 +26,7 @@ #include -#include STL_STRING +#include #include #include diff --git a/src/ATC/trafficcontrol.hxx b/src/ATC/trafficcontrol.hxx index f2e63eff4..b4f6e1517 100644 --- a/src/ATC/trafficcontrol.hxx +++ b/src/ATC/trafficcontrol.hxx @@ -32,7 +32,7 @@ -#include STL_STRING +#include #include SG_USING_STD(string); diff --git a/src/ATCDCL/ATC.hxx b/src/ATCDCL/ATC.hxx index 1889a86c2..1f73b5bef 100644 --- a/src/ATCDCL/ATC.hxx +++ b/src/ATCDCL/ATC.hxx @@ -31,7 +31,7 @@ #include #include -#include STL_STRING +#include #include "ATCVoice.hxx" diff --git a/src/ATCDCL/atis.cxx b/src/ATCDCL/atis.cxx index 0957d18ac..d7209a141 100644 --- a/src/ATCDCL/atis.cxx +++ b/src/ATCDCL/atis.cxx @@ -31,7 +31,7 @@ #include SG_USING_STD(string); -#include STL_IOSTREAM +#include SG_USING_STD(cout); #include diff --git a/src/ATCDCL/ground.cxx b/src/ATCDCL/ground.cxx index 4adfa9958..5176f1392 100644 --- a/src/ATCDCL/ground.cxx +++ b/src/ATCDCL/ground.cxx @@ -30,7 +30,7 @@ #include
#include -#include STL_FSTREAM +#include #include "ground.hxx" #include "ATCutils.hxx" diff --git a/src/ATCDCL/ground.hxx b/src/ATCDCL/ground.hxx index de8348b87..a94e3f252 100644 --- a/src/ATCDCL/ground.hxx +++ b/src/ATCDCL/ground.hxx @@ -33,7 +33,7 @@ #include "ATC.hxx" #include "ATCProjection.hxx" -#include STL_STRING +#include class FGAIEntity; class FGATCMgr; diff --git a/src/ATCDCL/tower.hxx b/src/ATCDCL/tower.hxx index ad1c2ba17..2a4b5afc4 100644 --- a/src/ATCDCL/tower.hxx +++ b/src/ATCDCL/tower.hxx @@ -27,7 +27,7 @@ #include #include -#include STL_STRING +#include #include "ATC.hxx" #include "ATCProjection.hxx" diff --git a/src/Airports/apt_loader.cxx b/src/Airports/apt_loader.cxx index a34bed5bb..896be4ea1 100644 --- a/src/Airports/apt_loader.cxx +++ b/src/Airports/apt_loader.cxx @@ -37,7 +37,7 @@ #include #include -#include STL_STRING +#include #include "simple.hxx" #include "runways.hxx" diff --git a/src/Airports/apt_loader.hxx b/src/Airports/apt_loader.hxx index 1acbde492..e96bde6a4 100644 --- a/src/Airports/apt_loader.hxx +++ b/src/Airports/apt_loader.hxx @@ -32,7 +32,7 @@ #include -#include STL_STRING +#include SG_USING_STD(string); diff --git a/src/Airports/calc_loc.cxx b/src/Airports/calc_loc.cxx index c94fa3a16..4974f0af2 100644 --- a/src/Airports/calc_loc.cxx +++ b/src/Airports/calc_loc.cxx @@ -10,7 +10,7 @@ #include #include -#include STL_STRING +#include #include diff --git a/src/Airports/dynamics.cxx b/src/Airports/dynamics.cxx index 4cb904abf..868c45cea 100644 --- a/src/Airports/dynamics.cxx +++ b/src/Airports/dynamics.cxx @@ -40,7 +40,7 @@ #include
#include -#include STL_STRING +#include #include SG_USING_STD(string); diff --git a/src/Airports/groundnetwork.cxx b/src/Airports/groundnetwork.cxx index 1f2f0fcab..a4cefee0d 100644 --- a/src/Airports/groundnetwork.cxx +++ b/src/Airports/groundnetwork.cxx @@ -43,7 +43,7 @@ #include -//#include STL_STRING +//#include #include "groundnetwork.hxx" diff --git a/src/Airports/groundnetwork.hxx b/src/Airports/groundnetwork.hxx index 33adb7a13..ae9aa4d20 100644 --- a/src/Airports/groundnetwork.hxx +++ b/src/Airports/groundnetwork.hxx @@ -27,7 +27,7 @@ #include #include -#include STL_STRING +#include #include SG_USING_STD(string); diff --git a/src/Airports/parking.cxx b/src/Airports/parking.cxx index ce3181fa4..525241d59 100644 --- a/src/Airports/parking.cxx +++ b/src/Airports/parking.cxx @@ -43,7 +43,7 @@ //#include
//#include -#include STL_STRING +#include #include "parking.hxx" #include "groundnetwork.hxx" diff --git a/src/Airports/parking.hxx b/src/Airports/parking.hxx index 908acf029..5ff130b82 100644 --- a/src/Airports/parking.hxx +++ b/src/Airports/parking.hxx @@ -31,7 +31,7 @@ #include -#include STL_STRING +#include #include #include "gnnode.hxx" diff --git a/src/Airports/runways.cxx b/src/Airports/runways.cxx index c1b224522..726b46433 100644 --- a/src/Airports/runways.cxx +++ b/src/Airports/runways.cxx @@ -33,12 +33,11 @@ #include #include
-#include STL_STRING +#include #include #include "runways.hxx" -SG_USING_NAMESPACE(std); SG_USING_STD(istream); SG_USING_STD(multimap); diff --git a/src/Airports/runways.hxx b/src/Airports/runways.hxx index 2dcc79655..6dcf4e76d 100644 --- a/src/Airports/runways.hxx +++ b/src/Airports/runways.hxx @@ -36,7 +36,7 @@ #include -#include STL_STRING +#include #include SG_USING_STD(string); diff --git a/src/Airports/simple.cxx b/src/Airports/simple.cxx index 486ad5fbc..5c9330bd5 100644 --- a/src/Airports/simple.cxx +++ b/src/Airports/simple.cxx @@ -47,7 +47,7 @@ #include
#include -#include STL_STRING +#include #include "simple.hxx" #include "xmlloader.hxx" diff --git a/src/Airports/simple.hxx b/src/Airports/simple.hxx index 6d9aceefe..0b562424c 100644 --- a/src/Airports/simple.hxx +++ b/src/Airports/simple.hxx @@ -40,7 +40,7 @@ #include -#include STL_STRING +#include #include #include #include diff --git a/src/Autopilot/route_mgr.hxx b/src/Autopilot/route_mgr.hxx index 0c02c2cdc..4b25c4e09 100644 --- a/src/Autopilot/route_mgr.hxx +++ b/src/Autopilot/route_mgr.hxx @@ -34,7 +34,7 @@ #include -#include STL_STRING +#include #include SG_USING_STD(string); diff --git a/src/Autopilot/xmlauto.hxx b/src/Autopilot/xmlauto.hxx index b32530279..ad206b5a2 100644 --- a/src/Autopilot/xmlauto.hxx +++ b/src/Autopilot/xmlauto.hxx @@ -34,7 +34,7 @@ #include -#include STL_STRING +#include #include #include diff --git a/src/Cockpit/hud.cxx b/src/Cockpit/hud.cxx index 703dbbc5f..ad5165959 100644 --- a/src/Cockpit/hud.cxx +++ b/src/Cockpit/hud.cxx @@ -23,8 +23,8 @@ #include #include -#include STL_STRING -#include STL_FSTREAM +#include +#include #ifdef HAVE_CONFIG_H # include diff --git a/src/Cockpit/hud.hxx b/src/Cockpit/hud.hxx index 0977acb2d..0e33f411a 100644 --- a/src/Cockpit/hud.hxx +++ b/src/Cockpit/hud.hxx @@ -48,7 +48,7 @@ #include // for_each() #include // STL vector #include // STL double ended queue -#include STL_FSTREAM +#include #include @@ -69,7 +69,6 @@ SG_USING_STD(deque); SG_USING_STD(vector); -SG_USING_NAMESPACE(std); #define float_to_int(v) SGMiscf::roundToInt(v) diff --git a/src/Cockpit/panel_io.cxx b/src/Cockpit/panel_io.cxx index 9461544de..37b383ed9 100644 --- a/src/Cockpit/panel_io.cxx +++ b/src/Cockpit/panel_io.cxx @@ -35,8 +35,8 @@ #include #include -#include STL_FSTREAM -#include STL_STRING +#include +#include #include
#include
diff --git a/src/Cockpit/panel_io.hxx b/src/Cockpit/panel_io.hxx index 3f604828d..0cb6df674 100644 --- a/src/Cockpit/panel_io.hxx +++ b/src/Cockpit/panel_io.hxx @@ -32,7 +32,7 @@ #include #include -#include STL_STRING +#include class FGPanel; diff --git a/src/Environment/atmosphere.hxx b/src/Environment/atmosphere.hxx index 68e64202d..12df63327 100644 --- a/src/Environment/atmosphere.hxx +++ b/src/Environment/atmosphere.hxx @@ -28,11 +28,7 @@ #include #include -#ifdef SG_HAVE_STD_INCLUDES -# include -#else -# include -#endif +#include using namespace std; diff --git a/src/Environment/environment.hxx b/src/Environment/environment.hxx index c3794f901..c952141bd 100644 --- a/src/Environment/environment.hxx +++ b/src/Environment/environment.hxx @@ -26,12 +26,7 @@ #include -#ifdef SG_HAVE_STD_INCLUDES -# include -#else -# include -#endif - +#include /** * Model the natural environment. diff --git a/src/Environment/environment_ctrl.hxx b/src/Environment/environment_ctrl.hxx index ace7af410..fb042a152 100644 --- a/src/Environment/environment_ctrl.hxx +++ b/src/Environment/environment_ctrl.hxx @@ -36,12 +36,7 @@ # include #endif -#ifdef SG_HAVE_STD_INCLUDES -# include -#else -# include -#endif - +#include #include #include diff --git a/src/Environment/fgclouds.hxx b/src/Environment/fgclouds.hxx index fd2a45a9c..8a14f7f6f 100644 --- a/src/Environment/fgclouds.hxx +++ b/src/Environment/fgclouds.hxx @@ -30,7 +30,7 @@ #include #include
-#include STL_STRING +#include SG_USING_STD(string); diff --git a/src/FDM/Balloon.h b/src/FDM/Balloon.h deleted file mode 100644 index 02bef167c..000000000 --- a/src/FDM/Balloon.h +++ /dev/null @@ -1,87 +0,0 @@ -/***************************************************************************** - - Header: BalloonSimInterface.h - Author: Christian Mayer - Date started: 07.10.99 - - -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) -------- - - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Further information about the GNU General Public License can also be found on - the world wide web at http://www.gnu.org. - -FUNCTIONAL DESCRIPTION ------------------------------------------------------------------------------- -interface to the the hot air balloon simulator - -HISTORY ------------------------------------------------------------------------------- -07.10.1999 Christian Mayer Created -*****************************************************************************/ - -/****************************************************************************/ -/* SENTRY */ -/****************************************************************************/ -#ifndef BalloonSimInterface_H -#define BalloonSimInterface_H - -/****************************************************************************/ -/* INCLUDES */ -/****************************************************************************/ -#include - -#include - -#include "flight.hxx" - -/****************************************************************************/ -/* DEFINES */ -/****************************************************************************/ - -/****************************************************************************/ -/* DECLARATIONS */ -/****************************************************************************/ - - -class FGBalloonSim: public FGInterface { - - balloon current_balloon; - -public: - - FGBalloonSim( double dt ); - ~FGBalloonSim(); - - // copy FDM state to BalloonSim structures - bool copy_to_BalloonSim(); - - // copy FDM state from BalloonSim structures - bool copy_from_BalloonSim(); - - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); -}; - - -/****************************************************************************/ -#endif /*BalloonSimInterface_H*/ - - - - diff --git a/src/FDM/Balloon/.cvsignore b/src/FDM/Balloon/.cvsignore deleted file mode 100644 index e99558847..000000000 --- a/src/FDM/Balloon/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -.deps -Makefile -Makefile.in diff --git a/src/FDM/Balloon/BalloonSim.cpp b/src/FDM/Balloon/BalloonSim.cpp deleted file mode 100644 index a966d6cbb..000000000 --- a/src/FDM/Balloon/BalloonSim.cpp +++ /dev/null @@ -1,345 +0,0 @@ -/***************************************************************************** - - Module: BalloonSim.cpp - Author: Christian Mayer - Date started: 01.09.99 - Called by: - - -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) -------- - - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Further information about the GNU General Public License can also be found on - the world wide web at http://www.gnu.org. - -FUNCTIONAL DESCRIPTION ------------------------------------------------------------------------------- -A hot air balloon simulator - -HISTORY ------------------------------------------------------------------------------- -01.09.1999 Christian Mayer Created -03.10.1999 Christian Mayer cleaned the code by moveing WeatherDatabase - calls inside the update() -*****************************************************************************/ - -/****************************************************************************/ -/* INCLUDES */ -/****************************************************************************/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -// #include -#include - -#include - -#include - -#include "BalloonSim.h" - -#include - -/****************************************************************************/ -/********************************** CODE ************************************/ -/****************************************************************************/ - -/****************************************************************************/ -/* */ -/* Constructor: */ -/* Set the balloon model to some values that seem reasonable as I haven't */ -/* got much original values */ -/* */ -/****************************************************************************/ -balloon::balloon() -{ - dt = 0.1; - ground_level = 3400.0; - - sgSetVec3(gravity_vector, 0.0, 0.0, -9.81); - sgSetVec3(velocity, 0.0, 0.0, 0.0); - sgSetVec3(position, 0.0, 0.0, 0.0); - sgSetVec3(hpr, 0.0, 0.0, 0.0); - - /************************************************************************/ - /* My balloon has a radius of 8.8 metres as that gives a envelope */ - /* volume of about 2854 m^3 which is about 77000 ft^3, a very common */ - /* size for hot air balloons */ - /************************************************************************/ - - balloon_envelope_area = 4.0 * (8.8 * 8.8) * SGD_PI; - balloon_envelope_volume = (4.0/3.0) * (8.8 * 8.8 * 8.8) * SGD_PI; - - wind_facing_area_of_balloon = SGD_PI * (8.8 * 8.8); - wind_facing_area_of_basket = 2.0; //guessed: 2 m^2 - - cw_envelope=0.45; //a sphere in this case - cw_basket=0.8; - - weight_of_total_fuel = 40.0; //big guess - weight_of_envelope = 200.0; //big guess - weight_of_basket = 40.0; //big guess - weight_of_cargo = 750.0; //big guess - - fuel_left=1.0; - max_flow_of_fuel_per_second=10.0*1.0/3600.0; //assuming 10% of one hour of total burn time - current_burner_strength = 0.0; //the throttle - - lambda = 0.15; //for plasic - l_of_the_envelope = 1.0/1000.0; //the thickness of the envelope (in m): 1mm - - T = 273.16 + 130.6; //Temperature in the envelope => still at ground level -} - -void balloon::update() -{ - /************************************************************************/ - /* I'm simplifying the balloon by reducing the simulation to two */ - /* points: */ - /* the center of the basket (CB) and the center of the envelope (CE) */ - /* */ - /* ce */ - /* I */ - /* I */ - /* cg (=center of gravity) */ - /* I */ - /* cb */ - /* */ - /* On each center are forces acting: gravity and wind resitance. CE */ - /* additionally got the lift (=> I need to calculate the weight of the */ - /* air inside, too) */ - /* */ - /* The weight of the air in the envelope is dependant of the tempera- */ - /* ture. This temperature is decreasing over the time that is dependant */ - /* of the insulation of the envelope material (lambda), the gas used */ - /* (air) and the wind speed. For a plane surface it's for air: */ - /* */ - /* alpha = 4.8 + 3.4*v with v < 5.0 m/s */ - /* */ - /* The value k that takes all of that into account is defined as: */ - /* */ - /* 1 / k = 1 / alpha1 + 1 / alpha2 + l / lambda */ - /* */ - /* with 'l' beeing the 'length' i.e. thickness of the insulator, alpha1 */ - /* the air inside and alpha2 the air outside of the envelope. So our k */ - /* is: */ - /* */ - /* k = 1 / [1/4.8 + 1/(4.8+3.4v) + l/lambda] */ - /* */ - /* The energy lost by this process is defined as: */ - /* */ - /* dQ = k * A * t * dT */ - /* */ - /* with Q being the energy, k that value defined above, A the total */ - /* area of the envelope, t the time (in hours) and dT the temperature */ - /* difference between the inside and the outside. */ - /* To get the temperature of the air in the inside I need the formula: */ - /* */ - /* dQ = cAir * m * dT */ - /* */ - /* with cAir being the specific heat capacity(?) of air (= 1.00 kcal / */ - /* kg * degree), m the mass of the air and dT the temperature change. */ - /* As the envelope is open I'm assuming that the same air pressure is */ - /* inside and outside of it (practical there should be a slightly */ - /* higher air pressure in the inside or the envelope would collapse). */ - /* So it's easy to calculate the density of the air inside: */ - /* */ - /* rho = p / R * T */ - /* */ - /* with p being the pressure, R the gas constant(?) which is for air */ - /* 287.14 N * m / kg * K and T the absolute temperature. */ - /* */ - /* The value returned by this function is the displacement of the CB */ - /************************************************************************/ - - /************************************************************************/ - /* NOTE: This is the simplified version: I'm assuming that the whole */ - /* balloon consists only of the envelope.I will improove the simulation */ - /* later, but currently was my main concern to get it going... */ - /************************************************************************/ - - // I realy don't think there is a solution for this without WeatherCM - // but this is a hack, and it's working -- EMH - double mAir = 1; - float Q = 0; - - // gain of energy by heating: - if (fuel_left > 0.0) //but only with some fuel left ;-) - { - float fuel_burning = current_burner_strength * max_flow_of_fuel_per_second * dt * weight_of_total_fuel; //in kg - - //convert to cubemetres (I'm wrongly assuming 'normal' conditions; but that's correct for my special case) - float cube_metres_burned = fuel_burning / 2.2; //2.2 is the density for propane - - fuel_left -= fuel_burning / weight_of_total_fuel; - - // get energy through burning. - Q += 22250.0 * cube_metres_burned; //22250 for propan, 29500 would be butane and if you dare: 2580 would be hydrogen... - } - - // calculate the new temperature in the inside: - T += Q / (1.00 * mAir); - - //calculate the masses of the envelope and the basket - float mEnvelope = mAir + weight_of_envelope; - float mBasket = weight_of_total_fuel*fuel_left + weight_of_basket + weight_of_cargo; - - float mTotal = mEnvelope + mBasket; - - //calulate the forces - sgVec3 fTotal, fFriction, fLift; - - sgScaleVec3(fTotal, gravity_vector, mTotal); - - //sgAddVec3(fTotal, fLift); //FIXME: uninitialized fLift - //sgAddVec3(fTotal, fFriction); //FIXME: uninitialized fFriction - - //claculate acceleration: a = F / m - sgVec3 aTotal, vTotal, dTotal; - - sgScaleVec3(aTotal, fTotal, 1.0 / mTotal); - - //integrate the displacement: d = 0.5 * a * dt**2 + v * dt + d - sgScaleVec3(vTotal, velocity, dt); - sgScaleVec3(dTotal, aTotal, 0.5*dt*dt); sgAddVec3(dTotal, vTotal); - - //integrate the velocity to 'velocity': v = a * dt + v - sgScaleVec3(vTotal, aTotal, dt); sgAddVec3(velocity, vTotal); - - /************************************************************************/ - /* VERY WRONG STUFF: it's just here to get some results to start with */ - /************************************************************************/ - - // care for the ground - if (position[2] < (ground_level+0.001) ) - position[2] = ground_level; - - //return results - sgAddVec3(position, dTotal); - - //cout << "BallonSim: T: " << (T-273.16) << " alt: " << position[2] << " ground: " << ground_level << " throttle: " << current_burner_strength << "\n"; -} - -void balloon::set_burner_strength(const float bs) -{ - if ((bs>=0.0) && (bs<=1.0)) - current_burner_strength = bs; -} - -void balloon::getVelocity(sgVec3 v) const -{ - sgCopyVec3(v, velocity); -} - -void balloon::setVelocity(const sgVec3 v) -{ - sgCopyVec3(velocity, v); -} - -void balloon::getPosition(sgVec3 v) const -{ - sgCopyVec3(v, position); -} - -void balloon::setPosition(const sgVec3 v) -{ - sgCopyVec3(position, v); -} - -void balloon::getHPR(sgVec3 angles) const //the balloon isn't allways exactly vertical -{ - sgCopyVec3(angles, hpr); -} - -void balloon::setHPR(const sgVec3 angles) //the balloon isn't allways exactly vertical -{ - sgCopyVec3(hpr, angles); -} - -void balloon::setGroundLevel(const float altitude) -{ - ground_level = altitude; -} - -float balloon::getTemperature(void) const -{ - return T; -} - -float balloon::getFuelLeft(void) const -{ - return fuel_left; -} - -/* -void main(void) -{ - bool burner = true; - balloon bal; - bool exit = false; - sgVec3 pos={0.0, 0.0, 0.0}; - char c; - float acc_dt = 0.0; - float alt; - -bool hysteresis = false; // moving up - for (;!exit;) - { - for (int i=0; i<100; i++) - { - bal.update(0.1); acc_dt += 0.1; - bal.getPosition(pos); - alt = pos[2]; - - if (alt > 3010) - { - hysteresis = true; - burner = false; - } - if ((alt < 2990) && (hysteresis == true)) - { - hysteresis = false; - burner = true; - } - if ((bal.getTemperature()-273.16)>250.0) - burner = false; //emergency - } - - // toogle burner - c = getch(); - if (c==' ') - burner=!burner; - //if (c=='s') - // show=!show; - - //printf("Position: (%f/%f/%f), dP: (%f/%f/%f), burner: ", pos[0], pos[1], pos[2], dp[0], dp[1], dp[2]); - printf("%f \t%f \t%f \t%f\n", acc_dt/60.0, bal.getTemperature()-273.16, pos[2], bal.getFuelLeft()); - if (burner==true) - { - //printf("on\n"); - bal.set_burner_strength(1.0); - } - else - { - //printf("off\n"); - bal.set_burner_strength(0.0); - } - - } -} -*/ diff --git a/src/FDM/Balloon/BalloonSim.h b/src/FDM/Balloon/BalloonSim.h deleted file mode 100644 index d424fc697..000000000 --- a/src/FDM/Balloon/BalloonSim.h +++ /dev/null @@ -1,115 +0,0 @@ -/***************************************************************************** - - Header: BalloonSim.h - Author: Christian Mayer - Date started: 01.09.99 - - -------- Copyright (C) 1999 Christian Mayer (fgfs@christianmayer.de) -------- - - This program is free software; you can redistribute it and/or modify it under - the terms of the GNU General Public License as published by the Free Software - Foundation; either version 2 of the License, or (at your option) any later - version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - Further information about the GNU General Public License can also be found on - the world wide web at http://www.gnu.org. - -FUNCTIONAL DESCRIPTION ------------------------------------------------------------------------------- -Header for the hot air balloon simulator - -HISTORY ------------------------------------------------------------------------------- -01.09.1999 Christian Mayer Created -03.10.1999 Christian Mayer cleaned the code by moveing WeatherDatabase - calls inside the update() -*****************************************************************************/ - -/****************************************************************************/ -/* SENTRY */ -/****************************************************************************/ -#ifndef BalloonSim_H -#define BalloonSim_H - -/****************************************************************************/ -/* INCLUDES */ -/****************************************************************************/ -#include - -/****************************************************************************/ -/* DEFINES */ -/****************************************************************************/ - -/****************************************************************************/ -/* CLASS DECLARATION */ -/****************************************************************************/ -class balloon -{ -private: - float dt; //in s - - sgVec3 gravity_vector; //in m/s*s - sgVec3 hpr; //the balloon isn't allways exactly vertical (e.g. during gusts); normalized - sgVec3 velocity; //current velocity; it gets iterated at each 'update' - sgVec3 position; //current position in lat/lon/alt - - float balloon_envelope_area; //area of the envelope - float balloon_envelope_volume; //volume of the envelope - - float wind_facing_area_of_balloon; - float wind_facing_area_of_basket; - - float cw_envelope; //wind resistance of the envelope - float cw_basket; //wind resistance of the bakset - - //all weights in kg - float weight_of_total_fuel; - float weight_of_envelope; - float weight_of_basket; //weight of all the unmovable stuff such as the basket, the burner and the empty tanks - float weight_of_cargo; //passengers and anything left (e.g. sand bags that are thrown away to give additional lift) - - float fuel_left; //as a percentage - float max_flow_of_fuel_per_second; //in percent per second - float current_burner_strength; - - float lambda; //waermeuebergangskoeffizient (heat transmission coefficent?!?) for the envelope - float l_of_the_envelope; //the thickness of the envelope (in m) - - float T; //tempereature inside the balloon - - float ground_level; - -public: - balloon(); //constructor for initializing the balloon - - void update(); //dt = time in seconds since last call - void set_burner_strength(const float bs); - - void getVelocity(sgVec3 v) const; - void setVelocity(const sgVec3 v); - - void getPosition(sgVec3 v) const; - void setPosition(const sgVec3 v); - - void getHPR(sgVec3 angles) const; //the balloon isn't allways exactly vertical - void setHPR(const sgVec3 angles); //the balloon isn't allways exactly vertical - - void setGroundLevel(const float altitude); - - float getTemperature(void) const; - float getFuelLeft(void) const; - - void set_dt(const float new_dt) { dt = new_dt; } -}; - -/****************************************************************************/ -#endif /*BalloonSim_H*/ diff --git a/src/FDM/Balloon/Makefile.am b/src/FDM/Balloon/Makefile.am deleted file mode 100644 index 760ff1884..000000000 --- a/src/FDM/Balloon/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -noinst_LIBRARIES = libBalloon.a - -libBalloon_a_SOURCES = BalloonSim.cpp BalloonSim.h - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src diff --git a/src/FDM/JSBSim/JSBSim.cxx b/src/FDM/JSBSim/JSBSim.cxx index 667a54b5d..61a51fcf3 100644 --- a/src/FDM/JSBSim/JSBSim.cxx +++ b/src/FDM/JSBSim/JSBSim.cxx @@ -29,7 +29,7 @@ #include // size_t -#include STL_STRING +#include #include #include diff --git a/src/FDM/LaRCsim/IO360.cxx b/src/FDM/LaRCsim/IO360.cxx index 25359089a..3b1090090 100644 --- a/src/FDM/LaRCsim/IO360.cxx +++ b/src/FDM/LaRCsim/IO360.cxx @@ -23,8 +23,8 @@ #include -#include STL_FSTREAM -#include STL_IOSTREAM +#include +#include #include
diff --git a/src/FDM/LaRCsim/LaRCsimIC.cxx b/src/FDM/LaRCsim/LaRCsimIC.cxx index ec867dbf3..47a2b4706 100644 --- a/src/FDM/LaRCsim/LaRCsimIC.cxx +++ b/src/FDM/LaRCsim/LaRCsimIC.cxx @@ -28,7 +28,7 @@ #include #include -#include STL_IOSTREAM +#include #include "ls_cockpit.h" #include "ls_generic.h" diff --git a/src/FDM/MagicCarpet.cxx b/src/FDM/MagicCarpet.cxx deleted file mode 100644 index f11573edf..000000000 --- a/src/FDM/MagicCarpet.cxx +++ /dev/null @@ -1,121 +0,0 @@ -// MagicCarpet.cxx -- interface to the "Magic Carpet" flight model -// -// Written by Curtis Olson, started October 1999. -// -// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// $Id$ - - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include -#include - -#include -#include
-#include
- -#include "MagicCarpet.hxx" - - -FGMagicCarpet::FGMagicCarpet( double dt ) { -// set_delta_t( dt ); -} - - -FGMagicCarpet::~FGMagicCarpet() { -} - - -// Initialize the Magic Carpet flight model, dt is the time increment -// for each subsequent iteration through the EOM -void FGMagicCarpet::init() { - common_init(); -} - - -// Run an iteration of the EOM (equations of motion) -void FGMagicCarpet::update( double dt ) { - // cout << "FGLaRCsim::update()" << endl; - - if (is_suspended()) - return; - - // int multiloop = _calc_multiloop(dt); - - double time_step = dt; - - // speed and distance traveled - double speed = globals->get_controls()->get_throttle( 0 ) * 2000; // meters/sec - if ( globals->get_controls()->get_brake_left() > 0.0 - || globals->get_controls()->get_brake_right() > 0.0 ) - { - speed = -speed; - } - - double dist = speed * time_step; - double kts = speed * SG_METER_TO_NM * 3600.0; - _set_V_equiv_kts( kts ); - _set_V_calibrated_kts( kts ); - _set_V_ground_speed( kts ); - - // angle of turn - double turn_rate = globals->get_controls()->get_aileron() * SGD_PI_4; // radians/sec - double turn = turn_rate * time_step; - - // update euler angles - _set_Euler_Angles( get_Phi(), get_Theta(), - fmod(get_Psi() + turn, SGD_2PI) ); - _set_Euler_Rates(0,0,0); - - // update (lon/lat) position - double lat2, lon2, az2; - if ( fabs( speed ) > SG_EPSILON ) { - geo_direct_wgs_84 ( get_Altitude(), - get_Latitude() * SGD_RADIANS_TO_DEGREES, - get_Longitude() * SGD_RADIANS_TO_DEGREES, - get_Psi() * SGD_RADIANS_TO_DEGREES, - dist, &lat2, &lon2, &az2 ); - - _set_Longitude( lon2 * SGD_DEGREES_TO_RADIANS ); - _set_Latitude( lat2 * SGD_DEGREES_TO_RADIANS ); - } - - // cout << "lon error = " << fabs(end.x()*SGD_RADIANS_TO_DEGREES - lon2) - // << " lat error = " << fabs(end.y()*SGD_RADIANS_TO_DEGREES - lat2) - // << endl; - - double sl_radius, lat_geoc; - sgGeodToGeoc( get_Latitude(), get_Altitude(), &sl_radius, &lat_geoc ); - - // update altitude - double real_climb_rate = -globals->get_controls()->get_elevator() * 5000; // feet/sec - _set_Climb_Rate( real_climb_rate / 500.0 ); - double climb = real_climb_rate * time_step; - - _set_Geocentric_Position( lat_geoc, get_Longitude(), - sl_radius + get_Altitude() + climb ); - // cout << "sea level radius (ft) = " << sl_radius << endl; - // cout << "(setto) sea level radius (ft) = " << get_Sea_level_radius() << endl; - _update_ground_elev_at_pos(); - _set_Sea_level_radius( sl_radius * SG_METER_TO_FEET); - _set_Altitude( get_Altitude() + climb ); -} diff --git a/src/FDM/MagicCarpet.hxx b/src/FDM/MagicCarpet.hxx deleted file mode 100644 index 60e694025..000000000 --- a/src/FDM/MagicCarpet.hxx +++ /dev/null @@ -1,46 +0,0 @@ -// MagicCarpet.hxx -- interface to the "Magic Carpet" flight model -// -// Written by Curtis Olson, started October 1999. -// -// Copyright (C) 1999 Curtis L. Olson - http://www.flightgear.org/~curt -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License as -// published by the Free Software Foundation; either version 2 of the -// License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, but -// WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -// -// $Id$ - - -#ifndef _MAGICCARPET_HXX -#define _MAGICCARPET_HXX - - -#include "flight.hxx" - - -class FGMagicCarpet: public FGInterface { - -public: - FGMagicCarpet( double dt ); - ~FGMagicCarpet(); - - // reset flight params to a specific position - void init(); - - // update position based on inputs, positions, velocities, etc. - void update( double dt ); - -}; - - -#endif // _MAGICCARPET_HXX diff --git a/src/FDM/Makefile.am b/src/FDM/Makefile.am index dfb7f278e..04e9ff8f4 100644 --- a/src/FDM/Makefile.am +++ b/src/FDM/Makefile.am @@ -4,16 +4,14 @@ else SP_DIR = endif -SUBDIRS = Balloon JSBSim LaRCsim UIUCModel YASim \ +SUBDIRS = JSBSim LaRCsim UIUCModel YASim \ $(SP_DIR) ExternalNet ExternalPipe noinst_LIBRARIES = libFlight.a libFlight_a_SOURCES = \ - Balloon.cxx Balloon.h \ flight.cxx flight.hxx \ groundcache.cxx groundcache.hxx \ - MagicCarpet.cxx MagicCarpet.hxx \ UFO.cxx UFO.hxx \ NullFDM.cxx NullFDM.hxx diff --git a/src/FDM/SP/Makefile.am b/src/FDM/SP/Makefile.am index f0295e518..7271c3c69 100644 --- a/src/FDM/SP/Makefile.am +++ b/src/FDM/SP/Makefile.am @@ -3,6 +3,9 @@ noinst_LIBRARIES = libSPFDM.a libSPFDM_a_SOURCES = \ ADA.cxx ADA.hxx \ - ACMS.cxx ACMS.hxx + ACMS.cxx ACMS.hxx \ + Balloon.cxx Balloon.h \ + BalloonSim.cpp BalloonSim.h \ + MagicCarpet.cxx MagicCarpet.hxx INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src diff --git a/src/FDM/UIUCModel/uiuc_controlInput.cpp b/src/FDM/UIUCModel/uiuc_controlInput.cpp index ab007a69c..b18a77c4e 100644 --- a/src/FDM/UIUCModel/uiuc_controlInput.cpp +++ b/src/FDM/UIUCModel/uiuc_controlInput.cpp @@ -73,7 +73,7 @@ #include "uiuc_controlInput.h" -#include STL_IOSTREAM +#include void uiuc_controlInput() { diff --git a/src/FDM/UIUCModel/uiuc_menu.cpp b/src/FDM/UIUCModel/uiuc_menu.cpp index c53d3a1c1..f2917ebf8 100644 --- a/src/FDM/UIUCModel/uiuc_menu.cpp +++ b/src/FDM/UIUCModel/uiuc_menu.cpp @@ -162,7 +162,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_CD.cpp b/src/FDM/UIUCModel/uiuc_menu_CD.cpp index 345fa06c4..e88f1ea7c 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CD.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CD.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_CD.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_CL.cpp b/src/FDM/UIUCModel/uiuc_menu_CL.cpp index ff16c2444..d8cf1c8da 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CL.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CL.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_CL.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_CY.cpp b/src/FDM/UIUCModel/uiuc_menu_CY.cpp index f0dd8e9e6..283aafdd0 100644 --- a/src/FDM/UIUCModel/uiuc_menu_CY.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_CY.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_CY.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_Cm.cpp b/src/FDM/UIUCModel/uiuc_menu_Cm.cpp index bbd17a774..4c16d6247 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cm.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Cm.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_Cm.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_Cn.cpp b/src/FDM/UIUCModel/uiuc_menu_Cn.cpp index 38f4cb961..5592c0afb 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Cn.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Cn.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_Cn.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_Croll.cpp b/src/FDM/UIUCModel/uiuc_menu_Croll.cpp index 36b52c1c0..9f8bcad3e 100644 --- a/src/FDM/UIUCModel/uiuc_menu_Croll.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_Croll.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_Croll.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp b/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp index f19533111..8a5b5f2f0 100644 --- a/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_controlSurface.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_controlSurface.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_engine.cpp b/src/FDM/UIUCModel/uiuc_menu_engine.cpp index e42867c8f..e9d2ddc3f 100644 --- a/src/FDM/UIUCModel/uiuc_menu_engine.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_engine.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_engine.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_fog.cpp b/src/FDM/UIUCModel/uiuc_menu_fog.cpp index 81a689684..4af9238be 100644 --- a/src/FDM/UIUCModel/uiuc_menu_fog.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_fog.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_fog.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_gear.cpp b/src/FDM/UIUCModel/uiuc_menu_gear.cpp index 994f7c07a..a72bff72c 100644 --- a/src/FDM/UIUCModel/uiuc_menu_gear.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_gear.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_gear.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_geometry.cpp b/src/FDM/UIUCModel/uiuc_menu_geometry.cpp index e6d808e1b..8fd5a94fe 100644 --- a/src/FDM/UIUCModel/uiuc_menu_geometry.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_geometry.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_geometry.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_ice.cpp b/src/FDM/UIUCModel/uiuc_menu_ice.cpp index fc17682da..df16cb518 100644 --- a/src/FDM/UIUCModel/uiuc_menu_ice.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_ice.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_ice.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_init.cpp b/src/FDM/UIUCModel/uiuc_menu_init.cpp index 2884eeedb..c58060a2d 100644 --- a/src/FDM/UIUCModel/uiuc_menu_init.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_init.cpp @@ -76,7 +76,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_init.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_mass.cpp b/src/FDM/UIUCModel/uiuc_menu_mass.cpp index df45eff97..a0c2029c3 100644 --- a/src/FDM/UIUCModel/uiuc_menu_mass.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_mass.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_mass.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_misc.cpp b/src/FDM/UIUCModel/uiuc_menu_misc.cpp index cc2a270cb..2a38efc4d 100644 --- a/src/FDM/UIUCModel/uiuc_menu_misc.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_misc.cpp @@ -75,7 +75,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_misc.h" diff --git a/src/FDM/UIUCModel/uiuc_menu_record.cpp b/src/FDM/UIUCModel/uiuc_menu_record.cpp index 0634a8848..5b62e146f 100644 --- a/src/FDM/UIUCModel/uiuc_menu_record.cpp +++ b/src/FDM/UIUCModel/uiuc_menu_record.cpp @@ -78,7 +78,7 @@ #include #include -#include STL_IOSTREAM +#include #include "uiuc_menu_record.h" diff --git a/src/FDM/UIUCModel/uiuc_parsefile.h b/src/FDM/UIUCModel/uiuc_parsefile.h index 017938421..911f3ef27 100644 --- a/src/FDM/UIUCModel/uiuc_parsefile.h +++ b/src/FDM/UIUCModel/uiuc_parsefile.h @@ -5,7 +5,7 @@ #include #include -#include STL_FSTREAM +#include SG_USING_STD(list); SG_USING_STD(string); diff --git a/src/FDM/YASim/Rotor.cpp b/src/FDM/YASim/Rotor.cpp index 5e2bf4b4c..4908f24f3 100644 --- a/src/FDM/YASim/Rotor.cpp +++ b/src/FDM/YASim/Rotor.cpp @@ -8,8 +8,8 @@ #include "Ground.hpp" #include "Rotor.hpp" -#include STL_IOSTREAM -#include STL_IOMANIP +#include +#include SG_USING_STD(setprecision); diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index de40bda0e..5b462db68 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -42,8 +42,8 @@ # include #endif -#include STL_FSTREAM -#include STL_STRING +#include +#include #include #include diff --git a/src/GUI/mouse.cxx b/src/GUI/mouse.cxx index c6abe3585..de12a666e 100644 --- a/src/GUI/mouse.cxx +++ b/src/GUI/mouse.cxx @@ -40,7 +40,7 @@ # include #endif -#include STL_STRING +#include #include #include diff --git a/src/GUI/property_list.cxx b/src/GUI/property_list.cxx index 5aa1e3dba..ae709d290 100644 --- a/src/GUI/property_list.cxx +++ b/src/GUI/property_list.cxx @@ -28,9 +28,9 @@ #include #include -#include STL_IOMANIP +#include #include -#include STL_STRING +#include SG_USING_STD(string); using std::cout; diff --git a/src/Input/fgjs.cxx b/src/Input/fgjs.cxx index 4d1dc33bb..726aabbea 100644 --- a/src/Input/fgjs.cxx +++ b/src/Input/fgjs.cxx @@ -34,9 +34,9 @@ #include -#include STL_IOSTREAM -#include STL_FSTREAM -#include STL_STRING +#include +#include +#include SG_USING_STD(fstream); SG_USING_STD(cout); diff --git a/src/Input/input.cxx b/src/Input/input.cxx index f4168b55d..5db934f74 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -34,8 +34,8 @@ #include #include -#include STL_FSTREAM -#include STL_STRING +#include +#include #include #include diff --git a/src/Input/jsinput.cxx b/src/Input/jsinput.cxx index ac7e4669f..6f6a9eda4 100644 --- a/src/Input/jsinput.cxx +++ b/src/Input/jsinput.cxx @@ -20,7 +20,7 @@ #include -#include STL_IOSTREAM +#include SG_USING_STD(cout); SG_USING_STD(cin); diff --git a/src/Instrumentation/HUD/HUD.cxx b/src/Instrumentation/HUD/HUD.cxx index 45e59754d..28fe5d994 100644 --- a/src/Instrumentation/HUD/HUD.cxx +++ b/src/Instrumentation/HUD/HUD.cxx @@ -22,8 +22,8 @@ #include #include -#include STL_STRING -#include STL_FSTREAM +#include +#include #ifdef HAVE_CONFIG_H # include diff --git a/src/Instrumentation/HUD/HUD.hxx b/src/Instrumentation/HUD/HUD.hxx index af8816d47..a6d95bdb3 100644 --- a/src/Instrumentation/HUD/HUD.hxx +++ b/src/Instrumentation/HUD/HUD.hxx @@ -31,11 +31,10 @@ #include #include -#include STL_FSTREAM +#include SG_USING_STD(deque); SG_USING_STD(vector); -SG_USING_NAMESPACE(std); #include @@ -174,7 +173,7 @@ public: protected: void common_draw(); int load(const char *, float x = 320.0f, float y = 240.0f, - int level = 0, const string& indent = ""); + int level = 0, const std::string& indent = ""); private: void draw3D(); @@ -338,7 +337,7 @@ protected: void draw_bullet(float, float, float); HUD *_hud; - string _name; + std::string _name; int _options; float _x, _y, _w, _h; float _center_x, _center_y; @@ -362,7 +361,7 @@ private: Input _input; Format _mode; - string _format; + std::string _format; int _halign; // HUDText alignment int _blink; bool _box; @@ -438,7 +437,7 @@ private: float _label_gap; bool _pointer; Format _label_fmt; - string _format; + std::string _format; int _div_ratio; // _major_divs/_minor_divs bool _odd_type; // whether to put numbers at 0/2/4 or 1/3/5 diff --git a/src/Instrumentation/attitude_indicator.cxx b/src/Instrumentation/attitude_indicator.cxx index 4753afd0a..ca450cf66 100644 --- a/src/Instrumentation/attitude_indicator.cxx +++ b/src/Instrumentation/attitude_indicator.cxx @@ -8,8 +8,8 @@ #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include // fabs() diff --git a/src/Instrumentation/heading_indicator.cxx b/src/Instrumentation/heading_indicator.cxx index a7e96e550..b92d99086 100644 --- a/src/Instrumentation/heading_indicator.cxx +++ b/src/Instrumentation/heading_indicator.cxx @@ -4,8 +4,8 @@ // This file is in the Public Domain and comes with no warranty. #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include "heading_indicator.hxx" diff --git a/src/Instrumentation/heading_indicator_dg.cxx b/src/Instrumentation/heading_indicator_dg.cxx index 28be8a3a1..036caf47c 100644 --- a/src/Instrumentation/heading_indicator_dg.cxx +++ b/src/Instrumentation/heading_indicator_dg.cxx @@ -7,8 +7,8 @@ // This file is in the Public Domain and comes with no warranty. #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include
diff --git a/src/Instrumentation/heading_indicator_fg.cxx b/src/Instrumentation/heading_indicator_fg.cxx index b5dde762d..01d33892d 100644 --- a/src/Instrumentation/heading_indicator_fg.cxx +++ b/src/Instrumentation/heading_indicator_fg.cxx @@ -6,8 +6,8 @@ // This file is in the Public Domain and comes with no warranty. #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include "heading_indicator_fg.hxx" diff --git a/src/Instrumentation/mrg.cxx b/src/Instrumentation/mrg.cxx index d890ee266..3e7c07162 100644 --- a/src/Instrumentation/mrg.cxx +++ b/src/Instrumentation/mrg.cxx @@ -8,8 +8,8 @@ #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include // fabs() diff --git a/src/Instrumentation/turn_indicator.cxx b/src/Instrumentation/turn_indicator.cxx index c8d295fee..973b4054a 100644 --- a/src/Instrumentation/turn_indicator.cxx +++ b/src/Instrumentation/turn_indicator.cxx @@ -4,8 +4,8 @@ // This file is in the Public Domain and comes with no warranty. #include -#include STL_IOSTREAM -#include STL_STRING +#include +#include #include #include "turn_indicator.hxx" diff --git a/src/Main/bootstrap.cxx b/src/Main/bootstrap.cxx index f82b64143..9e4a57513 100644 --- a/src/Main/bootstrap.cxx +++ b/src/Main/bootstrap.cxx @@ -38,7 +38,7 @@ #include #include -#include STL_IOSTREAM +#include SG_USING_STD(cerr); SG_USING_STD(endl); diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 50e46ad9a..96e7175af 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -8,8 +8,8 @@ #include -#include STL_STRING -#include STL_FSTREAM +#include +#include #include #include diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 353818a78..edf601347 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -45,7 +45,7 @@ #include -#include STL_STRING +#include #include #include @@ -77,13 +77,13 @@ #ifdef ENABLE_SP_FDM #include #include +#include +#include #endif -#include #include #include #include #include -#include #include #include #include diff --git a/src/Main/fg_init.hxx b/src/Main/fg_init.hxx index 5bb589d9f..281614cfe 100644 --- a/src/Main/fg_init.hxx +++ b/src/Main/fg_init.hxx @@ -38,7 +38,7 @@ #include #include -#include STL_STRING +#include #include diff --git a/src/Main/fg_io.cxx b/src/Main/fg_io.cxx index ccecff71b..d8ffefe9a 100644 --- a/src/Main/fg_io.cxx +++ b/src/Main/fg_io.cxx @@ -28,7 +28,7 @@ #include // atoi() -#include STL_STRING +#include #include #include @@ -74,7 +74,7 @@ FGIO::FGIO() { } -#include STL_ALGORITHM +#include SG_USING_STD(for_each); static void delete_ptr( FGProtocol* p ) { delete p; } diff --git a/src/Main/fg_io.hxx b/src/Main/fg_io.hxx index 146f57087..b0da8f0d9 100644 --- a/src/Main/fg_io.hxx +++ b/src/Main/fg_io.hxx @@ -29,7 +29,7 @@ #include #include -#include STL_STRING +#include SG_USING_STD(vector); SG_USING_STD(string); diff --git a/src/Main/fg_os_common.cxx b/src/Main/fg_os_common.cxx index 5f1921df1..a50be105f 100644 --- a/src/Main/fg_os_common.cxx +++ b/src/Main/fg_os_common.cxx @@ -17,7 +17,10 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +#ifdef HAVE_CONFIG_H #include +#endif + #include #include diff --git a/src/Main/fg_props.cxx b/src/Main/fg_props.cxx index 07b20cfe8..3d7fe4422 100644 --- a/src/Main/fg_props.cxx +++ b/src/Main/fg_props.cxx @@ -33,7 +33,7 @@ #include #include -#include STL_IOSTREAM +#include #include #include