-
Notifications
You must be signed in to change notification settings - Fork 17.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plane: fixed bug in pullup and loiter to alt code #28259
Conversation
de5c5e1
to
5e2f19e
Compare
if we have poor pitch trim it is possible we will pullup before reaching the target airspeed. Check pitch threshold during airspeed stage of pullup
5e2f19e
to
f88af49
Compare
if our target loiter radius is unachievable then we can reach the loiter target on initial capture but be unable to maintain it. This ensures that once we capture we return true on reached_loiter_target() This is critical for any mission type where we take an action on reached_loiter_target() and another condition (such as being lined up for a waypoint). Otherwise we may continue loitering forever
use LOITER_TO_ALT and a landing, allowing for a much better test of the full glider pullup mission
we were accepting values outside the specified range
need terrain handlers installed to support terrain targets
f88af49
to
6e41c61
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L1 changes looks good. Pull up change looks good too and is contained to glider pull up so not a high risk. Not looked at the test changes.
Well, I've only looked at the test changes and they LGTM. |
This fixes a bug in the L1 controller where reached_loiter_target() goes false after capture due to an unachievable loiter radius or wind. This can lead waypoint types that rely on a combination of reached_loiter_target() and another condition (such as being lined up with the next waypoint) to never complete
This also fixes a bug in the pullup code where poor pitch trim can mean we never hit the target airspeed in the pullup
Note that the loiter to alt fix is not really a complete fix. If the initial trajectory prevents capture ever happening then we can still have the same issue. We could add a check for yaw going through more than 360 degrees to make this more robust
Note: This builds on #28257
@peterbarker this includes a fix for the wait min/max/accuracy code in vehicle test suite that will impact a lot of tests. We were getting things like this:
which shows it accepting an out of range value