Skip to content

Conversation

dakejahl
Copy link
Contributor

During a mission the last waypoint is often a land waypoint. If the previous waypoint is not directly above the land waypoint the offtrack calculation is incorrect. Land is a special case and should not use the offtrack logic which is intended for line-following between waypoints.

Introduced in #23371 when the offtrack calculation switched from 2D to 3D.

Fixes #25723

During a mission the last waypoint is often a LAND. If the previous waypoint is not directly above the land waypoint the offtrack calculation is incorrect. This regression was introduced when the offtrack calculation switched from 2D to 3D.
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.

Thanks for looking into this @dakejahl!
If I understand correctly:

  1. With a waypoint of type land FlightTaskAuto does special handling and not follow an absolute altitude but rather descends to land at the expected coordinates.
  2. Before #23371 this had no effect on the offtrack state machine because all checks were horizontal 2D and the vertical descent had no effect on them.
  3. Now you exclude land waypoints being able to enter an offtrack state because the decent makes the vehicle go outside of the 3D acceptance sphere.

This is an acceptable hotfix for me but really we should simplify this logic. I'm more than motivated to make suggestions for that.

I have a remaining question for my understanding on land waypoints: They can happen in a different location than where the vehicle currently is. Does Navigator make sure that the coordinates of the land waypoint are reached before the waypoint type is land or is there other handling to make sure it actually lands where commanded?

@dakejahl
Copy link
Contributor Author

I have a remaining question for my understanding on land waypoints: They can happen in a different location than where the vehicle currently is. Does Navigator make sure that the coordinates of the land waypoint are reached before the waypoint type is land or is there other handling to make sure it actually lands where commanded?

The vehicle travels to the land waypoint and only after reaching it does it mark the waypoint as a land type and begin descent. It is at this point that the offtrack logic was kicking in and adjusting the vehicle position erratically. As far as navigator logic goes... it is so convoluted I can't follow it at all 😢

@dakejahl dakejahl merged commit 2c62cae into main Oct 14, 2025
68 of 70 checks passed
@dakejahl dakejahl deleted the pr-mission_landing_bugfix branch October 14, 2025 03:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Eratic multicopter mission landing

3 participants