Flightplan format
The flightplan consist in a JSON with all the needed information. This page describes this format. Not all the keys are needed in order to create a new flightplan, some of the fields are automatically filled by the server
Flightplan specification
The flight plan specification is defined using a JSON Schema. For more details, please refer to https://json-schema.org/.
It's important to note that there are primarily two distinct formats outlined on this page. One format is used for creating plans, and it slightly differs from the format used for retrieving plans from the server. While the variations are minimal, it is crucial to pay close attention to the details.
Full plan creation
The full plan schema provided here is essential for creating a route or making deviations to an existing plan. Please be aware that the JSON schema presented is not an example but a template for your flight plan. An actual JSON example can be found at the end of this document.
{
id: "/simpleflightplan",
type: "object",
safetyProfile: { type: "string" }, #this is the uuid of the safety proffile to be applied to the route. If no safety profile is added the default settings will be applied
properties: {
mission: {
type: "array",
items: { $ref: "/simpleWaypoint" },
minItems: 4,
},
geoFence: {
type: "object",
properties: {
polygons: {
type: "array",
items: {
type: "object",
properties: {
inclusion: { type: "string", enum: ["inclusion", "exclusion"] },
type: { type: "string", enum: ["gournd_buffer", "geocage", "pregeocage", "polygon"] },
altAmsl: { type: "number", minimum: -100 },
vertices: { $ref: "/polygon" },
},
},
},
},
},
rallyPoints: {
type: "array",
items: { $ref: "/simpleRallypoint" },
},
},
required: ["mission"],
}
Waypoint
This specification corresponds to a waypoint and it's referenced from the full plan
Notice that the commands are just constants. You need to send the number of the command, not the string
MAV_CMD_NAV_TAKEOFF = 22
MAV_CMD_DO_VTOL_TRANSITION = 3000
MAV_CMD_NAV_WAYPOINT = 16
MAV_CMD_NAV_LAND = 21
{
id: "/simpleWaypoint",
type: "object",
properties: {
command: { type: "number", enum: [MAV_CMD_NAV_TAKEOFF, MAV_CMD_DO_VTOL_TRANSITION, MAV_CMD_NAV_WAYPOINT, MAV_CMD_NAV_LAND] },
altAmsl: { type: "number", minimum: -100 },
padAltAmsl: { type: "number", minimum: -100 },
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
groundAltitude: { type: "number", minimum: -100 },
transitionType: { type: "string", enum: ["front", "back"] },
precision: { type: "number", enum: [1, 0] },
},
required: ["command", "lat", "lon", "altAmsl"],
allOf: [
{
if: {
properties: { command: { const: MAV_CMD_DO_VTOL_TRANSITION } },
},
then: {
required: ["transitionType"],
},
},
],
}
polygon
This specification corresponds to a geocage polygon and it's referenced from the full plan
{
id: "/polygon",
type: "array",
minItems: 3,
items: {
type: "object",
properties: {
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
},
required: ["lat", "lon"],
},
},
Rallypoint
This specification corresponds to a rally point polygon and it's referenced from the full plan
{
id: "/simpleRallypoint",
type: "object",
properties: {
approachAltAmsl: { type: "number", minimum: -100 },
altAmsl: { type: "number", minimum: -100 },
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
},
required: ["lat", "lon"],
}
Example of a plan to request a route creation
{
"geoFence":{
"polygons": [
{
"type": "geocage",
"altAmsl": 606,
"inclusion": "inclusion",
"vertices": [
{
"lat":49.150077591022544,
"lon":16.825107180165574
},
{
"lat":49.1525792724473,
"lon":16.82125552802019
},
{
"lat":49.15376165013778,
"lon":16.81496843008928
},
{
"lat":49.159680131436424,
"lon":16.797056638287827
},
{
"lat":49.16061853343021,
"lon":16.78889467625551
},
{
"lat":49.1588066122935,
"lon":16.781934343861863
},
{
"lat":49.156665723624045,
"lon":16.763573282050416
},
{
"lat":49.154121708361615,
"lon":16.75222552626066
},
{
"lat":49.15045478109202,
"lon":16.749031685876176
},
{
"lat":49.15087034473323,
"lon":16.73482838331394
},
{
"lat":49.15204377237618,
"lon":16.728736080812737
},
{
"lat":49.15747909242239,
"lon":16.718050998287723
},
{
"lat":49.15871855242119,
"lon":16.707182896906957
},
{
"lat":49.15592011697326,
"lon":16.697717433680296
},
{
"lat":49.15532924349978,
"lon":16.69664389261881
},
{
"lat":49.15410684189552,
"lon":16.699218155817576
},
{
"lat": 49.15394953255132,
"lon":16.705954549951926
},
{
"lat":49.152632613814326,
"lon":16.71185015014045
},
{
"lat":49.1453995376264,
"lon":16.723716661917493
},
{
"lat":49.144687954965214,
"lon":16.73247223033242
},
{
"lat":49.14278810311593,
"lon":16.738223305555508
},
{
"lat":49.14037824223416,
"lon":16.739596806118712
},
{
"lat":49.140354745397154,
"lon":16.74912422208719
},
{
"lat":49.14489181364054,
"lon":16.757474609302804
},
{
"lat":49.1466213436577,
"lon":16.76951571612291
},
{
"lat":49.142827966263894,
"lon":16.777396046208665
},
{
"lat":49.146266933091326,
"lon":16.795914017247483
},
{
"lat":49.14568092194048,
"lon":16.80801614432268
},
{
"lat":49.14392284690498,
"lon":16.810891472386643
},
{
"lat":49.142629692022375,
"lon":16.81568189768724
},
{
"lat":49.14238228676779,
"lon":16.821888529347703
},
{
"lat":49.14256827948575,
"lon":16.825053535985276
},
{
"lat":49.144357985057624,
"lon":16.82549341826372
},
{
"lat":49.14684942832515,
"lon":16.82568653731279
}
]
}]
},
"mission": [
{
"altAmsl": 350,
"padAltAmsl": 267,
"command": 22,
"lat":49.15108304952246,
"lon":16.79625748449217
},
{
"altAmsl": 350,
"command": 16,
"lat":49.15052165642498,
"lon":16.763470161494123
},
{
"altAmsl": 350,
"command": 3000,
"lat":49.15052165642498,
"lon":16.763470161494123,
"transitionType":"front"
},
{
"altAmsl": 350,
"command": 16,
"lat":49.14911814584975,
"lon":16.754372108515607
},
{
"altAmsl": 350,
"command": 3000,
"lat":49.146872446229374,
"lon":16.745960701044904,
"transitionType":"back"
},
{
"command": 21,
"altAmsl": 360,
"lat":49.147939166240384,
"lon":16.732141960200178,
"padAltAmsl": 350
}
],
"rallyPoints": [
{
"altAmsl": 350,
"lat":49.15916640477572,
"lon":16.80844544225584
},
{
"lat":49.16489131666681,
"lon":16.78097962194334
}
]
}
Full plan retrving
When getting plans from the server you will notice some extra information into it. This information can be metadata or other extra information needed for the correct functioning of the flight.
{
id: "/flightplan",
type: "object",
properties: {
uuid: { type: "string" },
version: { type: "number", minimum: 1 },
safetySettings: {
type: "object",
},
safetyProfile: { type: "string" },
meta: {
type: "object",
properties: {
altitudeMode: { type: "number", enum: [0, 1, 2] },
},
required: ["altitudeMode"],
},
mission: {
type: "array",
items: { $ref: "/fullWpSchema" },
minItems: 4,
},
geoFence: {
type: "object",
properties: {
circles: {
type: "array",
items: {
type: "object",
properties: {
uuid: { type: "string" },
inclusion: { type: "string", enum: ["inclusion", "exclusion"] },
type: { type: "string", enum: ["ground_buffer", "geocage", "pregeocage", "polygon"] },
altAmsl: { type: "number", minimum: -100 },
center: {
type: "object",
properties: {
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
},
required: ["lat", "lon"],
},
radius: { type: "number", minimum: 0 },
altConversions: {
type: "object",
properties: {
altWgs84: { type: "number" },
},
},
meta: {
type: "object",
properties: {
editMode: { type: "boolean" },
color: { type: "string" },
visible: { type: "boolean" },
},
},
required: ["uuid", "inclusion", "type", "altAmsl", "radius", "center", "altConversions"],
},
},
},
polygons: {
type: "array",
items: {
type: "object",
properties: {
uuid: { type: "string" },
inclusion: { type: "string", enum: ["inclusion", "exclusion"] },
type: { type: "string", enum: ["ground_buffer", "geocage", "pregeocage", "polygon"] },
altAmsl: { type: "number", minimum: -100 },
vertices: { $ref: "/polygon" },
altConversions: {
type: "object",
properties: {
altWgs84: { type: "number" },
},
},
meta: {
type: "object",
properties: {
editMode: { type: "boolean" },
color: { type: "string" },
visible: { type: "boolean" },
},
},
},
required: ["uuid", "inclusion", "type", "altAmsl", "vertices", "altConversions"],
},
},
},
},
rallyPoints: {
type: "array",
items: { $ref: "/fullRallypointSchema" },
},
},
required: ["uuid", "version", "safetySettings", "safetyProfile", "mission", "geoFence", "rallyPoints"],
}
Waypoint
This specification corresponds to a waypoint and it's referenced from the full plan
Notice that the commands are just constants. You need to send the number of the command, not the string
MAV_CMD_NAV_TAKEOFF = 22
MAV_CMD_DO_VTOL_TRANSITION = 3000
MAV_CMD_NAV_WAYPOINT = 16
MAV_CMD_NAV_LAND = 21
MAV_CMD_DO_JUMP= 177
MAV_CMD_DO_CHANGE_SPEED= 178
{
id: "/fullWpSchema",
type: "object",
properties: {
uuid: { type: "string" },
command: { type: "number", enum: [MAV_CMD_NAV_TAKEOFF, MAV_CMD_DO_VTOL_TRANSITION, MAV_CMD_NAV_WAYPOINT, MAV_CMD_NAV_LAND, MAV_CMD_DO_JUMP, MAV_CMD_DO_CHANGE_SPEED] },
altAmsl: { type: "number", minimum: -100 },
padAltAmsl: { type: "number", minimum: -100 },
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
transitionType: { type: "string", enum: ["front", "back"] },
repeat: { type: "number", minimum: 1 },
speed: { type: "number", minimum: 0 },
jumpToUuid: { type: "string" },
precision: { type: "number", enum: [1, 0] },
altConversions: {
type: "object",
properties: {
altWgs84: { type: "number", minimum: -100 },
altPadWgs84: { type: "number", minimum: -100 },
altAboveTakeoff: { type: "number", minimum: -100 },
altAboveTerrain: { type: "number", minimum: -100 },
altGroundAmsl: { type: "number", minimum: -100 },
altGroundWgs84: { type: "number", minimum: -100 },
},
required: ["altWgs84", "altAboveTakeoff", "altAboveTerrain", "altGroundAmsl", "altGroundWgs84"],
},
},
required: ["uuid", "command", "lat", "lon", "altAmsl", "altConversions"],
allOf: [
{
if: {
properties: { command: { const: [MAV_CMD_NAV_TAKEOFF, MAV_CMD_NAV_LAND] } },
},
then: {
required: ["padAltAmsl"],
},
},
{
if: {
properties: { command: { const: MAV_CMD_DO_JUMP } },
},
then: {
required: ["repeat", "jumpToUuid"],
},
},
{
if: {
properties: { command: { const: MAV_CMD_DO_VTOL_TRANSITION } },
},
then: {
required: ["transitionType"],
},
},
{
if: {
properties: { command: { const: MAV_CMD_DO_CHANGE_SPEED } },
},
then: {
required: ["speed"],
},
},
],
}
polygon
This specification corresponds to a geocage polygon and it's referenced from the full plan
{
id: "/polygon",
type: "array",
minItems: 3,
items: {
type: "object",
properties: {
uuid: { type: "string" },
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
},
required: ["lat", "lon"],
},
},
Rallypoint
This specification corresponds to a rally point polygon and it's referenced from the full plan
{
id: "/fullRallypointSchema",
type: "object",
properties: {
uuid: { type: "string" },
lat: { type: "number", minimum: -90, maximum: 90 },
lon: { type: "number", minimum: -180, maximum: 180 },
altAmsl: { type: "number", minimum: -100 },
padAltAmsl: { type: "number", minimum: -100 },
altConversions: {
type: "object",
properties: {
altWgs84: { type: "number", minimum: -100 },
altPadWgs84: { type: "number", minimum: -100 },
},
required: ["altWgs84", "altPadWgs84"],
},
required: ["uuid", "lat", "lon", "altAmsl", "padAltAmsl", "altConversions"],
},
}
Example of a retrieved plan from the server
{
"uuid": "b2713cb8-87a6-45e1-9a4c-28004703fe69",
"version": 2,
"safetySettings": {
},
"safetyProfile": null,
"meta": {
"altitudeMode": 2
},
"geoFence": {
"circles": [
],
"polygons": [
{
"uuid": "78f08b61-c945-4d82-ae56-47ea48d5ccf3",
"inclusion": "inclusion",
"type": "geocage",
"altAmsl": 606,
"vertices": [
{
"uuid": "68442a88-53ec-470d-839f-95742c57f3e8",
"lat": 49.150077591022544,
"lon": 16.825107180165574
},
{
"uuid": "ad120520-0519-422d-bb11-105bebabca5b",
"lat": 49.1525792724473,
"lon": 16.82125552802019
},
{
"uuid": "54f0db2b-a5e7-42ea-b3d8-7d4c9eea0c7f",
"lat": 49.15376165013778,
"lon": 16.81496843008928
},
{
"uuid": "bc222f24-b791-4e3a-8015-f3afa175183b",
"lat": 49.159680131436424,
"lon": 16.797056638287827
},
{
"uuid": "42f4afe2-f7cd-42f7-8e98-2b3b5e74c743",
"lat": 49.16061853343021,
"lon": 16.78889467625551
},
{
"uuid": "4288233c-18de-41ce-b607-0bffb0657629",
"lat": 49.1588066122935,
"lon": 16.781934343861863
},
{
"uuid": "e51ea7d5-81b9-47fe-add0-b2e65db72551",
"lat": 49.156665723624045,
"lon": 16.763573282050416
},
{
"uuid": "57396284-694f-4dcf-a420-989aaa2e4635",
"lat": 49.154121708361615,
"lon": 16.75222552626066
},
{
"uuid": "1ba3b694-07ea-4432-af0e-411fdb6db73d",
"lat": 49.15045478109202,
"lon": 16.749031685876176
},
{
"uuid": "c57b86ac-1b6a-4e8c-a099-f85fe530e3dd",
"lat": 49.15087034473323,
"lon": 16.73482838331394
},
{
"uuid": "f24bebab-213c-4c11-827b-2b741e4d6c19",
"lat": 49.15204377237618,
"lon": 16.728736080812737
},
{
"uuid": "0a226c5d-ddde-48e8-b459-7a7d4887e498",
"lat": 49.15747909242239,
"lon": 16.718050998287723
},
{
"uuid": "8d65f43f-59e7-47ba-b76d-a993a4f2d374",
"lat": 49.15871855242119,
"lon": 16.707182896906957
},
{
"uuid": "2ebf2fdd-7bea-4bec-b8d0-51ac46cbd3bc",
"lat": 49.15592011697326,
"lon": 16.697717433680296
},
{
"uuid": "316bd508-aa33-44bc-af1c-b3fcc94f23cf",
"lat": 49.15532924349978,
"lon": 16.69664389261881
},
{
"uuid": "53027d73-f92f-4d62-8799-82e194b4cf39",
"lat": 49.15410684189552,
"lon": 16.699218155817576
},
{
"uuid": "4d7cea4c-80a2-4ab2-9e0b-86fd736ad85c",
"lat": 49.15394953255132,
"lon": 16.705954549951926
},
{
"uuid": "56e9fa55-8cc6-46d2-9e0d-364349149a92",
"lat": 49.152632613814326,
"lon": 16.71185015014045
},
{
"uuid": "ae229592-fb3b-4bbe-b677-dd97a026d1e9",
"lat": 49.1453995376264,
"lon": 16.723716661917493
},
{
"uuid": "3a23be4f-5501-42e5-97a3-0b9ea4212ab7",
"lat": 49.144687954965214,
"lon": 16.73247223033242
},
{
"uuid": "64da64c9-5752-47fa-b6d5-e19a9e5ea492",
"lat": 49.14278810311593,
"lon": 16.738223305555508
},
{
"uuid": "921b80b8-a41a-43c2-8850-1fd754b8768e",
"lat": 49.14037824223416,
"lon": 16.739596806118712
},
{
"uuid": "cab6d551-6f9a-4985-b58a-4214d641f041",
"lat": 49.140354745397154,
"lon": 16.74912422208719
},
{
"uuid": "c5d5f9c2-ca83-4b04-b427-d0d788072f9b",
"lat": 49.14489181364054,
"lon": 16.757474609302804
},
{
"uuid": "4916ff88-dd04-4f91-b641-e11bbdbf65ae",
"lat": 49.1466213436577,
"lon": 16.76951571612291
},
{
"uuid": "d2c4fabb-6755-4f88-beb0-828d8bf86062",
"lat": 49.142827966263894,
"lon": 16.777396046208665
},
{
"uuid": "744f2f38-8a44-4941-a587-1a7a586f38e9",
"lat": 49.146266933091326,
"lon": 16.795914017247483
},
{
"uuid": "daeff90e-c1d5-45d0-bced-a63d6af10325",
"lat": 49.14568092194048,
"lon": 16.80801614432268
},
{
"uuid": "c438ee8a-0d6a-4ae0-a253-091704526175",
"lat": 49.14392284690498,
"lon": 16.810891472386643
},
{
"uuid": "63a899e6-9204-462a-b232-e7a74747b798",
"lat": 49.142629692022375,
"lon": 16.81568189768724
},
{
"uuid": "91ea64b1-ed9f-4e58-87b6-33ade8d64835",
"lat": 49.14238228676779,
"lon": 16.821888529347703
},
{
"uuid": "dbc42693-2866-44ba-b95a-c4567d4d9e29",
"lat": 49.14256827948575,
"lon": 16.825053535985276
},
{
"uuid": "8302174c-e63a-445a-a7c4-1c1bf9775812",
"lat": 49.144357985057624,
"lon": 16.82549341826372
},
{
"uuid": "76b78e9c-f524-45fc-942c-66719aad3509",
"lat": 49.14684942832515,
"lon": 16.82568653731279
}
],
"altConversions": {
"altWgs84": 650.0502829949656
},
"meta": {
"editMode": false,
"color": "#ffa500",
"visible": true
}
}
]
},
"mission": [
{
"uuid": "6dc2dc6e-b932-49c9-a9a9-688d141b9a04",
"command": 22,
"altAmsl": 350,
"lat": 49.15108304952246,
"lon": 16.79625748449217,
"altConversions": {
"altWgs84": 394.11329777267474,
"altAboveTakeoff": 16,
"altAboveTerrain": 83,
"altGroundAmsl": 267,
"altGroundWgs84": 311.11329777267474
},
"padAltAmsl": 267
},
{
"uuid": "d7d7696b-195f-485f-8ca5-e78c85d76803",
"command": 16,
"altAmsl": 350,
"lat": 49.15052165642498,
"lon": 16.763470161494123,
"altConversions": {
"altWgs84": 394.18614799696365,
"altAboveTakeoff": 16,
"altAboveTerrain": 105.78,
"altGroundAmsl": 244.22,
"altGroundWgs84": 288.4061479969637
}
},
{
"uuid": "330f0c8b-900d-43fe-bdcd-05c6686968a4",
"command": 3000,
"altAmsl": 350,
"lat": 49.15052165642498,
"lon": 16.763470161494123,
"altConversions": {
"altWgs84": 394.18614799696365,
"altAboveTakeoff": 16,
"altAboveTerrain": 105.78,
"altGroundAmsl": 244.22,
"altGroundWgs84": 288.4061479969637
},
"transitionType": "front"
},
{
"uuid": "49b89cad-8354-456b-ab96-49ef983be771",
"command": 16,
"altAmsl": 350,
"lat": 49.14911814584975,
"lon": 16.754372108515607,
"altConversions": {
"altWgs84": 394.20467686945904,
"altAboveTakeoff": 16,
"altAboveTerrain": 110.02000000000001,
"altGroundAmsl": 239.98,
"altGroundWgs84": 284.18467686945905
}
},
{
"uuid": "dece8e01-bfe9-48a0-8f71-164fac36025f",
"command": 3000,
"altAmsl": 350,
"lat": 49.146872446229374,
"lon": 16.745960701044904,
"altConversions": {
"altWgs84": 394.22110539882925,
"altAboveTakeoff": 16,
"altAboveTerrain": 119.68,
"altGroundAmsl": 230.32,
"altGroundWgs84": 274.54110539882925
},
"transitionType": "back"
},
{
"uuid": "ab561e5c-cc75-4a11-8719-14069ed94f6e",
"command": 16,
"altAmsl": 360,
"lat": 49.147939166240384,
"lon": 16.732141960200178,
"altConversions": {
"altWgs84": 404.2607765552109,
"altAboveTakeoff": 16,
"altAboveTerrain": 10,
"altGroundAmsl": 350,
"altGroundWgs84": 394.2607765552109
}
},
{
"uuid": "ddbcf338-99b5-4f4e-8fc6-dfae1a16214a",
"command": 21,
"altAmsl": 360,
"lat": 49.147939166240384,
"lon": 16.732141960200178,
"altConversions": {
"altWgs84": 404.2607765552109,
"altAboveTakeoff": 16,
"altAboveTerrain": 10,
"altGroundAmsl": 350,
"altGroundWgs84": 394.2607765552109
},
"padAltAmsl": 350
}
],
"rallyPoints": [
{
"uuid": "681ee0b6-f94f-4e4b-a7e7-244e3b10d9a1",
"lat": 49.15916640477572,
"lon": 16.80844544225584,
"padAltAmsl": 266.64,
"altAmsl": 286.64,
"altConversions": {
"altWgs84": 330.7479568737182,
"altPadWgs84": 310.7479568737182
}
},
{
"uuid": "b2f1b70b-bd2a-49ed-ad33-3088d07da1e8",
"lat": 49.16489131666681,
"lon": 16.78097962194334,
"padAltAmsl": 233.8,
"altAmsl": 253.8,
"altConversions": {
"altWgs84": 297.98100594923847,
"altPadWgs84": 277.98100594923847
}
}
]
}