inav
inav copied to clipboard
WP mode altitude enforce hold fix
Fixes an issue when WP turn smoothing is set to ON_CUT and altitude enforce is active. Causes mission to skip next WP when craft reaches WP altitude target.
Adds additional Nav State flag NAV_CTL_HOLD for Nav states that are hold points. Flag is used mainly to ensure fixed wing craft remain in a circular loiter flight path at hold WPs. Currently a fixed wing can drop out of the loiter flight path if it drifts too far away from the hold WP because the trigger to maintain a loiter is just based on distance from the hold WP not whether the WP is specifically a hold point. Dropping out of the loiter flight path has unpredictable results because it's used to control other behaviour such as WP turn smoothing.
@breadoven when do you think we can have go/no-go on this PR? I'd like to build 7.1.1 as soon as this issue us resolved. Just a rough estimation would be fine. This or next weeks?
@breadoven when do you think we can have go/no-go on this PR? I'd like to build 7.1.1 as soon as this issue us resolved. Just a rough estimation would be fine. This or next weeks?
I made some other changes that I've HITL tested which work as expected and should avoid further loiter hold problems on fixed wing. Shouldn't affect multirotor, but a quick test would be useful. I'll commit the changes now so you can see what you think.
I've removed the don't merge but ideally it could do with a quick multirotor test just to check WP mission nav_mc_wp_slowdown which is the only thing that might be affected.
Tested on multirotor and it behaved as expected during a WP mission so this should be OK to merge.
Thanks!