Skip to content

Conversation

@rubenp02
Copy link
Contributor

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 (ddd97ad, e0f6a0a) 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 added 3 commits June 22, 2025 19:32
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 (ddd97ad, e0f6a0a) 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:
- 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.
@DonLakeFlyer
Copy link
Collaborator

Thanks @rubenp02

@DonLakeFlyer DonLakeFlyer merged commit a48ffca into mavlink:Stable_V5.0 Jun 23, 2025
11 checks passed
@rubenp02 rubenp02 deleted the Stable_V5.0 branch June 23, 2025 13:51
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.

2 participants