-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Navigation altitude and position controller reset improvements #8896
Navigation altitude and position controller reset improvements #8896
Conversation
awesome, thanks a lot! |
I ran some multi-rotor tests with this today.. Switching out of RTH in the midst of the climb out, to @breadoven Does this fix cross over with your issue here #5855 (comment) |
The only question with this is when should the altitude controller should be set up again following a mode change.
The problem with descending to the RTH home altitude is the abrupt change from demanding descent to suddenly demanding hold at the home altitude. The controller just tries to maintain the set descent rate without taking into account the distance to the target altitude so the PID values remain constant-ish until the target altitude is reached then take time to unwind and reverse to a climb following the inevitable overshoot. The overshoot is probably worse for a fixed wing because it can't change vertical direction as quickly as a multirotor can. I'd have thought the only solution here is to taper off the descent rate as you get closer to the home altitude. I ended up setting the descent rate to 2m/s rather than the default of 5 m/s to limit the overshoot. |
The transition was smooth in flight. I didn't notice any altitude jumpiness.
It just seems like a rather poor altitude PID controller. |
Looking at it again the descent to RTH home altitude switches from a constant descent rate to targeting the home altitude itself 1s before arriving based on current descent rate. Likely the 1s is more relevant to multirotor rather than fixed wing so perhaps it would make sense to increase the 1s to some higher value for a fixed wing, perhaps as much as 5s. Although that's a different issue to this so would need to be done in a separate PR. |
Removed setting up altitude controller for WP mode. Doesn't seem relevant given WP mode doesn't allow RC altitude adjustment so no need to reset the throttle zero point. Other than that this is good to merge I think. |
Tested on fixed wing with iNAV6.1 RC1 - works awesome! |
…reset_changes Navigation altitude and position controller reset improvements
Closes #8882.
Should improve control behaviour when switching directly from one Nav mode to another, although change mainly affects AltHold and PosHold modes.
Tested on HITL fixed wing sim OK. Still needs testing on a multirotor.