ArduPilotMega 2.0 Commands Command Structure in bytes 0 0x00 byte Command ID 1 0x01 byte Parameter 1 2 0x02 long Parameter 2 3 0x03 .. 4 0x04 .. 5 0x05 .. 6 0x06 long Parameter 3 7 0x07 .. 8 0x08 .. 9 0x09 .. 10 0x0A long Parameter 4 11 0x0B .. 11 0x0C .. 11 0x0D .. *********************************** Commands below MAV_CMD_NAV_LAST are commands that have a end criteria, eg "reached waypoint" or "reached altitude" *********************************** Command ID Name Parameter 1 Altitude Latitude Longitude 0x10 / 16 MAV_CMD_NAV_WAYPOINT - altitude lat lon 0x11 / 17 MAV_CMD_NAV_LOITER_UNLIM (indefinitely) - altitude lat lon 0x12 / 18 MAV_CMD_NAV_LOITER_TURNS turns altitude lat lon 0x13 / 19 MAV_CMD_NAV_LOITER_TIME time (seconds*10) altitude lat lon 0x14 / 20 MAV_CMD_NAV_RETURN_TO_LAUNCH - altitude lat lon 0x15 / 21 MAV_CMD_NAV_LAND - altitude lat lon 0x16 / 22 MAV_CMD_NAV_TAKEOFF takeoff pitch altitude - - NOTE: for command 0x16 the value takeoff pitch specifies the minimum pitch for the case with airspeed sensor and the target pitch for the case without. 0x17 / 23 MAV_CMD_NAV_TARGET - altitude lat lon *********************************** May Commands - these commands are optional to finish Command ID Name Parameter 1 Parameter 2 Parameter 3 Parameter 4 0x70 / 112 MAV_CMD_CONDITION_DELAY - - time (milliseconds) - 0x71 / 113 MAV_CMD_CONDITION_CHANGE_ALT rate (cm/sec) alt (finish) - - 0x72 / 114 MAV_CMD_NAV_LAND_OPTIONS (NOT CURRENTLY IN MAVLINK PROTOCOL) 0x23 MAV_CMD_CONDITION_ANGLE angle speed direction (-1,1) rel (1), abs (0) *********************************** Unexecuted commands > MAV_CMD_NAV_LAST are dropped when ready for the next command < MAV_CMD_NAV_LAST so plan/queue commands accordingly! For example if you had a string of CMD_MAV_CONDITION commands following a 0x10 command that had not finished when the waypoint was reached, the unexecuted CMD_MAV_CONDITION and CMD_MAV_DO commands would be skipped and the next command < MAV_CMD_NAV_LAST would be loaded *********************************** Now Commands - these commands are executed once until no more new now commands are available Command ID Name Parameter 1 Parameter 2 Parameter 3 Parameter 4 0xB1 / 177 MAV_CMD_DO_JUMP index repeat count 0XB2 / 178 MAV_CMD_DO_CHANGE_SPEED TODO - Fill in from protocol 0xB3 / 179 MAV_CMD_DO_SET_HOME 0xB4 / 180 MAV_CMD_DO_SET_PARAMETER 0xB5 / 181 MAV_CMD_DO_SET_RELAY 0xB6 / 182 MAV_CMD_DO_REPEAT_RELAY 0xB7 / 183 MAV_CMD_DO_SET_SERVO 0xB8 / 184 MAV_CMD_DO_REPEAT_SERVO