Skip to content

Surface tracking: preserve full pilot climb/descent authority#32789

Open
lthall wants to merge 3 commits intoArduPilot:masterfrom
lthall:202260415_TerrainFollowingManualClimbRate
Open

Surface tracking: preserve full pilot climb/descent authority#32789
lthall wants to merge 3 commits intoArduPilot:masterfrom
lthall:202260415_TerrainFollowingManualClimbRate

Conversation

@lthall
Copy link
Copy Markdown
Contributor

@lthall lthall commented Apr 15, 2026

Summary

Surface tracking can currently saturate vertical rate limits, preventing the pilot from commanding climb or descent when terrain-following is active.

This change adjusts the pilot’s effective climb/descent limits based on the terrain-following command, ensuring the pilot always retains full vertical authority while still allowing terrain tracking to operate within the overall limits.

Board,antennatracker,blimp,bootloader,copter,heli,plane,rover,sub
CubeOrange,*,*,*,-104,-104,*,*,*

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts ArduCopter surface tracking integration so terrain-following no longer consumes the full vertical rate “budget” and blocks pilot climb/descent commands, preserving full net pilot authority while still respecting overall vertical limits.

Changes:

  • Exposes terrain-following vertical velocity from AC_PosControl for use by pilot climb-rate mapping.
  • Adjusts pilot climb/descent rate scaling based on current terrain-following vertical velocity contribution.
  • Removes per-mode post-clamp of pilot climb rate that would negate the adjusted authority.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libraries/AC_AttitudeControl/AC_PosControl.h Adds accessor for terrain vertical velocity contribution (_vel_terrain_d_ms).
ArduCopter/Attitude.cpp Adjusts pilot climb-rate curve to account for terrain-following velocity; adds adjusted pilot speed helpers.
ArduCopter/Copter.h Declares adjusted pilot climb/descent limit helper methods.
ArduCopter/mode_althold.cpp Removes post-constrain of pilot climb rate.
ArduCopter/mode_loiter.cpp Removes post-constrain of pilot climb rate.
ArduCopter/mode_poshold.cpp Removes post-constrain of pilot climb rate.
ArduCopter/mode_sport.cpp Removes post-constrain of pilot climb rate.
ArduCopter/mode_flowhold.cpp Removes post-constrain of pilot climb rate.
ArduCopter/mode_zigzag.cpp Removes post-constrain of pilot climb rate.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ArduCopter/Attitude.cpp Outdated
Comment thread ArduCopter/Attitude.cpp
@lthall lthall force-pushed the 202260415_TerrainFollowingManualClimbRate branch from 54a8a84 to cc587bf Compare April 16, 2026 01:41
@be-ska
Copy link
Copy Markdown
Contributor

be-ska commented Apr 17, 2026

@lthall log from #32740 (comment): 00000016.BIN.zip

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.

3 participants