--use-new-environment to active it.
#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
//#include <simgear/misc/sgstream.hxx>
#include <simgear/misc/sg_path.hxx>
-//#ifndef FG_OLD_WEATHER
+//#ifndef FG_NEW_ENVIRONMENT
//sorry, that works only with the new weather system
#include <WeatherCM/FGLocalWeatherDatabase.h>
//#else
-//# include <Weather/weather.hxx>
+//# include <Environment/environment.hxx>
//#endif
#include <Main/fg_props.hxx>
string FGATIS::get_transmission() {
//void FGATIS::get_transmission() {
-#if !defined(FG_OLD_WEATHER)
+#if !defined(FG_NEW_ENVIRONMENT)
string transmission = "";
double visibility;
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
}
/* 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);
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
#include <simgear/misc/sg_path.hxx>
#include <Aircraft/aircraft.hxx>
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
#include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-#include <Weather/weather.hxx>
+#include <Environment/environment.hxx>
#endif
#include "uiuc_aircraft.h"
double vis;
if (Fog != 0)
{
- #ifndef FG_OLD_WEATHER
+ #ifndef FG_NEW_ENVIRONMENT
vis = WeatherDatabase->getWeatherVisibility();
if (Fog > 0)
vis /= 1.01;
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
}
#include <Cockpit/panel_io.hxx>
#include <GUI/gui.h>
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Weather/weather.hxx>
+# include <Environment/environment.hxx>
#endif
#include <Main/globals.hxx>
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
#include <Time/moonpos.hxx>
#include <Time/tmp.hxx>
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Weather/weather.hxx>
+# include <Environment/environment.hxx>
#endif
#include "fg_init.hxx"
////////////////////////////////////////////////////////////////////
// Initialize the weather modeling subsystem
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
// Initialize the WeatherDatabase
SG_LOG(SG_GENERAL, SG_INFO, "Creating LocalWeatherDatabase");
sgVec3 position;
global_events.Register( "weather update", fgUpdateWeatherDatabase,
fgEVENT::FG_EVENT_READY, 30000);
#else
- current_weather.init();
- current_weather.bind();
+ current_environment.init();
+ current_environment.bind();
#endif
////////////////////////////////////////////////////////////////////
#include <Aircraft/aircraft.hxx>
#include <Time/tmp.hxx>
#include <FDM/UIUCModel/uiuc_aircraftdir.h>
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Weather/weather.hxx>
-#endif // FG_OLD_WEATHER
+# include <Environment/environment.hxx>
+#endif // FG_NEW_ENVIRONMENT
#include <Objects/matlib.hxx>
#include <GUI/gui.h>
SG_USING_STD(ostream);
#endif
-#if !defined(FG_OLD_WEATHER)
+#if !defined(FG_NEW_ENVIRONMENT)
static double getWindNorth ();
static double getWindEast ();
static double getWindDown ();
-#endif // FG_OLD_WEATHER
+#endif // FG_NEW_ENVIRONMENT
// Allow the view to be set from two axes (i.e. a joystick hat)
// This needs to be in FGViewer itself, somehow.
}
-#if !defined(FG_OLD_WEATHER)
+#if !defined(FG_NEW_ENVIRONMENT)
/**
* Get the current visibility (meters).
speed);
}
-#endif // FG_OLD_WEATHER
+#endif // FG_NEW_ENVIRONMENT
static double
getFOV ()
fgSetArchivable("/autopilot/control-overrides/throttle");
// Environment
-#if !defined(FG_OLD_WEATHER)
+#if !defined(FG_NEW_ENVIRONMENT)
fgTie("/environment/visibility-m", getVisibility, setVisibility);
fgSetArchivable("/environment/visibility-m");
fgTie("/environment/wind-north-fps", getWindNorth, setWindNorth);
sgVec3 rway_ols;
// ADA
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Weather/weather.hxx>
+# include <Environment/environment.hxx>
#endif
#include "version.h"
default_state->force();
// update fog params if visibility has changed
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
thesky->set_visibility( WeatherDatabase->getWeatherVisibility() );
#else
- thesky->set_visibility( current_weather.get_visibility_m() );
+ thesky->set_visibility( current_environment.get_visibility_m() );
#endif
thesky->modify_vis( cur_fdm_state->get_Altitude() * SG_FEET_TO_METER,
- scenery.get_cur_elev();
// SG_LOG( SG_ALL, SG_INFO, "visibility is "
- // << current_weather.get_visibility() );
+ // << current_environment.get_visibility() );
if ( agl > 10.0 ) {
ssgSetNearFar( 10.0f, 120000.0f );
// init routine and we don't have to worry about it again.
#endif
-#ifdef FG_OLD_WEATHER
- current_weather.update(0); // FIXME: use real delta time
+#ifdef FG_NEW_ENVIRONMENT
+ current_environment.update(0); // FIXME: use real delta time
#endif
// Fix elevation. I'm just sticking this here for now, it should
-if ENABLE_OLD_WEATHER
-WEATHER_DIR = Weather
+if ENABLE_NEW_ENVIRONMENT
+WEATHER_DIR = Environment
else
WEATHER_DIR = WeatherCM
endif
#include <Main/viewer.hxx>
#include <Objects/obj.hxx>
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
# include <WeatherCM/FGLocalWeatherDatabase.h>
#else
-# include <Weather/weather.hxx>
+# include <Environment/environment.hxx>
#endif
#include "newcache.hxx"
SG_LOG( SG_TERRAIN, SG_INFO,
"scheduling needed tiles for " << longitude << " " << latitude );
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
if ( WeatherDatabase != NULL ) {
vis = WeatherDatabase->getWeatherVisibility();
} else {
vis = 16000;
}
#else
- vis = current_weather.get_visibility_m();
+ vis = current_environment.get_visibility_m();
#endif
// cout << "visibility = " << vis << endl;
void FGTileMgr::prep_ssg_nodes() {
float vis = 0.0;
-#ifndef FG_OLD_WEATHER
+#ifndef FG_NEW_ENVIRONMENT
if ( WeatherDatabase ) {
vis = WeatherDatabase->getWeatherVisibility();
} else {
vis = 16000;
}
#else
- vis = current_weather.get_visibility_m();
+ vis = current_environment.get_visibility_m();
#endif
// cout << "visibility = " << vis << endl;
#include <Main/fg_props.hxx>
#include <Aircraft/aircraft.hxx>
-#include <Weather/weather.hxx>
+#include <Environment/environment.hxx>
// This is a record containing current weather info