Skip to main content

Get current drone mission

Retrieves the current mission for the specified drone

 GET /api/1.0/drone/{droneId}/mission
tip

droneId can be obtained from the get drone list endpoint. You can use the id field or the serialNumber field. Both values will work.

Response

Model: application/json

You can find the route specification at Flightplan format

caution

If the drone is not connected to the system, this call will return an empty mission as value.

Example

const fetchData=async ()=>{
let j,response;
const serverResponse = await fetch(`https://cloud.rigi.tech/api/1.0/drone/41/misssion`, {
mode: "cors",
method: "GET",
referrer: "no-referrer",
headers: {"authorization": "Bearer " + token}
})
if(!serverResponse.ok){
try {
switch (serverResponse.status){
case 400:
j = await serverResponse.json();
break;
case 403:
response = { message: "Forbidden access to data" };
case 404:
response = { message: "Address not found" };
default:
j = await serverResponse.json()
}
} catch (e) {
response = { message: "Error fetching data" };
}
}else{
j = await serverResponse.json()
}

response = { data:j };
const {data, message} = response
if(message) console.debug(message)
if(data) console.debug(data)
}
fetchData()

Answer:

{
"fileType": "Plan",
"geoFence": {
"circles": [],
"polygons": [],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 12,
"hoverSpeed": 5,
"items": [
{
"AMSLAltAboveTerrain": 1502,
"WGS84Altitude": 1534.622186577788,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
0,
0,
0,
null,
46.528106480035156,
7.111464262022529,
80
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 1702,
"WGS84Altitude": 1746.7657908230472,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
46.577215025068966,
7.130690336241279,
80
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 1702,
"WGS84Altitude": 1746.7657908230472,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
46.596091095095595,
7.155409574522529,
80
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 1702,
"WGS84Altitude": 1746.7657908230472,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
46.594510235348935,
7.1645893837283126,
80
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 1702,
"WGS84Altitude": 1746.7657908230472,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
46.5860165694928,
7.1700825477908126,
80
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": 1702,
"WGS84Altitude": 1746.7657908230472,
"AltitudeAboveTerrain": null,
"Altitude": 80,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
46.57492561360571,
7.1618428016970626,
80
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
46.528106480035156,
7.1166141033311225,
1622,
1666.7657908230472
],
"vehicleType": 20,
"version": 2
},
"rallyPoints": {
"points": [],
"version": 2
},
"version": 1
}