Use MAV_CMD_DO_CHANGE_ALTITUDE and MAV_CMD_DO_REPOSITION for moving vehicle - #3724
Open
peterbarker wants to merge 2 commits into
Open
Use MAV_CMD_DO_CHANGE_ALTITUDE and MAV_CMD_DO_REPOSITION for moving vehicle#3724peterbarker wants to merge 2 commits into
peterbarker wants to merge 2 commits into
Conversation
Contributor
Author
|
Tested basic do-repos and changealt using github build products. |
This was referenced May 18, 2026
meee1
reviewed
May 27, 2026
|
|
||
| [Obsolete] | ||
| public void setNewWPAlt(Locationwp gotohere) | ||
| public void setNewAlt(float new_relhome_alt_m) |
Contributor
Author
There was a problem hiding this comment.
Are you concerned with external callers to this method breaking?
I believe I changed all in-tree callers to pass in the required altitude rather than the Locationwp object.
The new method of changing the altitude - MAV_CMD_DO_CHANGE_ALTITUDE doesn't deal with waypoints at all - it's just an altitude. The old method did require the Locationwp as it's calling setWP (leaving lat/lng at and setting the magic value "3" to get the weird behaviour we are trying to eliminate in ArduPilot).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MissionPlanner currently uses some archaic code which relies on magic "current" values to move the vehicle in GUIDED mode using mission_item and mission_item_int commands.
We have supported DO_CHANGE_ALT and DO_REPOSITION for years - use them so we can retire the ArduPilot code.