Browse Source

HAL_SITL: follow sqrt law to 60m for wind

this makes testing wind in landings more useful
master
Andrew Tridgell 9 years ago
parent
commit
835c0b1759
  1. 2
      libraries/AP_HAL_SITL/SITL_State.cpp

2
libraries/AP_HAL_SITL/SITL_State.cpp

@ -360,7 +360,7 @@ void SITL_State::_simulator_servos(SITL::Aircraft::sitl_input &input) @@ -360,7 +360,7 @@ void SITL_State::_simulator_servos(SITL::Aircraft::sitl_input &input)
altitude = 0;
}
if (altitude < 60) {
wind_speed *= altitude / 60;
wind_speed *= sqrtf(MAX(altitude / 60, 0));
}
input.wind.speed = wind_speed;
input.wind.direction = _sitl?_sitl->wind_direction:0;

Loading…
Cancel
Save