Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Launch Control #6992
Adds a race start assistance system that allows the pilot to pitch forward and then release the sticks with the quad holding position for the race start.
Mode switch configuration:
Determines the launch triggering reset behavior. After a launch is triggered we want to disable the feature so that if the pilot crashes and then re-arms Launch Control will not be active.
As long as the launch has not been triggered the pilot can arm/disarm multiple times and the feature will still be available. So if the quad was to fall off the blocks for example the pilot can reposition and simply re-arm.
Adds a throttle deadband below which Launch Control will be active. The launch will be triggered once throttle exceeds the configured percent. Higher values provide a more aggressive launch as the throttle will "jump" to the configured percentage. Setting to 0 will cause the trigger to be
Determines the Iterm gain used to hold position. If the quad has difficulty holding position then increase this value. Be careful with high values as windup can occur. If you hear the motors continuing to speed up while position is being held then the gain is likely too high. Basically you want to use the lowest value that works acceptably. While raised up in the launch position it's normal for the quad to move around a little. In this position it's very susceptible to wind in particular. Normally a little motion won't be a problem and it's not necessary to try to tune this with increased gain.
If the accelerometer is enabled then additional feedback will be presented in the OSD that indicates the current pitch angle. The pilot can use this to fine tune their launch angle for consistency.
Allows the pilot to optionally set an angle limit that will limit the forward pitch. Provides an assist to help the pilot attain a consistent launch angle. It is simply a limit that prevents any more forward pitch when reached. The quad will not actively or automatically go to this angle. Pilot can still adjust the angle lower if desired. Setting to 0 disables the limit.
If the warnings element is enabled then when Launch Control is active a
All of the Launch Control parameters can be adjusted in the OSD menus. They're under PROFILE -> MISC PP -> LAUNCH CONTROL.
Launch Control will not activate if any of the following are true:
fujin left a comment
I have extensively flight tested this across all of my racing machinery in both racing event and training setting on two launch block designs and guided a handful of users through doing so as well, in both multiple and single launch and pitchonly or full control modes.
I have observed that pitch only control mode, 60 degreesangle limit, and 20% launch trigger is a reasonable setting for my fleet's camera tilt, stick motion, and usage of launching blocks whenever flying.
When the other feedback is addressed this is good to go from me.
@borisbstyle I originally started looking at some unit tests but had some problems due to lack of experience with the unit test structure (and CPP) and was time crunched so I took them out for now. Realistically all I was able to test for was the D and FF remained zero and non-controlled axes had P/I remain zero. I can see about adding some back in along with the stylistic change requests from other reviews.