#include <simgear/debug/logstream.hxx>
#include <simgear/scene/sky/sky.hxx>
+#include <simgear/environment/visual_enviro.hxx>
#include <Main/main.hxx>
#include <Main/fg_props.hxx>
+#include <Main/renderer.hxx>
#include <Aircraft/aircraft.hxx>
#include "environment.hxx"
FGEnvironmentMgr::FGEnvironmentMgr ()
- : _environment(new FGEnvironment),
- _controller(new FGInterpolateEnvironmentCtrl)
+ : _environment(new FGEnvironment)
{
+
+ if (fgGetBool("/environment/params/real-world-weather-fetch") == true)
+ _controller = new FGMetarEnvironmentCtrl;
+ else
+ _controller = new FGInterpolateEnvironmentCtrl;
+
_controller->setEnvironment(_environment);
set_subsystem("controller", _controller, 0.5);
}
&FGEnvironmentMgr::set_cloud_layer_coverage);
fgSetArchivable(buf);
}
+ fgTie("/sim/rendering/clouds3d-enable", &sgEnviro,
+ &SGEnviro::get_clouds_enable_state,
+ &SGEnviro::set_clouds_enable_state);
+ fgTie("/sim/rendering/clouds3d-vis-range", &sgEnviro,
+ &SGEnviro::get_clouds_visibility,
+ &SGEnviro::set_clouds_visibility);
+ fgTie("/sim/rendering/clouds3d-density", &sgEnviro,
+ &SGEnviro::get_clouds_density,
+ &SGEnviro::set_clouds_density);
+ fgTie("/sim/rendering/clouds3d-cache-size", &sgEnviro,
+ &SGEnviro::get_clouds_CacheSize,
+ &SGEnviro::set_clouds_CacheSize);
+ fgTie("/sim/rendering/precipitation-enable", &sgEnviro,
+ &SGEnviro::get_precipitation_enable_state,
+ &SGEnviro::set_precipitation_enable_state);
}
void