ardupilot
ardupilot copied to clipboard
Copter: Add support for MAV_CMD_NAV_TAKEOFF with COMMAND_INT
I added support to MAV_CMD_NAV_TAKEOFF with COMMAND_INT.
Can be tested with MAVProxy using:
long MAV_CMD_NAV_TAKEOFF 0 0 0 0 0 0 10 Takeoff to 10 meters.
command_int GLOBAL_RELATIVE_ALT MAV_CMD_NAV_TAKEOFF 0 0 0 0 0 0 0 0 10 Takeoff to 10 meters.
command_int GLOBAL MAV_CMD_NAV_TAKEOFF 0 0 0 0 0 0 0 0 594 Takeoff to 594 AMSL (10 meters above home) meters.
command_int GLOBAL_TERRAIN_ALT MAV_CMD_NAV_TAKEOFF 0 0 0 0 0 0 0 0 10 Takeoff to 10 meters terrain altitude.
If required, I can also write an autotest for this.
Autotests would be nice so we don't kill this in the future.
@peterbarker, I added an autotest to test this with relative, global, and terrain alt. Do you want me to also repeat the terrain altitude test with a different takeoff location (takeoff from a location that is not origin or home)?
I've rebased and played with this. Seems good. I'm going to mark this for ArduPilot 4.4 so we don't forget about this again.
@rmackay9 needs your re-review
I fixed watch altitude maintained part of autotest procedure, FYI @peterbarker
@mustafa-gokce what is the status of this? Can you rebase it?
Thanks @amilcarlucas for the ping on this.
I think @peterbarker has added support for takeoff using command-int as part of a wider set of changes that added support for nearly all commands. This is already included in 4.5.
I think I will go ahead and close this if that's OK. We can certainly re-open it. Sorry for not getting this merged.