# include <config.h>
#endif
+#include <cstring>
+
#include <simgear/constants.h>
#include <simgear/debug/logstream.hxx>
#include <simgear/scene/sky/sky.hxx>
#include <Main/main.hxx>
#include <Main/fg_props.hxx>
-#include <Aircraft/aircraft.hxx>
#include <FDM/flight.hxx>
#include "environment.hxx"
#include "environment_ctrl.hxx"
#include "fgclouds.hxx"
#include "precipitation_mgr.hxx"
+#include "ridge_lift.hxx"
class SGSky;
extern SGSky *thesky;
_precipitationManager = new FGPrecipitationMgr;
set_subsystem("precipitation", _precipitationManager);
+
+ set_subsystem("ridgelift", new FGRidgeLift);
}
FGEnvironmentMgr::~FGEnvironmentMgr ()
{
+ SGSubsystem * subsys;
+
+ subsys = get_subsystem( "ridgelift" );
+ remove_subsystem( "ridgelift" );
+ delete subsys;
+
remove_subsystem("precipitation");
delete _precipitationManager;
_environment->set_elevation_ft(fgGetDouble("/position/altitude-ft"));
_environment->set_local_weather_lift_fps(fgGetDouble("/local-weather/current/thermal-lift"));
- osg::Vec3 windVec(-_environment->get_wind_from_north_fps(),
+ osg::Vec3 windVec(_environment->get_wind_from_north_fps(),
-_environment->get_wind_from_east_fps(),
- _environment->get_wind_from_down_fps());
+ 0);
simgear::Particles::setWindVector(windVec * SG_FEET_TO_METER);
+ //simgear::Particles::setWindFrom( _environment->get_wind_from_heading_deg(),
+ // _environment->get_wind_speed_kt() );
}
FGEnvironment