qgroundcontrol icon indicating copy to clipboard operation
qgroundcontrol copied to clipboard

MissionManager: Fix landing approach item handling

Open rubenp02 opened this issue 6 months ago • 0 comments

MissionManager: Fix landing approach item handling

Description

Updated the LandingComplexItem recalculation logic to properly handle waypoint approach items, fixing several issues with heading calculations and when loading plans, such as the loiter radius being taken into account despite the "Use loiter to altitude" option being disabled. Refactored the relevant areas to unify the naming and logic between waypoint and loiter-based approaches.

This replaces previous GUI-level workarounds (https://github.com/mavlink/qgroundcontrol/commit/ddd97adb7c4485a78faca0e4d4313c58e88dd366, https://github.com/mavlink/qgroundcontrol/commit/e0f6a0ad46a5f6f6e665cdac33fdcaa7bbfef2d7) that partially fixed these heading calculation problems by manipulating the loiter radius. This commit addresses the root cause instead, so it also fixes the issues for VTOL landing sequences, where the GUI workarounds hadn't yet been applied.

Key changes:

  • Reverted the now obsolete GUI hacks.
  • Updated the coordinate recalculation logic to handle waypoint and loiter approaches as distinct modes, rather than forcing the waypoint approach through the loiter-based architecture.
  • Added _recalcFromApproachModeChange method to properly handle switching between loiter and waypoint approach items, instead of using the generic coordinate change handler.
  • Renamed "loiter tangent" to "slope start".
  • Updated all UI components to remove some explicit approach item-dependant logic which is no longer needed, and to use the new naming.

Checklist:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

rubenp02 avatar Jun 17 '25 12:06 rubenp02