Missions ex-client
IMissionClientEx is a higher-level mission API on top of IMissionClient. It adds a local mission cache, sync state, mission distance, upload/download helpers, and start mission command support.
Download full mission with progress:
Create local mission and upload:
Start mission and change current item:
MissionClientExConfig
MissionClientExConfig extends MissionClientConfig.
Property | Type | Default | Description |
|---|---|---|---|
|
|
| Timeout for request/response mission calls. |
|
|
| Retry count for request/response calls. |
|
|
| Timeout for waiting next upload request from device. |
IMissionClientEx
Represents an extended interface for interacting with mission clients.
Property | Type | Description |
|---|---|---|
|
| Underlying low-level mission client. |
|
| This property represents an observable collection of MissionItems. |
|
|
|
|
| Current mission item index from remote side. |
|
| Last reached mission item index from remote side. |
|
| Total distance in km of all missions. |
Method | Return Type | Description |
|---|---|---|
|
| Starts the mission (sends MAV_CMD_MISSION_START). |
|
| Downloads mission to local cache and sends ACK. |
|
| Uploads a file to the server. |
|
| Creates and adds new local MissionItem object. |
|
| Removes an element at the specified index from the collection. |
|
| Clears mission on remote side. |
|
| Clears local mission cache only. |
|
| Sets current mission item on remote side. |
IMissionClientEx.StartMission
Parameter | Type | Description |
|---|---|---|
|
| First mission item index. |
|
| Last mission item index. |
|
| Cancel token argument. |
IMissionClientEx.Download
Parameter | Type | Description |
|---|---|---|
|
| Cancel token argument. |
|
| Optional. The callback to report progress during the download. |
IMissionClientEx.Upload
Parameter | Type | Description |
|---|---|---|
|
| Optional cancel token argument. |
|
| An optional callback to track the progress of the upload. The callback receives a value between 0 and 1 representing the progress percentage. |
IMissionClientEx.Remove
Parameter | Type | Description |
|---|---|---|
|
| The index of the element to remove. |
IMissionClientEx.ClearRemote
Parameter | Type | Description |
|---|---|---|
|
| Optional cancel token argument. |
IMissionClientEx.SetCurrent
Parameter | Type | Description |
|---|---|---|
|
| The index position to set as the current position. |
|
| Optional cancel token argument. |
MissionClientExHelper
Helper extension methods to quickly create common mission items.
Method | Return Type | Description |
|---|---|---|
|
| Adds a spline mission item to a vehicle's mission. |
|
| Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change |
|
| Adds a nav mission item to a vehicle's mission. |
|
| Adds a takeoff mission item to the mission. |
|
| Adds a land mission item to the mission list. |
|
| Adds a Region of Interest (ROI) mission item to the mission. |
IMissionClientEx.AddSplineMissionItem
Parameter | Type | Description |
|---|---|---|
|
| The vehicle's mission client |
|
| The geographic point for the mission item |
IMissionClientEx.SetVehicleSpeed
Parameter | Type | Description |
|---|---|---|
|
| The vehicle's mission client |
|
| Speed (-1 indicates no change, -2 indicates return to default vehicle speed) |
|
| Speed type of value set in param2 (such as airspeed, ground speed, and so on) |
|
| Throttle (-1 indicates no change, -2 indicates return to default vehicle throttle value) |
IMissionClientEx.AddNavMissionItem
Parameter | Type | Description |
|---|---|---|
|
| The mission client |
|
| The geographic point for the mission item |
|
| Hold time value written to Param1 |
|
| Accept radius value written to Param2 |
|
| Pass radius value written to Param3 |
|
| Yaw angle value written to Param4 |
IMissionClientEx.AddTakeOffMissionItem
Parameter | Type | Description |
|---|---|---|
|
| The mission client. |
|
| The coordinates of the takeoff point. |
|
| The pitch angle (optional, default = 0). |
|
| The yaw angle (optional, default = NaN). |
IMissionClientEx.AddLandMissionItem
Parameter | Type | Description |
|---|---|---|
|
| The vehicle that the mission item will be added to. |
|
| The geographical point of the land mission item. |
|
| The altitude at which the land mission item can be aborted, default is 0. |
|
| The mode of precision landing, default is PrecisionLandModeDisabled. |
|
| The yaw angle for the land mission item, default is NaN. |
IMissionClientEx.AddRoiMissionItem
Parameter | Type | Description |
|---|---|---|
|
| The mission client extension. |
|
| The geographical point target for the ROI. |
|
| The mode for the ROI (optional, defaults to MavRoi.MavRoiLocation). |
|
| The waypoint index of the mission item (optional, defaults to 0). |
|
| The ROI index (optional, defaults to 0). |