1
0
Fork 0

Add support for moving cloud layers

This commit is contained in:
ehofman 2003-08-19 13:06:51 +00:00
parent fb3717003e
commit 32cb0df98e

View file

@ -247,8 +247,17 @@ FGEnvironmentMgr::get_cloud_layer_elevation_ft (int index) const
void
FGEnvironmentMgr::set_cloud_layer_elevation_ft (int index, double elevation_ft)
{
FGEnvironment env = *_environment;
env.set_elevation_ft(elevation_ft);
thesky->get_cloud_layer(index)
->setElevation_m(elevation_ft * SG_FEET_TO_METER);
thesky->get_cloud_layer(index)
->setSpeed(env.get_wind_speed_kt() * 0.5151); // 1 kt = 0.5151 m/s
thesky->get_cloud_layer(index)
->setDirection(env.get_wind_from_heading_deg());
}
double