From 71f120e3be081101c9c00544ab65942e96a34874 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 19 Feb 2002 15:16:08 +0000 Subject: [PATCH] Initial take of new environment subsystem. Configure with --use-new-environment to active it. --- acconfig.h | 2 +- src/ATC/atis.cxx | 10 +++++----- src/FDM/Balloon/BalloonSim.cpp | 4 ++-- src/FDM/UIUCModel/uiuc_wrapper.cpp | 10 +++++----- src/Input/input.cxx | 4 ++-- src/Main/Makefile.am | 4 ++-- src/Main/fg_init.cxx | 10 +++++----- src/Main/fg_props.cxx | 16 ++++++++-------- src/Main/main.cxx | 14 +++++++------- src/Makefile.am | 4 ++-- src/Scenery/tilemgr.cxx | 12 ++++++------ src/Weather/weather.cxx | 2 +- 12 files changed, 46 insertions(+), 46 deletions(-) diff --git a/acconfig.h b/acconfig.h index dc4d593f8..c69d2be8f 100644 --- a/acconfig.h +++ b/acconfig.h @@ -65,7 +65,7 @@ #undef FG_NETWORK_OLK /* Define to avoid Christian's new weather code */ -#undef FG_OLD_WEATHER +#undef FG_NEW_ENVIRONMENT /* Define if we are building FGFS (should always be defined) */ #undef FGFS diff --git a/src/ATC/atis.cxx b/src/ATC/atis.cxx index 9a07ea52f..cb39c09c2 100644 --- a/src/ATC/atis.cxx +++ b/src/ATC/atis.cxx @@ -39,11 +39,11 @@ SG_USING_STD(cout); //#include #include -//#ifndef FG_OLD_WEATHER +//#ifndef FG_NEW_ENVIRONMENT //sorry, that works only with the new weather system #include //#else -//# include +//# include //#endif #include
@@ -96,7 +96,7 @@ FGATIS::~FGATIS() { string FGATIS::get_transmission() { //void FGATIS::get_transmission() { -#if !defined(FG_OLD_WEATHER) +#if !defined(FG_NEW_ENVIRONMENT) string transmission = ""; double visibility; @@ -220,6 +220,6 @@ string FGATIS::get_transmission() { return(transmission); #else - return "Station unavailable (not supported by FG_OLD_WEATHER)"; -#endif // FG_OLD_WEATHER + return "Station unavailable (not supported by FG_NEW_ENVIRONMENT)"; +#endif // FG_NEW_ENVIRONMENT } diff --git a/src/FDM/Balloon/BalloonSim.cpp b/src/FDM/Balloon/BalloonSim.cpp index 350298b50..a60bb9d56 100644 --- a/src/FDM/Balloon/BalloonSim.cpp +++ b/src/FDM/Balloon/BalloonSim.cpp @@ -169,7 +169,7 @@ void balloon::update() /* later, but currently was my main concern to get it going... */ /************************************************************************/ -#ifndef FG_OLD_WEATHER +#ifndef FG_NEW_ENVIRONMENT sgVec3 v; FGPhysicalProperty wdbpos = WeatherDatabase->get(position); @@ -226,7 +226,7 @@ void balloon::update() sgVec3 fTotal, fFriction, fLift; sgScaleVec3(fTotal, gravity_vector, mTotal); -#ifndef FG_OLD_WEATHER +#ifndef FG_NEW_ENVIRONMENT sgScaleVec3(fFriction, v, cw_envelope * wind_facing_area_of_balloon * WeatherDatabase->getAirDensity(position) * speed / 2.0); //wind resistance sgScaleVec3(fLift, gravity_vector, -balloon_envelope_volume * wdbpos.AirPressure / (287.14 * wdbpos.Temperature)); #endif diff --git a/src/FDM/UIUCModel/uiuc_wrapper.cpp b/src/FDM/UIUCModel/uiuc_wrapper.cpp index 099298e24..e8308a402 100644 --- a/src/FDM/UIUCModel/uiuc_wrapper.cpp +++ b/src/FDM/UIUCModel/uiuc_wrapper.cpp @@ -75,10 +75,10 @@ #include #include -#ifndef FG_OLD_WEATHER +#ifndef FG_NEW_ENVIRONMENT #include #else -#include +#include #endif #include "uiuc_aircraft.h" @@ -222,7 +222,7 @@ void uiuc_force_moment(double dt) double vis; if (Fog != 0) { - #ifndef FG_OLD_WEATHER + #ifndef FG_NEW_ENVIRONMENT vis = WeatherDatabase->getWeatherVisibility(); if (Fog > 0) vis /= 1.01; @@ -230,12 +230,12 @@ void uiuc_force_moment(double dt) vis *= 1.01; WeatherDatabase->setWeatherVisibility( vis ); #else - vis = current_weather.get_visibility_m(); + vis = current_environment.get_visibility_m(); if (Fog > 0) vis /= 1.01; else vis *= 1.01; - current_weather.set_visibility_m( vis ); + current_environment.set_visibility_m( vis ); #endif } diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 637ed9aa1..243eacbe4 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -55,10 +55,10 @@ #include #include -#ifndef FG_OLD_WEATHER +#ifndef FG_NEW_ENVIRONMENT # include #else -# include +# include #endif #include
diff --git a/src/Main/Makefile.am b/src/Main/Makefile.am index 35e7407a6..9044087ad 100644 --- a/src/Main/Makefile.am +++ b/src/Main/Makefile.am @@ -4,8 +4,8 @@ else SERIAL_LIBS = endif -if ENABLE_OLD_WEATHER -WEATHER_LIBS = $(top_builddir)/src/Weather/libWeather.a +if ENABLE_NEW_ENVIRONMENT +WEATHER_LIBS = $(top_builddir)/src/Environment/libEnvironment.a else WEATHER_LIBS = $(top_builddir)/src/WeatherCM/libWeatherCM.a endif diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 8dfac625c..32754320a 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -102,10 +102,10 @@ #include