Skip to content

Use MAV_CMD_DO_CHANGE_ALTITUDE and MAV_CMD_DO_REPOSITION for moving vehicle - #3724

Open
peterbarker wants to merge 2 commits into
ArduPilot:masterfrom
peterbarker:pr/use-do-change-altitude
Open

Use MAV_CMD_DO_CHANGE_ALTITUDE and MAV_CMD_DO_REPOSITION for moving vehicle#3724
peterbarker wants to merge 2 commits into
ArduPilot:masterfrom
peterbarker:pr/use-do-change-altitude

Conversation

@peterbarker

Copy link
Copy Markdown
Contributor

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.

@peterbarker

Copy link
Copy Markdown
Contributor Author

Tested basic do-repos and changealt using github build products.


[Obsolete]
public void setNewWPAlt(Locationwp gotohere)
public void setNewAlt(float new_relhome_alt_m)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

this shouldnt be changed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants