Skip to content
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

navigator: fix incorrect takeoff altitude #9034

Merged
merged 1 commit into from
Mar 7, 2018
Merged

Conversation

julianoes
Copy link
Contributor

This fixes a problem where we do not properly go to the set takeoff
altitude but end up lower.

The problem was that the setpoint triplet is reset when the navigation
mode changes. So in this case, the triplet is reset when we switch from
takeoff to loiter which can happen before reaching the actual takeoff
altitude.

The fix is an ugly hack to prevent the reset in the case of takeoff to
loiter. A better solution would be to remove the general reset and have
all navigation modes do the proper resets themselves.

This hotfix should however be lower risk.

Tested in SITL.

Fixes #9033.

@julianoes julianoes requested a review from Stifael March 6, 2018 15:08
Stifael
Stifael previously approved these changes Mar 6, 2018
@LorenzMeier
Copy link
Member

Thanks! Could you share a SITL log from this?

This fixes a problem where we do not properly go to the set takeoff
altitude but end up lower.

The problem was that the setpoint triplet is reset when the navigation
mode changes. So in this case, the triplet is reset when we switch from
takeoff to loiter which can happen before reaching the actual takeoff
altitude.

The fix is an ugly hack to prevent the reset in the case of takeoff to
loiter. A better solution would be to remove the general reset and have
all navigation modes do the proper resets themselves.

This hotfix should however be lower risk.
@julianoes
Copy link
Contributor Author

@dagar
Copy link
Member

dagar commented Mar 6, 2018

It seems like all of navigator needs to be tied together as nested state machines with appropriate transitions.

@LorenzMeier LorenzMeier merged commit 9c6b1a0 into master Mar 7, 2018
@LorenzMeier
Copy link
Member

Thanks!

@LorenzMeier LorenzMeier deleted the fix-takeoff-alt branch March 7, 2018 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto takeoff settles at wrong altitude
4 participants