Skip to content
Snippets Groups Projects
Commit aaa4e642 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

SITL: zero wind for first 15s

this allows for airspeed calibration on startup
parent 6f236f0c
No related branches found
No related tags found
No related merge requests found
...@@ -214,6 +214,11 @@ static void sitl_simulator_output(void) ...@@ -214,6 +214,11 @@ static void sitl_simulator_output(void)
control.direction = direction * 100; control.direction = direction * 100;
control.turbulance = sitl.wind_turbulance * 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)); sendto(sitl_fd, (void*)&control, sizeof(control), MSG_DONTWAIT, (const sockaddr *)&rcout_addr, sizeof(rcout_addr));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment