inav icon indicating copy to clipboard operation
inav copied to clipboard

WP mode altitude enforce hold fix

Open breadoven opened this issue 1 year ago • 4 comments

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 avatar May 03 '24 10:05 breadoven

@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?

DzikuVx avatar May 04 '24 09:05 DzikuVx

@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.

breadoven avatar May 04 '24 10:05 breadoven

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.

breadoven avatar May 04 '24 12:05 breadoven

Tested on multirotor and it behaved as expected during a WP mission so this should be OK to merge.

breadoven avatar May 04 '24 22:05 breadoven

Thanks!

DzikuVx avatar May 06 '24 08:05 DzikuVx