Skip to content

Conversation

msberk
Copy link
Contributor

@msberk msberk commented Sep 22, 2025

Solved Problem

Currently, when proceeding to the landing point the previous setpoint is not updated, which results in an unexpected and off course landing pattern in fixed wing.

Fixes #25436

Solution

Move position setpoint logic outside of conditional so it is applied even when it is a landing waypoint

Changelog Entry

For release notes:

Bugfix: Fix RTL logic in fixed wing RTL Mission mode that caused landing patterns to veer off of expected course

Test coverage

Context

#25436

Currently, when proceeding to the landing point the previous setpoint is not updated, which results in an unexpected and off course landing pattern in fixed wing. (see PX4#25436)
@msberk
Copy link
Contributor Author

msberk commented Sep 22, 2025

@sfuhrer Saw you reviewed the PR which likely introduced this behavior, if you want to see this proposed fix.

@KonradRudin interested in your feedback too

@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-dev-call-sep-24-2025-team-sync-and-community-q-a/47494/1

@dagar dagar requested a review from sfuhrer September 24, 2025 15:28
pos_sp_triplet->previous = pos_sp_triplet->current;
}

pos_sp_triplet->previous = pos_sp_triplet->current;
Copy link
Member

Choose a reason for hiding this comment

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

I think this would need to consider other cases within handleLanding() that manipulate pos_sp_triplet->previous?

Copy link
Contributor Author

@msberk msberk Sep 24, 2025

Choose a reason for hiding this comment

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

That may be true, but if so then mission.cpp suffers the same concern. Since mission.cpp is much more thoroughly flight tested I've gone with duplicating its approach in d3214f9 which at least accounts for the case that the wp doesn't get updated

@msberk
Copy link
Contributor Author

msberk commented Sep 24, 2025

New log for change to match mission.cpp logic is here: https://review.px4.io/plot_app?log=a8191432-e1bc-495d-8b38-1996cfa02cd7

@msberk
Copy link
Contributor Author

msberk commented Oct 1, 2025

@sfuhrer @dagar Wasn't able to make the dev call today, but wondering if there's any other comment on this. As far as I can tell this synchronizes the waypoint update logic from plain mission.cpp and fixes the bug. If this gets merged I'll make a backport PR to 1.16, as well.

@dakejahl dakejahl self-assigned this Oct 10, 2025
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-dev-call-oct-15-2025-team-sync-and-community-q-a/47650/1

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.

[Bug] Fixed-wing Mission landing veers off-course in Return *Personnel Safety Risk!*

4 participants