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 VTOL land waypoint calculation #22773

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

sfuhrer
Copy link
Contributor

@sfuhrer sfuhrer commented Feb 19, 2024

The setpoint.yaw can be NAN, and this made the calculated land point NAN as well. Looking at the current yaw is anyway a better way to approximate the course over ground that fundamentally should be used.

NB As we only need a rough idea of the current course over ground, I think it's not worth to calculate it by using the ground velocity, as then we'd have instabilities when approaching 0 ground speed.

Changelog Entry

For release notes:

Bugfix 

The setpoint.yaw can be NAN, and this made the calculated land point NAN
as well. Looking at the current yaw is anyway a better way to approximate
the course over ground that fundamentally should be used.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
@sfuhrer sfuhrer added the Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing! label Feb 19, 2024
@sfuhrer sfuhrer requested a review from MaEtUgR February 19, 2024 12:32
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That works yes.

Would it be an exageration to check if there is a yaw setpoint and use it if it's not NAN? I'd prefer that because otherwise you often have these constantly slightly changing altitudes and yaws when you switch in and out of things. Maybe it's a detail and should be improved later.

@MaEtUgR
Copy link
Member

MaEtUgR commented Feb 19, 2024

_navigator->get_vstatus()->is_vtol just before the changed part

Never mind, what I wrote would apply for multicopter 🤦‍♂️

@MaEtUgR MaEtUgR merged commit 8a75733 into main Feb 19, 2024
89 of 92 checks passed
@MaEtUgR MaEtUgR deleted the pr-fix-vtol-land-backtransition-main branch February 19, 2024 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hybrid VTOL 🛩️🚁 Multirotor + Fixedwing!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants