上传航点的mavlink包
MISSION_ITEM ( #39 )
- Message encoding a mission item. This message is emitted to announce the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). See also https://mavlink.io/en/services/mission.html.
断点续飞:
mission.set_current_cmd();设置从第几个点开始。
mavlink_msg_mission_current_send();将当前的点的序号发送给GCS。
几个常见的上传命令:
MAV_CMD_NAV_TAKEOFF (22 )
param4:yaw angle 、param5:Latitude、param6:Longitude、param7:Altitude
MAV_CMD_DO_CHANGE_SPEED (178 )
param1:Speed Type、param2:Speed、param3:Throttle、param4:Relative
MAV_CMD_NAV_WAYPOINT (16 )
param1:Hold time、param2:Acceptance radius、param3:Pass Radius、param4:Desired Yaw、param5:lat、param6:lon、param7:alt