SITL: zero wind for first 15s

this allows for airspeed calibration on startup
This commit is contained in:
Andrew Tridgell 2012-08-27 16:24:05 +10:00
parent 2e9e3ce5a6
commit dd7c815c5f

View File

@ -214,6 +214,11 @@ static void sitl_simulator_output(void)
control.direction = direction * 100;
control.turbulance = sitl.wind_turbulance * 100;
// zero the wind for the first 15s to allow pitot calibration
if (millis() < 15000) {
control.speed = 0;
}
sendto(sitl_fd, (void*)&control, sizeof(control), MSG_DONTWAIT, (const sockaddr *)&rcout_addr, sizeof(rcout_addr));
}