Commit 6d59dbd1 authored by Valentin Platzgummer's avatar Valentin Platzgummer

tidy up

parent fc550843
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76776040370392,
16.530569413178814,
8
],
"type": "SimpleItem"
},
{
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76826616141194,
16.530725666402216,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825906623652,
16.53087697971209,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825595539324,
16.531028590198325,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825595539324,
16.531028590198325,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76816596834739,
16.53106809506861,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76816596834739,
16.53106809506861,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76816873697609,
16.530889307913807,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76817686074449,
16.530710882254596,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768190323493215,
16.530533173006166,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768190323493215,
16.530533173006166,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811851790795,
16.530350914563478,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811851790795,
16.530350914563478,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768099209120734,
16.530538775407198,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76808571028981,
16.53072775601019,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807804981345,
16.53091745880308,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807624380742,
16.53110748469719,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807624380742,
16.53110748469719,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798674683302,
16.531146065535864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798674683302,
16.531146065535864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798738725695,
16.530953664408617,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7679938426545,
16.530761500810428,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76800609996228,
16.530569963610645,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802413437596,
16.530379440411014,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802413437596,
16.530379440411014,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792911566441,
16.53041829010208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792911566441,
16.53041829010208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76791032279039,
16.53064518113584,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767899456183414,
16.530873216172655,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76826616141194,
16.530725666402216
],
[
47.76825906623652,
16.53087697971209
],
[
47.76825595539324,
16.531028590198325
],
[
47.76825595539324,
16.531028590198325
],
[
47.76816596834739,
16.53106809506861
],
[
47.76816596834739,
16.53106809506861
],
[
47.76816873697609,
16.530889307913807
],
[
47.76817686074449,
16.530710882254596
],
[
47.768190323493215,
16.530533173006166
],
[
47.768190323493215,
16.530533173006166
],
[
47.76811851790795,
16.530350914563478
],
[
47.76811851790795,
16.530350914563478
],
[
47.768099209120734,
16.530538775407198
],
[
47.76808571028981,
16.53072775601019
],
[
47.76807804981345,
16.53091745880308
],
[
47.76807624380742,
16.53110748469719
],
[
47.76807624380742,
16.53110748469719
],
[
47.76798674683302,
16.531146065535864
],
[
47.76798674683302,
16.531146065535864
],
[
47.76798738725695,
16.530953664408617
],
[
47.7679938426545,
16.530761500810428
],
[
47.76800609996228,
16.530569963610645
],
[
47.76802413437596,
16.530379440411014
],
[
47.76802413437596,
16.530379440411014
],
[
47.76792911566441,
16.53041829010208
],
[
47.76792911566441,
16.53041829010208
],
[
47.76791032279039,
16.53064518113584
],
[
47.767899456183414,
16.530873216172655
]
],
"version": 1
},
"complexItemType": "circularSurvey",
"deltaAlpha": 3,
"deltaR": 10,
"fixedDirection": false,
"polygon": [
[
47.768115102959555,
16.530342246669797
],
[
47.76836640344051,
16.530980102821747
],
[
47.76798694569257,
16.531146687122508
],
[
47.76777418124312,
16.530481637145055
]
],
"referencePointAlt": 0,
"referencePointLat": 47.77086091347008,
"referencePointLong": 16.531071041719485,
"reverse": false,
"transectMinLength": 15,
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 5,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76783728246855,
16.530678876245194,
5
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76776040370392,
16.530569413178814,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76776040370392,
16.530569413178814,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"AreaItems": [
{
"AreaType": "Service Area",
"BorderPolygonOffset": 6,
"DepotAltitude": 0,
"DepotLatitude": 47.76779586216649,
"DepotLongitude": 16.530510396830728,
"ShowBorderPolygon": 0,
"maxAltitude": 30,
"polygon": [
[
47.76780094967389,
16.530343715825353
],
[
47.76788238112663,
16.530625096151965
],
[
47.767783696604035,
16.530655731490725
],
[
47.76771642095403,
16.53041704413795
]
]
},
{
"AreaType": "Measurement Area",
"BorderPolygonOffset": 6,
"MinTileAreaPercent": 30,
"ShowBorderPolygon": 0,
"ShowTiles": true,
"TileHeight": 5,
"TileWidth": 5,
"maxAltitude": 30,
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
],
"plannedHomePosition": [
null,
null,
null
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
{
"AreaItems": [
{
"AreaType": "Service Area",
"BorderPolygonOffset": 6,
"DepotAltitude": 0,
"DepotLatitude": 47.76779586216649,
"DepotLongitude": 16.530510396830728,
"ShowBorderPolygon": 0,
"maxAltitude": 30,
"polygon": [
[
47.76780094967389,
16.530343715825353
],
[
47.76788238112663,
16.530625096151965
],
[
47.767783696604035,
16.530655731490725
],
[
47.76771642095403,
16.53041704413795
]
]
},
{
"AreaType": "Measurement Area",
"BorderPolygonOffset": 6,
"MinTileAreaPercent": 30,
"ShowBorderPolygon": 0,
"ShowTiles": true,
"TileHeight": 5,
"TileWidth": 5,
"maxAltitude": 30,
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.76812093862815,
16.53088714314225
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
10
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"NumRuns": 1,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76810433066452,
"ReferencePointLong": 16.530712738301304,
"Run": 1,
"TransectDistance": 3,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 10,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76783728898401,
16.530481694784847,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802613957926,
16.53114161450939,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768179446847086,
16.53106276402324,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812171672615,
16.530861029906276,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831125432985,
16.530806354689858,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768358305251056,
16.530970771201435,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76833275405663,
16.53098391307365,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76818906969824,
16.530481820523075,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810775728066,
16.530504966391423,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825610046365,
16.53102333861304,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768281651653936,
16.531010196779448,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810310388368,
16.530386278613275,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809845036399,
16.530267590829624,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76830720286059,
16.53099705493299,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76823054925376,
16.531036480433762,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768112410554885,
16.530623654217433,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811706370638,
16.530742342037925,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820499805124,
16.531049622228267,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815389564133,
16.531075905805334,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768086884966515,
16.53084174152664,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76803696584865,
16.530769731894658,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812834442496,
16.531089047574557,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810279321597,
16.53110218933091,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798704669417,
16.530697722387153,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767937127512056,
16.530625713070812,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807724201434,
16.531115331061052,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768051690793115,
16.531128472791657,
10
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76788720826634,
16.530553703838915,
10
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76783728898401,
16.530481694784847
],
[
47.76802613957926,
16.53114161450939
],
[
47.768179446847086,
16.53106276402324
],
[
47.76812171672615,
16.530861029906276
],
[
47.76831125432985,
16.530806354689858
],
[
47.768358305251056,
16.530970771201435
],
[
47.76833275405663,
16.53098391307365
],
[
47.76818906969824,
16.530481820523075
],
[
47.76810775728066,
16.530504966391423
],
[
47.76825610046365,
16.53102333861304
],
[
47.768281651653936,
16.531010196779448
],
[
47.76810310388368,
16.530386278613275
],
[
47.76809845036399,
16.530267590829624
],
[
47.76830720286059,
16.53099705493299
],
[
47.76823054925376,
16.531036480433762
],
[
47.768112410554885,
16.530623654217433
],
[
47.76811706370638,
16.530742342037925
],
[
47.76820499805124,
16.531049622228267
],
[
47.76815389564133,
16.531075905805334
],
[
47.768086884966515,
16.53084174152664
],
[
47.76803696584865,
16.530769731894658
],
[
47.76812834442496,
16.531089047574557
],
[
47.76810279321597,
16.53110218933091
],
[
47.76798704669417,
16.530697722387153
],
[
47.767937127512056,
16.530625713070812
],
[
47.76807724201434,
16.531115331061052
],
[
47.768051690793115,
16.531128472791657
],
[
47.76788720826634,
16.530553703838915
]
],
"version": 1
},
"Type": 1,
"Variant": 0,
"complexItemType": "CircularSurvey",
"polygon": [
[
50.54939570164431,
7.196328001507449
],
[
50.54939570164431,
7.238775845997314
],
[
50.522416083956976,
7.238775845997314
],
[
50.522416083956976,
7.196328001507449
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 10,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807639917751,
16.530893624112736,
10
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 10,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
10
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
{
"AreaItems": [
{
"AreaType": "Service Area",
"BorderPolygonOffset": 6,
"DepotAltitude": 0,
"DepotLatitude": 47.76779586216649,
"DepotLongitude": 16.530510396830728,
"ShowBorderPolygon": 0,
"maxAltitude": 30,
"polygon": [
[
47.76780094967389,
16.530343715825353
],
[
47.76805488782486,
16.530781775057022
],
[
47.767783696604035,
16.530655731490725
],
[
47.76771642095403,
16.53041704413795
]
]
},
{
"AreaType": "Measurement Area",
"BorderPolygonOffset": 6,
"MinTileAreaPercent": 30,
"ShowBorderPolygon": 0,
"ShowTiles": true,
"TileHeight": 5,
"TileWidth": 5,
"maxAltitude": 30,
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
],
"plannedHomePosition": [
null,
null,
null
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
{
"AreaItems": [
{
"AreaType": "Service Area",
"BorderPolygonOffset": 6,
"DepotAltitude": 0,
"DepotLatitude": 47.76779586216649,
"DepotLongitude": 16.530510396830728,
"ShowBorderPolygon": 0,
"maxAltitude": 30,
"polygon": [
[
47.76809291417393,
16.53012652393579
],
[
47.7681907801866,
16.53040358920316
],
[
47.767783696604035,
16.530655731490725
],
[
47.76771642095403,
16.53041704413795
]
]
},
{
"AreaType": "Measurement Area",
"BorderPolygonOffset": 6,
"MinTileAreaPercent": 30,
"ShowBorderPolygon": 0,
"ShowTiles": true,
"TileHeight": 5,
"TileWidth": 5,
"maxAltitude": 30,
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
],
"plannedHomePosition": [
null,
null,
null
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
{
"AreaItems": [
{
"AreaType": "Service Area",
"BorderPolygonOffset": 6,
"DepotAltitude": 0,
"DepotLatitude": 47.76807026847266,
"DepotLongitude": 16.5302609042063,
"ShowBorderPolygon": 0,
"maxAltitude": 30,
"polygon": [
[
47.76809291417393,
16.53012652393579
],
[
47.7681907801866,
16.53040358920316
],
[
47.767783696604035,
16.530655731490725
],
[
47.76771642095403,
16.53041704413795
]
]
},
{
"AreaType": "Measurement Area",
"BorderPolygonOffset": 6,
"MinTileAreaPercent": 30,
"ShowBorderPolygon": 0,
"ShowTiles": true,
"TileHeight": 5,
"TileWidth": 5,
"maxAltitude": 30,
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.76803790826872,
16.53059609924395
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
],
"plannedHomePosition": [
null,
null,
null
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
5
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.530610531894183,
"TransectDistance": 10,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7677958621741,
16.53051039683979,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768085758380195,
16.53111095084737,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812500283788,
16.530906658047133,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825609974418,
16.531023338983744,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822245220941,
16.530564330637993,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7677958621741,
16.53051039683979,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.7677958621741,
16.53051039683979
],
[
47.76795620865596,
16.530658248522045
],
[
47.768085758380195,
16.53111095084737
],
[
47.768170929071175,
16.531067144987073
],
[
47.76812500283788,
16.530906658047133
],
[
47.768170929071175,
16.531067144987073
],
[
47.76811004588309,
16.530512964621895
],
[
47.76811004588309,
16.530512964621895
],
[
47.76825609974418,
16.531023338983744
],
[
47.76834127040819,
16.53097953282404
],
[
47.76822245220941,
16.530564330637993
],
[
47.76834127040819,
16.53097953282404
],
[
47.76795620865596,
16.530658248522045
],
[
47.7677958621741,
16.53051039683979
]
],
"version": 1
},
"Type": 1,
"complexItemType": "CircularSurvey",
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
5
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"NumRuns": 1,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.530610531894183,
"Run": 1,
"TransectDistance": 2,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76782117293054,
16.53045952207802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76801762181985,
16.531145995440625,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812651838593,
16.53090512987649,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768125250928335,
16.530839239105784,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768187963203616,
16.531058383792516,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768204997344334,
16.531049622605572,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812144975848,
16.530757670470322,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811764852164,
16.530676101820056,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768222031484335,
16.53104086139957,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768239065614615,
16.53103210018785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768113847226864,
16.530594533208365,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825609974418,
16.531023338983744,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76827313388202,
16.53101457776058,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810624447235,
16.53043139603398,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815568510607,
16.530399305509537,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76832423627323,
16.530988294070095,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822245220941,
16.530564330637993,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831125125834,
16.530806346203697,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768358304533436,
16.530970771572267,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768307202146545,
16.53099705529708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809864148597,
16.530268258893802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768102443012644,
16.530349827431266,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76829016801015,
16.531005816531692,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812500283788,
16.530906658047133,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809124406109,
16.53085697602152,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 30,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815389493801,
16.53107590617591,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 31,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136860795146,
16.531084667345684,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 32,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76805748523563,
16.53080729404687,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802372639744,
16.53075761214986,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811982666054,
16.531093428523086,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810279252523,
16.53110218969476,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 36,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798996754654,
16.530707930317146,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 37,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 38,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768085758380195,
16.53111095084737,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 39,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76806872423443,
16.5311197120076,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 40,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792244976166,
16.53060856681793,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 41,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76788869084566,
16.53055888517811,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 42,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768051690105956,
16.531128473148772,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 43,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76803465596775,
16.53113723429756,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 44,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767854931889964,
16.530509203589244,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76782117293054,
16.53045952207802
],
[
47.76801762181985,
16.531145995440625
],
[
47.76812651838593,
16.53090512987649
],
[
47.768125250928335,
16.530839239105784
],
[
47.768187963203616,
16.531058383792516
],
[
47.768204997344334,
16.531049622605572
],
[
47.76812144975848,
16.530757670470322
],
[
47.76811764852164,
16.530676101820056
],
[
47.768222031484335,
16.53104086139957
],
[
47.768239065614615,
16.53103210018785
],
[
47.768113847226864,
16.530594533208365
],
[
47.76811004588309,
16.530512964621895
],
[
47.76825609974418,
16.531023338983744
],
[
47.76827313388202,
16.53101457776058
],
[
47.76810624447235,
16.53043139603398
],
[
47.76815568510607,
16.530399305509537
],
[
47.76832423627323,
16.530988294070095
],
[
47.76834127040819,
16.53097953282404
],
[
47.76822245220941,
16.530564330637993
],
[
47.76831125125834,
16.530806346203697
],
[
47.768358304533436,
16.530970771572267
],
[
47.768307202146545,
16.53099705529708
],
[
47.76809864148597,
16.530268258893802
],
[
47.768102443012644,
16.530349827431266
],
[
47.76829016801015,
16.531005816531692
],
[
47.768170929071175,
16.531067144987073
],
[
47.76812500283788,
16.530906658047133
],
[
47.76809124406109,
16.53085697602152
],
[
47.76815389493801,
16.53107590617591
],
[
47.768136860795146,
16.531084667345684
],
[
47.76805748523563,
16.53080729404687
],
[
47.76802372639744,
16.53075761214986
],
[
47.76811982666054,
16.531093428523086
],
[
47.76810279252523,
16.53110218969476
],
[
47.76798996754654,
16.530707930317146
],
[
47.76795620865596,
16.530658248522045
],
[
47.768085758380195,
16.53111095084737
],
[
47.76806872423443,
16.5311197120076
],
[
47.76792244976166,
16.53060856681793
],
[
47.76788869084566,
16.53055888517811
],
[
47.768051690105956,
16.531128473148772
],
[
47.76803465596775,
16.53113723429756
],
[
47.767854931889964,
16.530509203589244
]
],
"version": 1
},
"Type": 1,
"Variant": 0,
"complexItemType": "CircularSurvey",
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 48,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
5
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"NumRuns": 1,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.530610531894183,
"Run": 1,
"TransectDistance": 2,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76782117293054,
16.53045952207802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76801762181985,
16.531145995440625,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812651838593,
16.53090512987649,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768125250928335,
16.530839239105784,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768187963203616,
16.531058383792516,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768204997344334,
16.531049622605572,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812144975848,
16.530757670470322,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811764852164,
16.530676101820056,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768222031484335,
16.53104086139957,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768239065614615,
16.53103210018785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768113847226864,
16.530594533208365,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825609974418,
16.531023338983744,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76827313388202,
16.53101457776058,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810624447235,
16.53043139603398,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815568510607,
16.530399305509537,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76832423627323,
16.530988294070095,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822245220941,
16.530564330637993,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831125125834,
16.530806346203697,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768358304533436,
16.530970771572267,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768307202146545,
16.53099705529708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809864148597,
16.530268258893802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768102443012644,
16.530349827431266,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76829016801015,
16.531005816531692,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812500283788,
16.530906658047133,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809124406109,
16.53085697602152,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 30,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815389493801,
16.53107590617591,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 31,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136860795146,
16.531084667345684,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 32,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76805748523563,
16.53080729404687,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802372639744,
16.53075761214986,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811982666054,
16.531093428523086,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810279252523,
16.53110218969476,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 36,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798996754654,
16.530707930317146,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 37,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 38,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768085758380195,
16.53111095084737,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 39,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76806872423443,
16.5311197120076,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 40,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792244976166,
16.53060856681793,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 41,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76788869084566,
16.53055888517811,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 42,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768051690105956,
16.531128473148772,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 43,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76803465596775,
16.53113723429756,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 44,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767854931889964,
16.530509203589244,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76782117293054,
16.53045952207802
],
[
47.76801762181985,
16.531145995440625
],
[
47.76812651838593,
16.53090512987649
],
[
47.768125250928335,
16.530839239105784
],
[
47.768187963203616,
16.531058383792516
],
[
47.768204997344334,
16.531049622605572
],
[
47.76812144975848,
16.530757670470322
],
[
47.76811764852164,
16.530676101820056
],
[
47.768222031484335,
16.53104086139957
],
[
47.768239065614615,
16.53103210018785
],
[
47.768113847226864,
16.530594533208365
],
[
47.76811004588309,
16.530512964621895
],
[
47.76825609974418,
16.531023338983744
],
[
47.76827313388202,
16.53101457776058
],
[
47.76810624447235,
16.53043139603398
],
[
47.76815568510607,
16.530399305509537
],
[
47.76832423627323,
16.530988294070095
],
[
47.76834127040819,
16.53097953282404
],
[
47.76822245220941,
16.530564330637993
],
[
47.76831125125834,
16.530806346203697
],
[
47.768358304533436,
16.530970771572267
],
[
47.768307202146545,
16.53099705529708
],
[
47.76809864148597,
16.530268258893802
],
[
47.768102443012644,
16.530349827431266
],
[
47.76829016801015,
16.531005816531692
],
[
47.768170929071175,
16.531067144987073
],
[
47.76812500283788,
16.530906658047133
],
[
47.76809124406109,
16.53085697602152
],
[
47.76815389493801,
16.53107590617591
],
[
47.768136860795146,
16.531084667345684
],
[
47.76805748523563,
16.53080729404687
],
[
47.76802372639744,
16.53075761214986
],
[
47.76811982666054,
16.531093428523086
],
[
47.76810279252523,
16.53110218969476
],
[
47.76798996754654,
16.530707930317146
],
[
47.76795620865596,
16.530658248522045
],
[
47.768085758380195,
16.53111095084737
],
[
47.76806872423443,
16.5311197120076
],
[
47.76792244976166,
16.53060856681793
],
[
47.76788869084566,
16.53055888517811
],
[
47.768051690105956,
16.531128473148772
],
[
47.76803465596775,
16.53113723429756
],
[
47.767854931889964,
16.530509203589244
]
],
"version": 1
},
"Type": 1,
"Variant": 0,
"complexItemType": "CircularSurvey",
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 48,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
5
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"NumRuns": 1,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.530610531894183,
"Run": 1,
"TransectDistance": 2,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76782117293054,
16.53045952207802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76801762181985,
16.531145995440625,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812651838593,
16.53090512987649,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768125250928335,
16.530839239105784,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768187963203616,
16.531058383792516,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768204997344334,
16.531049622605572,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812144975848,
16.530757670470322,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811764852164,
16.530676101820056,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768222031484335,
16.53104086139957,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768239065614615,
16.53103210018785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768113847226864,
16.530594533208365,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825609974418,
16.531023338983744,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76827313388202,
16.53101457776058,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810624447235,
16.53043139603398,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815568510607,
16.530399305509537,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76832423627323,
16.530988294070095,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822245220941,
16.530564330637993,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831125125834,
16.530806346203697,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768358304533436,
16.530970771572267,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768307202146545,
16.53099705529708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809864148597,
16.530268258893802,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768102443012644,
16.530349827431266,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76829016801015,
16.531005816531692,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812500283788,
16.530906658047133,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809124406109,
16.53085697602152,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 30,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815389493801,
16.53107590617591,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 31,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136860795146,
16.531084667345684,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 32,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76805748523563,
16.53080729404687,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802372639744,
16.53075761214986,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811982666054,
16.531093428523086,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810279252523,
16.53110218969476,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 36,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798996754654,
16.530707930317146,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 37,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 38,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768085758380195,
16.53111095084737,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 39,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76806872423443,
16.5311197120076,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 40,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792244976166,
16.53060856681793,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 41,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76788869084566,
16.53055888517811,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 42,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768051690105956,
16.531128473148772,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 43,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76803465596775,
16.53113723429756,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 44,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767854931889964,
16.530509203589244,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76782117293054,
16.53045952207802
],
[
47.76801762181985,
16.531145995440625
],
[
47.76812651838593,
16.53090512987649
],
[
47.768125250928335,
16.530839239105784
],
[
47.768187963203616,
16.531058383792516
],
[
47.768204997344334,
16.531049622605572
],
[
47.76812144975848,
16.530757670470322
],
[
47.76811764852164,
16.530676101820056
],
[
47.768222031484335,
16.53104086139957
],
[
47.768239065614615,
16.53103210018785
],
[
47.768113847226864,
16.530594533208365
],
[
47.76811004588309,
16.530512964621895
],
[
47.76825609974418,
16.531023338983744
],
[
47.76827313388202,
16.53101457776058
],
[
47.76810624447235,
16.53043139603398
],
[
47.76815568510607,
16.530399305509537
],
[
47.76832423627323,
16.530988294070095
],
[
47.76834127040819,
16.53097953282404
],
[
47.76822245220941,
16.530564330637993
],
[
47.76831125125834,
16.530806346203697
],
[
47.768358304533436,
16.530970771572267
],
[
47.768307202146545,
16.53099705529708
],
[
47.76809864148597,
16.530268258893802
],
[
47.768102443012644,
16.530349827431266
],
[
47.76829016801015,
16.531005816531692
],
[
47.768170929071175,
16.531067144987073
],
[
47.76812500283788,
16.530906658047133
],
[
47.76809124406109,
16.53085697602152
],
[
47.76815389493801,
16.53107590617591
],
[
47.768136860795146,
16.531084667345684
],
[
47.76805748523563,
16.53080729404687
],
[
47.76802372639744,
16.53075761214986
],
[
47.76811982666054,
16.531093428523086
],
[
47.76810279252523,
16.53110218969476
],
[
47.76798996754654,
16.530707930317146
],
[
47.76795620865596,
16.530658248522045
],
[
47.768085758380195,
16.53111095084737
],
[
47.76806872423443,
16.5311197120076
],
[
47.76792244976166,
16.53060856681793
],
[
47.76788869084566,
16.53055888517811
],
[
47.768051690105956,
16.531128473148772
],
[
47.76803465596775,
16.53113723429756
],
[
47.767854931889964,
16.530509203589244
]
],
"version": 1
},
"Type": 1,
"Variant": 0,
"complexItemType": "CircularSurvey",
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 48,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 1,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76779586216649,
16.530510396830728,
5
],
"type": "SimpleItem"
},
{
"Alpha": 23,
"MinLength": 5,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.530610531894183,
"TransectDistance": 10,
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 15,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 0,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7677958621741,
16.53051039683979,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768085758380195,
16.53111095084737,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76812500283788,
16.530906658047133,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768170929071175,
16.531067144987073,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811004588309,
16.530512964621895,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76825609974418,
16.531023338983744,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822245220941,
16.530564330637993,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834127040819,
16.53097953282404,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795620865596,
16.530658248522045,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7677958621741,
16.53051039683979,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.7677958621741,
16.53051039683979
],
[
47.76795620865596,
16.530658248522045
],
[
47.768085758380195,
16.53111095084737
],
[
47.768170929071175,
16.531067144987073
],
[
47.76812500283788,
16.530906658047133
],
[
47.768170929071175,
16.531067144987073
],
[
47.76811004588309,
16.530512964621895
],
[
47.76811004588309,
16.530512964621895
],
[
47.76825609974418,
16.531023338983744
],
[
47.76834127040819,
16.53097953282404
],
[
47.76822245220941,
16.530564330637993
],
[
47.76834127040819,
16.53097953282404
],
[
47.76795620865596,
16.530658248522045
],
[
47.7677958621741,
16.53051039683979
]
],
"version": 1
},
"Type": 1,
"complexItemType": "CircularSurvey",
"polygon": [
[
47.76809580679245,
16.530246122817612
],
[
47.76823933601322,
16.53060087654427
],
[
47.7683711160486,
16.530967006195464
],
[
47.7680076482754,
16.531153949077463
],
[
47.7677855557718,
16.530403347547246
],
[
47.768126518382985,
16.5309051298743
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": 0,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76779586216649,
16.530510396830728,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76779586216649,
16.530510396830728,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
{
"AreaItems": [
{
"AreaType": "Operation Area",
"BorderPolygonOffset": 5,
"BottomLayerAltitude": 10,
"LayerDistance": 2,
"NumberOfLayers": 1,
"maxAltitude": 30,
"polygon": [
[
47.76814130285164,
16.530347986094483
],
[
47.768405048556495,
16.530985979841546
],
[
47.76804190441199,
16.531139778691
],
[
47.76780598957649,
16.53043671316874
]
]
},
{
"AreaType": "Service Area",
"maxAltitude": 30,
"polygon": [
[
47.76775534116353,
16.53042897362141
],
[
47.76780537519892,
16.530588940000627
],
[
47.76771276042304,
16.530596856755835
],
[
47.767657403517816,
16.530447977233962
]
]
},
{
"AreaType": "Corridor",
"maxAltitude": 30,
"polygon": [
[
47.76777556807082,
16.53055092911842
],
[
47.76781389199906,
16.530691889469182
],
[
47.76790225054143,
16.53064278774005
],
[
47.76792886425493,
16.530728315200577
],
[
47.7677888758332,
16.53078295757672
],
[
47.767725534701874,
16.530560429265805
]
]
}
],
"MissionItems": {
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 12,
"hoverSpeed": 5,
"items": [
{
"autoContinue": true,
"command": 530,
"doJumpId": 1,
"frame": 2,
"params": [
0,
2,
null,
null,
null,
null,
null
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 50,
"AltitudeMode": 1,
"autoContinue": true,
"command": 22,
"doJumpId": 2,
"frame": 3,
"params": [
15,
0,
0,
null,
47.76773272010195,
16.53051568687008,
50
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 50,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76781389199906,
16.530691889469182,
50
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 50,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76787939989352,
16.530655486091632,
50
],
"type": "SimpleItem"
},
{
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 2,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 50,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 47,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76781102855973,
16.530451729978072,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 6,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 7,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76787704224262,
16.53041791205613,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76799131139914,
16.530387675399677,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 10,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7678191324091,
16.530475880495707,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76782723625342,
16.53050003102087,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 13,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810558054772,
16.530357438610363,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76814793980895,
16.530364040530976,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 16,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76783534009267,
16.530524181553563,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76784344392685,
16.530548332093776,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 19,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815759518296,
16.530387396369257,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768167250552246,
16.530410752216213,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 22,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76785154775597,
16.530572482641514,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76785965158001,
16.53059663319678,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 25,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76817690591679,
16.530434108071837,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768186561276586,
16.530457463936134,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 28,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76786775539899,
16.530620783759574,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 30,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767875859212914,
16.53064493432989,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 31,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 32,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768196216631665,
16.530480819809103,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820587198199,
16.53050417569074,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 34,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76788396302177,
16.530669084907732,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 36,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76789206682555,
16.530693235493104,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 37,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 38,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768215527327584,
16.53052753158105,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 39,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822518266844,
16.530550887480036,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 40,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 41,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767900170624266,
16.530717386085996,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 42,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76790827441793,
16.530741536686417,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 43,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 44,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76823483800455,
16.530574243387694,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 45,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768244493335935,
16.53059759930402,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 46,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 47,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76791637820651,
16.530765687294366,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 48,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792448199002,
16.530789837909836,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 49,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 50,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768254148662564,
16.530620955229015,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 51,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76826380398446,
16.53064431116269,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 52,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 53,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76793258576849,
16.530813988532834,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 54,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767940689541874,
16.530838139163357,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 55,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 56,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768273459301625,
16.530667667105032,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 57,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76828311461405,
16.530691023056043,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 58,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 59,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76794879331019,
16.53086228980141,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 60,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76795689707344,
16.53088644044698,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 61,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 62,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768292769921736,
16.53071437901573,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 63,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76830242522469,
16.530737734984086,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 64,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 65,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76796500083164,
16.530910591100085,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 66,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767973104584755,
16.530934741760714,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 67,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 68,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831208052289,
16.530761090961114,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 69,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768321735816365,
16.530784446946814,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 70,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 71,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76798120833281,
16.530958892428863,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 72,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7679893120758,
16.53098304310454,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 73,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 74,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76833139110509,
16.530807802941187,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 75,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7683410463891,
16.53083115894423,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 76,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 77,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76799741581374,
16.531007193787744,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 78,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7680055195466,
16.531031344478475,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 79,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 80,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768350701668346,
16.530854514955948,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 81,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768360356942864,
16.530877870976333,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 82,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 83,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768013623274385,
16.53105549517673,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 84,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802172699712,
16.531079645882514,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 85,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 86,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768370012212635,
16.53090122700539,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 87,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76837966747768,
16.530924583043124,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 88,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 89,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802983071477,
16.53110379659582,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 90,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76803793442736,
16.53112794731665,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 91,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 92,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76838932273799,
16.530947939089526,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 93,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768398977993556,
16.5309712951446,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 94,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 95,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820456269355,
16.531070889913362,
50
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 96,
"frame": 2,
"params": [
0,
0,
0,
0,
0,
0,
0
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 0,
"VisualTransectPoints": [
[
47.76781102855973,
16.530451729978072
],
[
47.76787704224262,
16.53041791205613
],
[
47.76799131139914,
16.530387675399677
],
[
47.7678191324091,
16.530475880495707
],
[
47.76782723625342,
16.53050003102087
],
[
47.76810558054772,
16.530357438610363
],
[
47.76814793980895,
16.530364040530976
],
[
47.76783534009267,
16.530524181553563
],
[
47.76784344392685,
16.530548332093776
],
[
47.76815759518296,
16.530387396369257
],
[
47.768167250552246,
16.530410752216213
],
[
47.76785154775597,
16.530572482641514
],
[
47.76785965158001,
16.53059663319678
],
[
47.76817690591679,
16.530434108071837
],
[
47.768186561276586,
16.530457463936134
],
[
47.76786775539899,
16.530620783759574
],
[
47.767875859212914,
16.53064493432989
],
[
47.768196216631665,
16.530480819809103
],
[
47.76820587198199,
16.53050417569074
],
[
47.76788396302177,
16.530669084907732
],
[
47.76789206682555,
16.530693235493104
],
[
47.768215527327584,
16.53052753158105
],
[
47.76822518266844,
16.530550887480036
],
[
47.767900170624266,
16.530717386085996
],
[
47.76790827441793,
16.530741536686417
],
[
47.76823483800455,
16.530574243387694
],
[
47.768244493335935,
16.53059759930402
],
[
47.76791637820651,
16.530765687294366
],
[
47.76792448199002,
16.530789837909836
],
[
47.768254148662564,
16.530620955229015
],
[
47.76826380398446,
16.53064431116269
],
[
47.76793258576849,
16.530813988532834
],
[
47.767940689541874,
16.530838139163357
],
[
47.768273459301625,
16.530667667105032
],
[
47.76828311461405,
16.530691023056043
],
[
47.76794879331019,
16.53086228980141
],
[
47.76795689707344,
16.53088644044698
],
[
47.768292769921736,
16.53071437901573
],
[
47.76830242522469,
16.530737734984086
],
[
47.76796500083164,
16.530910591100085
],
[
47.767973104584755,
16.530934741760714
],
[
47.76831208052289,
16.530761090961114
],
[
47.768321735816365,
16.530784446946814
],
[
47.76798120833281,
16.530958892428863
],
[
47.7679893120758,
16.53098304310454
],
[
47.76833139110509,
16.530807802941187
],
[
47.7683410463891,
16.53083115894423
],
[
47.76799741581374,
16.531007193787744
],
[
47.7680055195466,
16.531031344478475
],
[
47.768350701668346,
16.530854514955948
],
[
47.768360356942864,
16.530877870976333
],
[
47.768013623274385,
16.53105549517673
],
[
47.76802172699712,
16.531079645882514
],
[
47.768370012212635,
16.53090122700539
],
[
47.76837966747768,
16.530924583043124
],
[
47.76802983071477,
16.53110379659582
],
[
47.76803793442736,
16.53112794731665
],
[
47.76838932273799,
16.530947939089526
],
[
47.768398977993556,
16.5309712951446
],
[
47.76820456269355,
16.531070889913362
]
],
"version": 1
},
"angle": 161,
"complexItemType": "survey",
"entryLocation": 0,
"flyAlternateTransects": false,
"polygon": [
[
47.76814130285164,
16.530347986094483
],
[
47.768405048556495,
16.530985979841546
],
[
47.76804190441199,
16.531139778691
],
[
47.76780598957649,
16.53043671316874
]
],
"splitConcavePolygons": false,
"type": "ComplexItem",
"version": 5
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 50,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 97,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76790673620743,
16.53073695257154,
50
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 50,
"AltitudeMode": 1,
"autoContinue": true,
"command": 16,
"doJumpId": 98,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76781389199906,
16.530691889469182,
50
],
"type": "SimpleItem"
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 99,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76773272010195,
16.53051568687008,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76773272010195,
16.53051568687008,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
}
./create_linux_appimage.sh ~/Desktop/drones/qgroundcontrol ~/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_11_3_GCC_64bit-Release/release
./create_linux_appimage.sh ~/Desktop/drones/qgroundcontrol ~/Desktop/drones/build-qgroundcontrol-Desktop_Qt_5_12_6_GCC_64bit-Release/release
......@@ -9,12 +9,12 @@ fi
QGC_SRC=$1
QGC_CUSTOM_APP_NAME="${QGC_CUSTOM_APP_NAME:-QGCWima}"
QGC_CUSTOM_GENERIC_NAME="${QGC_CUSTOM_GENERIC_NAME:-Ground Control Station (Wima)}"
QGC_CUSTOM_APP_NAME="${QGC_CUSTOM_APP_NAME:-QGroundControl}"
QGC_CUSTOM_GENERIC_NAME="${QGC_CUSTOM_GENERIC_NAME:-Ground Control Station}"
QGC_CUSTOM_BINARY_NAME="${QGC_CUSTOM_BINARY_NAME:-QGroundControl}"
QGC_CUSTOM_LINUX_START_SH="${QGC_CUSTOM_LINUX_START_SH:-${QGC_SRC}/deploy/qgroundcontrol-start.sh}"
QGC_CUSTOM_APP_ICON="${QGC_CUSTOM_APP_ICON:-${QGC_SRC}/resources/icons/qgroundcontrol.png}"
QGC_CUSTOM_APP_ICON_NAME="${QGC_CUSTOM_APP_ICON_NAME:-QGCWima}"
QGC_CUSTOM_APP_ICON_NAME="${QGC_CUSTOM_APP_ICON_NAME:-QGroundControl}"
if [ ! -f ${QGC_SRC}/qgroundcontrol.pro ]; then
echo "please specify path to $(QGC_CUSTOM_APP_NAME) source as the 1st argument"
......@@ -34,7 +34,7 @@ echo "Output directory:" ${OUTPUT_DIR}
# These require at least GLIBC 2.14, which older distributions might not have.
# On the other hand, 2.14 is not that recent so maybe we can just live with it.
# Wima requirements: libortools.so (inside repo), libprotobuf.so (inside repo), libgeographic.so (must be installed).
# MeasurementComplexItem requirements: libortools.so (inside repo), libprotobuf.so (inside repo), libgeographic.so (must be installed).
APP=${QGC_CUSTOM_APP_NAME}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -368,9 +368,9 @@ CustomBuild {
RESOURCES += $$PWD/resources/InstrumentValueIcons/InstrumentValueIcons.qrc
}
} else {
DEFINES += QGC_APPLICATION_NAME=\"\\\"QGCWima\\\"\"
DEFINES += QGC_ORG_NAME=\"\\\"QGCWima.org\\\"\"
DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgcwima\\\"\"
DEFINES += QGC_APPLICATION_NAME=\"\\\"QGroundControl\\\"\"
DEFINES += QGC_ORG_NAME=\"\\\"QGroundControl.org\\\"\"
DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgc\\\"\"
RESOURCES += \
$$PWD/qgroundcontrol.qrc \
$$PWD/qgcresources.qrc \
......@@ -415,7 +415,6 @@ INCLUDEPATH += \
src/QtLocationPlugin \
src/QtLocationPlugin/QMLControl \
src/Settings \
src/Wima \
src/Terrain \
src/Vehicle \
src/Audio \
......
......@@ -288,7 +288,6 @@
<file alias="VibrationPage.qml">src/AnalyzeView/VibrationPage.qml</file>
<file alias="VirtualJoystick.qml">src/FlightDisplay/VirtualJoystick.qml</file>
<file alias="VTOLLandingPatternEditor.qml">src/PlanView/VTOLLandingPatternEditor.qml</file>
<file>src/MeasurementComplexItem/qml/GeoAreaEditorLoader.qml</file>
<file alias="QGroundControl/Controls/ItemDragger.qml">src/MeasurementComplexItem/qml/ItemDragger.qml</file>
<file alias="MeasurementComplexItem/AreaDataEditor.qml">src/MeasurementComplexItem/qml/AreaDataEditor.qml</file>
<file alias="MeasurementComplexItem/ParameterEditor.qml">src/MeasurementComplexItem/qml/ParameterEditor.qml</file>
......
import QtQuick 2.3
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.FlightDisplay 1.0
import QGroundControl.Airspace 1.0
import QGroundControl.Airmap 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import Qt.labs.settings 1.0
Item {
id: _root
height: mainFrame.height
width: mainFrame.width
clip: true
property int maxHeight: 500
property int maxWidth: 300
property var wimaController // must be provided by the user
property var planMasterController // must be provided by the user
property var missionController // must be provided by the user
property bool _controllerValid: planMasterController !== undefined
property real _controllerProgressPct: _controllerValid ? planMasterController.missionController.progressPct : 0
property real _margins: ScreenTools.defaultFontPixelWidth / 2
// Disabels map scrolling when cursor on this menu.
DeadMouseArea {
anchors.fill: parent
}
// Use Settings to store menu appearance through different sessions.
Settings {
property alias vehicleHeaderChecker: vehicleHeader.checked
property alias statsHeaderChecker: statsHeader.checked
}
// Progress bar visibility
on_ControllerProgressPctChanged: {
if (_controllerProgressPct === 1) {
uploadCompleteText.visible = true
progressBar.visible = false
} else if (_controllerProgressPct > 0) {
progressBar.visible = true
uploadCompleteText.visible = false
}
}
function getTime(time) {
// time is a double
if(isNaN(time)) {
return "00:00:00"
}
var t = new Date(0, 0, 0, 0, 0, Number(time))
return Qt.formatTime(t, 'hh:mm:ss')
}
QGCPalette { id: qgcPal }
// box containing all items
Rectangle { // maybe replace with column and remove anchors => dynamic height:
id: mainFrame
height: enableWima.height + flickable.height + _margins*2
width: Math.max(enableWima.width, flickable.width)
color: enableWima.enableWimaBoolean ? qgcPal.window : "transparent"
radius: Math.min(height, width)/50
clip: true
property real _margins: _root._margins
// checkbox to enable/ disable wima
SliderSwitch {
id: enableWima
anchors.horizontalCenter: flickable.horizontalCenter
anchors.bottom: flickable.top
anchors.bottomMargin: _margins
confirmText: enableWimaBoolean ? qsTr("disable WiMA") : qsTr("enable WiMA")
property var enableWimaFact: wimaController.enableWimaController
property bool enableWimaBoolean: enableWimaFact.value
onAccept: {
if (enableWimaBoolean) {
enableWimaFact.value = false
enableWimaMouseArea.enabled = true
timer.start()
} else {
enableWimaFact.value = true
enableWimaMouseArea.enabled = false
timer.stop()
}
}
}
MouseArea {
id: enableWimaMouseArea
anchors.fill: enableWima
hoverEnabled: true
property var enableWimaFact: wimaController.enableWimaController
property bool enableWimaBoolean: enableWimaFact.value
onEntered: {
enableWima.visible = true
enabled = false
timer.start()
}
}
Timer {
id: timer
interval: 3000
running: false
repeat: false
onTriggered: triggerHandler()
function triggerHandler() {
if (enableWima.enableWimaBoolean === false) {
enableWima.visible = false
enableWimaMouseArea.enabled = true
}
}
Component.onCompleted: {
start()
}
}
QGCFlickable {
id: flickable
clip: true
visible: enableWima.enableWimaBoolean
anchors.left: parent.left
anchors.bottom: parent.bottom
width: enableWima.enableWimaBoolean ?
Math.min(contentWidth, maxWidth)
: enableWima.width
height: enableWima.enableWimaBoolean ?
Math.min(contentHeight, maxHeight)
: 0
contentHeight: columnWrapper.height
contentWidth: columnWrapper.width
Row {
id: columnWrapper
Item{ // spacer
width: 6
height: 1
}
Column {
id: mainColumn
spacing: ScreenTools.defaultFontPixelHeight * 0.3
SectionHeader{
id: vehicleHeader
text: qsTr("Vehicle")
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: vehicleHeader.checked
width: parent.width
QGCButton {
id: buttonUpload
text: qsTr("Upload")
onClicked: {
if (!planMasterController.offline) {
wimaController.upload()
}
}
Layout.fillWidth: true
}
QGCButton {
id: buttonRemoveFromVehicle
text: qsTr("Remove")
onClicked: wimaController.removeFromVehicle()
Layout.fillWidth: true
}
QGCButton {
id: buttonSmartRTL
text: qsTr("Smart RTL")
onClicked: wimaController.requestSmartRTL();
Layout.columnSpan: 2
Layout.fillWidth: true
}
QGCButton {
id: buttonRemoveTrajectoryHistory
text: qsTr("Clear Trajectory")
onClicked: wimaController.removeVehicleTrajectoryHistory()
Layout.columnSpan: 2
Layout.fillWidth: true
}
}
GridLayout {
columns: 2
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
columnSpacing: ScreenTools.defaultFontPixelHeight * 0.5
visible: vehicleHeader.checked
width: parent.width
QGCLabel {
text: qsTr("Speed")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.flightSpeed
Layout.fillWidth: true
}
QGCLabel {
text: qsTr("Altitude")
Layout.fillWidth: true
}
FactTextField {
fact: wimaController.altitude
Layout.fillWidth: true
}
// progess bar
Rectangle {
id: progressBar
height: 4
width: _controllerProgressPct * parent.width
color: qgcPal.colorGreen
visible: false
Layout.columnSpan: 2
Layout.fillWidth: true
}
QGCLabel {
id: uploadCompleteText
font.pointSize: ScreenTools.largeFontPointSize
Layout.columnSpan: 2
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: "Done"
visible: false
Layout.fillWidth: true
}
}
SectionHeader {
id: statsHeader
text: qsTr("Statistics")
}
GridLayout {
columns: 3
rowSpacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
visible: statsHeader.checked
Item {
id: widthItem
Layout.fillWidth: true
Layout.columnSpan: parent.columns
height: 0
}
SmallValue {
property var currentMissionIndex: missionController.currentMissionIndex
shortDescription: qsTr("Current Waypoint")
value: currentMissionIndex > 0 ? currentMissionIndex : "-.-"
//unit: "m"
//width: widthItem.width*0.49
}
SmallValue {
property var remainingDistance: missionController.remainingDistance
shortDescription: qsTr("Remaining Distance")
value: remainingDistance >= 0 ? remainingDistance.toFixed(2) : "-.-"
unit: "m"
//width: widthItem.width*0.49
}
SmallValue {
property var remainingTime: missionController.remainingTime
shortDescription: qsTr("Remaining Time")
value: remainingTime >= 0 ? getTime(remainingTime) : "-.-"
//unit: "m"
//width: widthItem.width*0.49
}
Item { // spacer
height: 5
Layout.columnSpan: parent.columns
}
} // GridLayout
} // settingsColumn
Item { // spacer
width: 6
height: 5
}
} // Row
} // QGCFlickable
}
}
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
/// This provides the smarts behind the guided mode commands, minus the user interface. This way you can change UI
/// without affecting the underlying functionality.
Item {
id: _root
property var wimaController
property var missionController
property var confirmDialog
property var actionList
property var altitudeSlider
property var orbitMapCircle
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP")
readonly property string armTitle: qsTr("Arm")
readonly property string forceArmTitle: qsTr("Force Arm")
readonly property string disarmTitle: qsTr("Disarm")
readonly property string rtlTitle: qsTr("Return")
readonly property string takeoffTitle: qsTr("Takeoff")
readonly property string landTitle: qsTr("Land")
readonly property string startMissionTitle: qsTr("Start Mission")
readonly property string mvStartMissionTitle: qsTr("Start Mission (MV)")
readonly property string continueMissionTitle: qsTr("Continue Mission")
readonly property string resumeMissionUploadFailTitle: qsTr("Resume FAILED")
readonly property string pauseTitle: qsTr("Pause")
readonly property string mvPauseTitle: qsTr("Pause (MV)")
readonly property string changeAltTitle: qsTr("Change Altitude")
readonly property string orbitTitle: qsTr("Orbit")
readonly property string landAbortTitle: qsTr("Land Abort")
readonly property string setWaypointTitle: qsTr("Set Waypoint")
<<<<<<< HEAD
readonly property string gotoTitle: qsTr("Goto Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string forceUploadTitle: qsTr("Force Upload")
readonly property string smartRTLPathConfirmTitle: qsTr("Upload and Execute")
readonly property string smartRTLRequestConfirmTitle: qsTr("Smart RTL requested")
=======
readonly property string gotoTitle: qsTr("Go To Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string roiTitle: qsTr("ROI")
readonly property string actionListTitle: qsTr("Action")
>>>>>>> upstream_merge
readonly property string armMessage: qsTr("Arm the vehicle.")
readonly property string forceArmMessage: qsTr("WARNING: This will force arming of the vehicle bypassing any safety checks.")
readonly property string disarmMessage: qsTr("Disarm the vehicle")
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.")
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.")
readonly property string startMissionMessage: qsTr("Takeoff from ground and start the current mission.")
readonly property string continueMissionMessage: qsTr("Continue the mission from the current waypoint.")
readonly property string resumeMissionUploadFailMessage: qsTr("Upload of resume mission failed. Confirm to retry upload")
readonly property string landMessage: qsTr("Land the vehicle at the current position.")
readonly property string rtlMessage: qsTr("Return to the launch position of the vehicle.")
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
readonly property string vtolTransitionFwdMessage: qsTr("Transition VTOL to fixed wing flight.")
readonly property string vtolTransitionMRMessage: qsTr("Transition VTOL to multi-rotor flight.")
<<<<<<< HEAD
readonly property string forceUploadMessage: qsTr("Vehicle outside save area. Force upload?")
readonly property string smartRTLPathConfirmMessage: qsTr("Upload and execute the displayed return path?")
readonly property string smartRTLRequestConfirmMessage: qsTr("Do you want to initiate a smart RTL?")
=======
readonly property string roiMessage: qsTr("Make the specified location a Region Of Interest.")
>>>>>>> upstream_merge
readonly property int actionRTL: 1
readonly property int actionLand: 2
readonly property int actionTakeoff: 3
readonly property int actionArm: 4
readonly property int actionDisarm: 5
readonly property int actionEmergencyStop: 6
readonly property int actionChangeAlt: 7
readonly property int actionGoto: 8
readonly property int actionSetWaypoint: 9
readonly property int actionOrbit: 10
readonly property int actionLandAbort: 11
readonly property int actionStartMission: 12
readonly property int actionContinueMission: 13
readonly property int actionResumeMission: 14
readonly property int _actionUnused: 15
readonly property int actionResumeMissionUploadFail: 16
readonly property int actionPause: 17
readonly property int actionMVPause: 18
readonly property int actionMVStartMission: 19
readonly property int actionVtolTransitionToFwdFlight: 20
readonly property int actionVtolTransitionToMRFlight: 21
<<<<<<< HEAD
readonly property int actionForceUpload: 22
readonly property int actionSmartRTLPathConfirm: 24
readonly property int actionSmartRTLRequestConfirm: 25 // very similar to actionSmartRTLPathConfirm, is triggered on low battery
=======
readonly property int actionROI: 22
readonly property int actionActionList: 23
readonly property int actionForceArm: 24
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length
property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue
property bool _canArm: _activeVehicle ? (_useChecklist ? (_enforceChecklist ? _activeVehicle.checkListState === Vehicle.CheckListPassed : true) : true) : false
>>>>>>> upstream_merge
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying
property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm
property bool showForceArm: _guidedActionsEnabled && !_vehicleArmed
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode
property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm
property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying && _canArm
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1)
property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused && !_fixedWingOnApproach
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive
property bool showOrbit: _guidedActionsEnabled && _vehicleFlying && __orbitSupported && !_missionActive
property bool showROI: _guidedActionsEnabled && _vehicleFlying && __roiSupported && !_missionActive
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _fixedWingOnApproach
property bool showGotoLocation: _guidedActionsEnabled && _vehicleFlying
<<<<<<< HEAD
property bool wimaEnabled: wimaController.enableWimaController.value
=======
property bool showActionList: _guidedActionsEnabled && (showStartMission || showResumeMission || showChangeAlt || showLandAbort)
>>>>>>> upstream_merge
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2)
property bool guidedUIVisible: confirmDialog.visible || actionList.visible
property var _corePlugin: QGroundControl.corePlugin
property var _corePluginOptions: QGroundControl.corePlugin.options
property bool _guidedActionsEnabled: (!ScreenTools.isDebug && _corePluginOptions.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems && missionController.progressPct === 1
property bool _missionActive: _activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false
property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
property bool _vehicleFlying: _activeVehicle ? _activeVehicle.flying : false
property bool _vehicleLanding: _activeVehicle ? _activeVehicle.landing : false
property bool _vehiclePaused: false
property bool _vehicleInMissionMode: false
property bool _vehicleInRTLMode: false
property bool _vehicleInLandMode: false
property int _missionItemCount: missionController.missionItemCount
property int _currentMissionIndex: missionController.currentMissionIndex
property int _resumeMissionIndex: missionController.resumeMissionIndex
property bool _hideEmergenyStop: !_corePluginOptions.flyView.guidedBarShowEmergencyStop
property bool _hideOrbit: !_corePluginOptions.flyView.guidedBarShowOrbit
property bool _hideROI: !_corePluginOptions.flyView.guidedBarShowROI
property bool _vehicleWasFlying: false
property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
property bool _fixedWingOnApproach: _activeVehicle ? _activeVehicle.fixedWing && _vehicleLanding : false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __roiSupported: _activeVehicle ? !_hideROI && _activeVehicle.roiModeSupported : false
property bool __orbitSupported: _activeVehicle ? !_hideOrbit && _activeVehicle.orbitModeSupported : false
property bool __flightMode: _flightMode
function _outputState() {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log(qsTr("_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10) roiSupported(%11) orbitSupported(%12) _missionActive(%13) _hideROI(%14) _hideOrbit(%15)").arg(_activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount).arg(__roiSupported).arg(__orbitSupported).arg(_missionActive).arg(_hideROI).arg(_hideOrbit))
}
}
on_ActiveVehicleChanged: _outputState()
Component.onCompleted: _outputState()
on_VehicleArmedChanged: _outputState()
on_VehicleInRTLModeChanged: _outputState()
on_VehiclePausedChanged: _outputState()
on__FlightModeChanged: _outputState()
on__GuidedModeSupportedChanged: _outputState()
on__PauseVehicleSupportedChanged: _outputState()
on__RoiSupportedChanged: _outputState()
on__OrbitSupportedChanged: _outputState()
on_MissionItemCountChanged: _outputState()
on_MissionActiveChanged: _outputState()
on_CurrentMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_currentMissionIndex", _currentMissionIndex)
}
}
on_ResumeMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_resumeMissionIndex", _resumeMissionIndex)
}
}
onShowResumeMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showResumeMission", showResumeMission)
}
_outputState()
}
onShowStartMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showStartMission", showStartMission)
}
_outputState()
if (showStartMission) {
confirmAction(actionStartMission)
}
}
onShowContinueMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showContinueMission", showContinueMission)
}
_outputState()
if (showContinueMission) {
confirmAction(actionContinueMission)
}
}
onShowRTLChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showRTL", showRTL)
}
_outputState()
}
onShowChangeAltChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showChangeAlt", showChangeAlt)
}
_outputState()
}
onShowROIChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showROI", showROI)
}
_outputState()
}
onShowOrbitChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showOrbit", showOrbit)
}
_outputState()
}
onShowGotoLocationChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showGotoLocation", showGotoLocation)
}
_outputState()
}
onShowLandAbortChanged: {
if (showLandAbort) {
confirmAction(actionLandAbort)
}
}
on_VehicleFlyingChanged: {
_outputState()
if (!_vehicleFlying) {
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
_vehicleWasFlying = true
}
}
property var _actionData
on_FlightModeChanged: {
_vehiclePaused = _activeVehicle ? _flightMode === _activeVehicle.pauseFlightMode : false
_vehicleInRTLMode = _activeVehicle ? _flightMode === _activeVehicle.rtlFlightMode || _flightMode === _activeVehicle.smartRTLFlightMode : false
_vehicleInLandMode = _activeVehicle ? _flightMode === _activeVehicle.landFlightMode : false
_vehicleInMissionMode = _activeVehicle ? _flightMode === _activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
}
Connections {
target: missionController
onResumeMissionUploadFail: confirmAction(actionResumeMissionUploadFail)
}
Connections {
target: mainWindow
onArmVehicleRequest: armVehicleRequest()
onForceArmVehicleRequest: forceArmVehicleRequest()
onDisarmVehicleRequest: disarmVehicleRequest()
onVtolTransitionToFwdFlightRequest: vtolTransitionToFwdFlightRequest()
onVtolTransitionToMRFlightRequest: vtolTransitionToMRFlightRequest()
}
function armVehicleRequest() {
confirmAction(actionArm)
}
function forceArmVehicleRequest() {
confirmAction(actionForceArm)
}
function disarmVehicleRequest() {
if (showEmergenyStop) {
confirmAction(actionEmergencyStop)
} else {
confirmAction(actionDisarm)
}
}
function vtolTransitionToFwdFlightRequest() {
confirmAction(actionVtolTransitionToFwdFlight)
}
function vtolTransitionToMRFlightRequest() {
confirmAction(actionVtolTransitionToMRFlight)
}
function closeAll() {
confirmDialog.visible = false
actionList.visible = false
altitudeSlider.visible = false
}
// Called when an action is about to be executed in order to confirm
function confirmAction(actionCode, actionData, mapIndicator) {
var showImmediate = true
closeAll()
confirmDialog.action = actionCode
confirmDialog.actionData = actionData
confirmDialog.hideTrigger = true
confirmDialog.mapIndicator = mapIndicator
confirmDialog.optionText = ""
_actionData = actionData
switch (actionCode) {
case actionArm:
if (_vehicleFlying || !_guidedActionsEnabled) {
return
}
confirmDialog.title = armTitle
confirmDialog.message = armMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm })
break;
case actionForceArm:
confirmDialog.title = forceArmTitle
confirmDialog.message = forceArmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showForceArm })
break;
case actionDisarm:
if (_vehicleFlying) {
return
}
confirmDialog.title = disarmTitle
confirmDialog.message = disarmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showDisarm })
break;
case actionEmergencyStop:
confirmDialog.title = emergencyStopTitle
confirmDialog.message = emergencyStopMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showEmergenyStop })
break;
case actionTakeoff:
confirmDialog.title = takeoffTitle
confirmDialog.message = takeoffMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showTakeoff })
altitudeSlider.setToMinimumTakeoff()
altitudeSlider.visible = true
break;
case actionStartMission:
showImmediate = false
confirmDialog.title = startMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showStartMission })
break;
case actionMVStartMission:
confirmDialog.title = mvStartMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = true
break;
case actionContinueMission:
showImmediate = false
confirmDialog.title = continueMissionTitle
confirmDialog.message = continueMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showContinueMission })
break;
case actionResumeMission:
// Resume Mission is handled in mission end dialog
return
case actionResumeMissionUploadFail:
confirmDialog.title = resumeMissionUploadFailTitle
confirmDialog.message = resumeMissionUploadFailMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showResumeMission })
break;
case actionLand:
confirmDialog.title = landTitle
confirmDialog.message = landMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLand })
break;
case actionRTL:
confirmDialog.title = rtlTitle
confirmDialog.message = rtlMessage
if (_activeVehicle.supportsSmartRTL) {
confirmDialog.optionText = qsTr("Smart RTL")
confirmDialog.optionChecked = false
}
confirmDialog.hideTrigger = Qt.binding(function() { return !showRTL })
break;
case actionChangeAlt:
confirmDialog.title = changeAltTitle
confirmDialog.message = changeAltMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showChangeAlt })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionGoto:
confirmDialog.title = gotoTitle
confirmDialog.message = gotoMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showGotoLocation })
break;
case actionSetWaypoint:
confirmDialog.title = setWaypointTitle
confirmDialog.message = setWaypointMessage
break;
case actionOrbit:
confirmDialog.title = orbitTitle
confirmDialog.message = orbitMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showOrbit })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionLandAbort:
confirmDialog.title = landAbortTitle
confirmDialog.message = landAbortMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLandAbort })
break;
case actionPause:
confirmDialog.title = pauseTitle
confirmDialog.message = pauseMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showPause })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionMVPause:
confirmDialog.title = mvPauseTitle
confirmDialog.message = mvPauseMessage
confirmDialog.hideTrigger = true
break;
case actionVtolTransitionToFwdFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionFwdMessage
confirmDialog.hideTrigger = true
break
case actionVtolTransitionToMRFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionMRMessage
confirmDialog.hideTrigger = true
break
<<<<<<< HEAD
case actionForceUpload:
confirmDialog.title = forceUploadTitle
confirmDialog.message = forceUploadMessage
confirmDialog.hideTrigger = true
break
case actionSmartRTLPathConfirm:
confirmDialog.title = smartRTLPathConfirmTitle
confirmDialog.message = smartRTLPathConfirmMessage
confirmDialog.hideTrigger = true
break
case actionSmartRTLRequestConfirm:
confirmDialog.title = smartRTLRequestConfirmTitle
confirmDialog.message = smartRTLRequestConfirmMessage
confirmDialog.hideTrigger = true
break
=======
case actionROI:
confirmDialog.title = roiTitle
confirmDialog.message = roiMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showROI })
break;
case actionActionList:
actionList.show()
return
>>>>>>> upstream_merge
default:
console.warn("Unknown actionCode", actionCode)
return
}
confirmDialog.show(showImmediate)
}
// Executes the specified action
function executeAction(actionCode, actionData, actionAltitudeChange, optionChecked) {
var i;
var rgVehicle;
switch (actionCode) {
case actionRTL:
_activeVehicle.guidedModeRTL(optionChecked)
break
case actionLand:
_activeVehicle.guidedModeLand()
break
case actionTakeoff:
_activeVehicle.guidedModeTakeoff(actionAltitudeChange)
break
case actionResumeMission:
case actionResumeMissionUploadFail:
missionController.resumeMission(missionController.resumeMissionIndex)
break
case actionStartMission:
case actionContinueMission:
_activeVehicle.startMission()
break
case actionMVStartMission:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).startMission()
}
break
case actionArm:
_activeVehicle.armed = true
break
case actionForceArm:
_activeVehicle.forceArm()
break
case actionDisarm:
_activeVehicle.armed = false
break
case actionEmergencyStop:
_activeVehicle.emergencyStop()
break
case actionChangeAlt:
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionGoto:
_activeVehicle.guidedModeGotoLocation(actionData)
break
case actionSetWaypoint:
_activeVehicle.setCurrentMissionSequence(actionData)
break
case actionOrbit:
_activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), _activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange)
break
case actionLandAbort:
_activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break
case actionPause:
_activeVehicle.pauseVehicle()
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionMVPause:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).pauseVehicle()
}
break
case actionVtolTransitionToFwdFlight:
_activeVehicle.vtolInFwdFlight = true
break
case actionVtolTransitionToMRFlight:
_activeVehicle.vtolInFwdFlight = false
break
<<<<<<< HEAD
case actionForceUpload:
wimaController.forceUpload()
break
case actionSmartRTLPathConfirm:
wimaController.executeSmartRTL()
break
case actionSmartRTLRequestConfirm:
wimaController.initSmartRTL()
=======
case actionROI:
_activeVehicle.guidedModeROI(actionData)
>>>>>>> upstream_merge
break
default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
break
}
}
}
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
/// This provides the smarts behind the guided mode commands, minus the user interface. This way you can change UI
/// without affecting the underlying functionality.
Item {
id: _root
property var missionController
property var confirmDialog
property var actionList
property var altitudeSlider
property var orbitMapCircle
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP")
readonly property string armTitle: qsTr("Arm")
readonly property string disarmTitle: qsTr("Disarm")
readonly property string rtlTitle: qsTr("RTL")
readonly property string takeoffTitle: qsTr("Takeoff")
readonly property string landTitle: qsTr("Land")
readonly property string startMissionTitle: qsTr("Start Mission")
readonly property string mvStartMissionTitle: qsTr("Start Mission (MV)")
readonly property string continueMissionTitle: qsTr("Continue Mission")
readonly property string resumeMissionUploadFailTitle: qsTr("Resume FAILED")
readonly property string pauseTitle: qsTr("Pause")
readonly property string mvPauseTitle: qsTr("Pause (MV)")
readonly property string changeAltTitle: qsTr("Change Altitude")
readonly property string orbitTitle: qsTr("Orbit")
readonly property string landAbortTitle: qsTr("Land Abort")
readonly property string setWaypointTitle: qsTr("Set Waypoint")
readonly property string gotoTitle: qsTr("Goto Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string armMessage: qsTr("Arm the vehicle.")
readonly property string disarmMessage: qsTr("Disarm the vehicle")
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.")
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.")
readonly property string startMissionMessage: qsTr("Takeoff from ground and start the current mission.")
readonly property string continueMissionMessage: qsTr("Continue the mission from the current waypoint.")
readonly property string resumeMissionUploadFailMessage: qsTr("Upload of resume mission failed. Confirm to retry upload")
readonly property string landMessage: qsTr("Land the vehicle at the current position.")
readonly property string rtlMessage: qsTr("Return to the home position of the vehicle.")
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
readonly property string vtolTransitionFwdMessage: qsTr("Transition VTOL to fixed wing flight.")
readonly property string vtolTransitionMRMessage: qsTr("Transition VTOL to multi-rotor flight.")
readonly property int actionRTL: 1
readonly property int actionLand: 2
readonly property int actionTakeoff: 3
readonly property int actionArm: 4
readonly property int actionDisarm: 5
readonly property int actionEmergencyStop: 6
readonly property int actionChangeAlt: 7
readonly property int actionGoto: 8
readonly property int actionSetWaypoint: 9
readonly property int actionOrbit: 10
readonly property int actionLandAbort: 11
readonly property int actionStartMission: 12
readonly property int actionContinueMission: 13
readonly property int actionResumeMission: 14
readonly property int _actionUnused: 15
readonly property int actionResumeMissionUploadFail: 16
readonly property int actionPause: 17
readonly property int actionMVPause: 18
readonly property int actionMVStartMission: 19
readonly property int actionVtolTransitionToFwdFlight: 20
readonly property int actionVtolTransitionToMRFlight: 21
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying
property bool showArm: _guidedActionsEnabled && !_vehicleArmed
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode
property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying
property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1)
property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive
property bool showOrbit: _guidedActionsEnabled && !_hideOrbit && _vehicleFlying && _activeVehicle.orbitModeSupported && !_missionActive
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding
property bool showGotoLocation: _guidedActionsEnabled && _vehicleFlying
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2)
property bool guidedUIVisible: guidedActionConfirm.visible || guidedActionList.visible
property var _corePlugin: QGroundControl.corePlugin
property bool _guidedActionsEnabled: (!ScreenTools.isDebug && QGroundControl.corePlugin.options.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems
property bool _missionActive: _activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false
property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
property bool _vehicleFlying: _activeVehicle ? _activeVehicle.flying : false
property bool _vehicleLanding: _activeVehicle ? _activeVehicle.landing : false
property bool _vehiclePaused: false
property bool _vehicleInMissionMode: false
property bool _vehicleInRTLMode: false
property bool _vehicleInLandMode: false
property int _missionItemCount: missionController.missionItemCount
property int _currentMissionIndex: missionController.currentMissionIndex
property int _resumeMissionIndex: missionController.resumeMissionIndex
property bool _hideEmergenyStop: !QGroundControl.corePlugin.options.guidedBarShowEmergencyStop
property bool _hideOrbit: !QGroundControl.corePlugin.options.guidedBarShowOrbit
property bool _vehicleWasFlying: false
property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __flightMode: _flightMode
function _outputState() {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log(qsTr("_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10)").arg(_activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount))
}
}
Component.onCompleted: _outputState()
on_ActiveVehicleChanged: _outputState()
on_VehicleArmedChanged: _outputState()
on_VehicleInRTLModeChanged: _outputState()
on_VehiclePausedChanged: _outputState()
on__FlightModeChanged: _outputState()
on__GuidedModeSupportedChanged: _outputState()
on__PauseVehicleSupportedChanged: _outputState()
on_MissionItemCountChanged: _outputState()
on_CurrentMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_currentMissionIndex", _currentMissionIndex)
}
}
on_ResumeMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_resumeMissionIndex", _resumeMissionIndex)
}
}
onShowResumeMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showResumeMission", showResumeMission)
}
_outputState()
}
onShowStartMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showStartMission", showStartMission)
}
_outputState()
}
onShowContinueMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showContinueMission", showContinueMission)
}
_outputState()
}
onShowRTLChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showRTL", showRTL)
}
_outputState()
}
// End of hack
on_VehicleFlyingChanged: {
_outputState()
if (!_vehicleFlying) {
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
_vehicleWasFlying = true
}
}
property var _actionData
on_FlightModeChanged: {
_vehiclePaused = _activeVehicle ? _flightMode === _activeVehicle.pauseFlightMode : false
_vehicleInRTLMode = _activeVehicle ? _flightMode === _activeVehicle.rtlFlightMode : false
_vehicleInLandMode = _activeVehicle ? _flightMode === _activeVehicle.landFlightMode : false
_vehicleInMissionMode = _activeVehicle ? _flightMode === _activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
}
// Called when an action is about to be executed in order to confirm
function confirmAction(actionCode, actionData, mapIndicator) {
var showImmediate = true
closeAll()
confirmDialog.action = actionCode
confirmDialog.actionData = actionData
confirmDialog.hideTrigger = true
confirmDialog.mapIndicator = mapIndicator
_actionData = actionData
switch (actionCode) {
case actionArm:
if (_vehicleFlying || !_guidedActionsEnabled) {
return
}
confirmDialog.title = armTitle
confirmDialog.message = armMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm })
break;
case actionDisarm:
if (_vehicleFlying) {
return
}
confirmDialog.title = disarmTitle
confirmDialog.message = disarmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showDisarm })
break;
case actionEmergencyStop:
confirmDialog.title = emergencyStopTitle
confirmDialog.message = emergencyStopMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showEmergenyStop })
break;
case actionTakeoff:
confirmDialog.title = takeoffTitle
confirmDialog.message = takeoffMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showTakeoff })
altitudeSlider.setToMinimumTakeoff()
altitudeSlider.visible = true
break;
case actionStartMission:
showImmediate = false
confirmDialog.title = startMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showStartMission })
break;
case actionMVStartMission:
confirmDialog.title = mvStartMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = true
break;
case actionContinueMission:
showImmediate = false
confirmDialog.title = continueMissionTitle
confirmDialog.message = continueMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showContinueMission })
break;
case actionResumeMission:
// Resume Mission is handled in mission end dialog
return
case actionResumeMissionUploadFail:
confirmDialog.title = resumeMissionUploadFailTitle
confirmDialog.message = resumeMissionUploadFailMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showResumeMission })
break;
case actionLand:
confirmDialog.title = landTitle
confirmDialog.message = landMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLand })
break;
case actionRTL:
confirmDialog.title = rtlTitle
confirmDialog.message = rtlMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showRTL })
break;
case actionChangeAlt:
confirmDialog.title = changeAltTitle
confirmDialog.message = changeAltMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showChangeAlt })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionGoto:
confirmDialog.title = gotoTitle
confirmDialog.message = gotoMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showGotoLocation })
break;
case actionSetWaypoint:
confirmDialog.title = setWaypointTitle
confirmDialog.message = setWaypointMessage
break;
case actionOrbit:
confirmDialog.title = orbitTitle
confirmDialog.message = orbitMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showOrbit })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionLandAbort:
confirmDialog.title = landAbortTitle
confirmDialog.message = landAbortMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLandAbort })
break;
case actionPause:
confirmDialog.title = pauseTitle
confirmDialog.message = pauseMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showPause })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionMVPause:
confirmDialog.title = mvPauseTitle
confirmDialog.message = mvPauseMessage
confirmDialog.hideTrigger = true
break;
case actionVtolTransitionToFwdFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionFwdMessage
confirmDialog.hideTrigger = true
break
case actionVtolTransitionToMRFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionMRMessage
confirmDialog.hideTrigger = true
break
default:
console.warn("Unknown actionCode", actionCode)
return
}
confirmDialog.show(showImmediate)
}
// Executes the specified action
function executeAction(actionCode, actionData, actionAltitudeChange) {
var i;
var rgVehicle;
switch (actionCode) {
case actionRTL:
_activeVehicle.guidedModeRTL()
break
case actionLand:
_activeVehicle.guidedModeLand()
break
case actionTakeoff:
_activeVehicle.guidedModeTakeoff(actionAltitudeChange)
break
case actionResumeMission:
case actionResumeMissionUploadFail:
missionController.resumeMission(missionController.resumeMissionIndex)
break
case actionStartMission:
case actionContinueMission:
_activeVehicle.startMission()
break
case actionMVStartMission:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).startMission()
}
break
case actionArm:
_activeVehicle.armed = true
break
case actionDisarm:
_activeVehicle.armed = false
break
case actionEmergencyStop:
_activeVehicle.emergencyStop()
break
case actionChangeAlt:
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionGoto:
_activeVehicle.guidedModeGotoLocation(actionData)
break
case actionSetWaypoint:
_activeVehicle.setCurrentMissionSequence(actionData)
break
case actionOrbit:
_activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), _activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange)
break
case actionLandAbort:
_activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break
case actionPause:
_activeVehicle.pauseVehicle()
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionMVPause:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).pauseVehicle()
}
break
case actionVtolTransitionToFwdFlight:
_activeVehicle.vtolInFwdFlight = true
break
case actionVtolTransitionToMRFlight:
_activeVehicle.vtolInFwdFlight = false
break
default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
break
}
}
}
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
/// This provides the smarts behind the guided mode commands, minus the user interface. This way you can change UI
/// without affecting the underlying functionality.
Item {
id: _root
property var wimaController
property var missionController
property var confirmDialog
property var actionList
property var altitudeSlider
property var orbitMapCircle
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP")
readonly property string armTitle: qsTr("Arm")
readonly property string disarmTitle: qsTr("Disarm")
readonly property string rtlTitle: qsTr("RTL")
readonly property string takeoffTitle: qsTr("Takeoff")
readonly property string landTitle: qsTr("Land")
readonly property string startMissionTitle: qsTr("Start Mission")
readonly property string mvStartMissionTitle: qsTr("Start Mission (MV)")
readonly property string continueMissionTitle: qsTr("Continue Mission")
readonly property string resumeMissionUploadFailTitle: qsTr("Resume FAILED")
readonly property string pauseTitle: qsTr("Pause")
readonly property string mvPauseTitle: qsTr("Pause (MV)")
readonly property string changeAltTitle: qsTr("Change Altitude")
readonly property string orbitTitle: qsTr("Orbit")
readonly property string landAbortTitle: qsTr("Land Abort")
readonly property string setWaypointTitle: qsTr("Set Waypoint")
readonly property string gotoTitle: qsTr("Goto Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string forceUploadTitle: qsTr("Force Upload")
readonly property string smartRTLPathConfirmTitle: qsTr("Upload and Execute")
readonly property string smartRTLRequestConfirmTitle: qsTr("Smart RTL requested")
readonly property string armMessage: qsTr("Arm the vehicle.")
readonly property string disarmMessage: qsTr("Disarm the vehicle")
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.")
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.")
readonly property string startMissionMessage: qsTr("Takeoff from ground and start the current mission.")
readonly property string continueMissionMessage: qsTr("Continue the mission from the current waypoint.")
readonly property string resumeMissionUploadFailMessage: qsTr("Upload of resume mission failed. Confirm to retry upload")
readonly property string landMessage: qsTr("Land the vehicle at the current position.")
readonly property string rtlMessage: qsTr("Return to the home position of the vehicle.")
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
readonly property string vtolTransitionFwdMessage: qsTr("Transition VTOL to fixed wing flight.")
readonly property string vtolTransitionMRMessage: qsTr("Transition VTOL to multi-rotor flight.")
readonly property string forceUploadMessage: qsTr("Vehicle outside save area. Force upload?")
readonly property string smartRTLPathConfirmMessage: qsTr("Upload and execute the displayed return path?")
readonly property string smartRTLRequestConfirmMessage: qsTr("Do you want to initiate a smart RTL?")
readonly property int actionRTL: 1
readonly property int actionLand: 2
readonly property int actionTakeoff: 3
readonly property int actionArm: 4
readonly property int actionDisarm: 5
readonly property int actionEmergencyStop: 6
readonly property int actionChangeAlt: 7
readonly property int actionGoto: 8
readonly property int actionSetWaypoint: 9
readonly property int actionOrbit: 10
readonly property int actionLandAbort: 11
readonly property int actionStartMission: 12
readonly property int actionContinueMission: 13
readonly property int actionResumeMission: 14
readonly property int _actionUnused: 15
readonly property int actionResumeMissionUploadFail: 16
readonly property int actionPause: 17
readonly property int actionMVPause: 18
readonly property int actionMVStartMission: 19
readonly property int actionVtolTransitionToFwdFlight: 20
readonly property int actionVtolTransitionToMRFlight: 21
readonly property int actionForceUpload: 22
readonly property int actionSmartRTLPathConfirm: 24
readonly property int actionSmartRTLRequestConfirm: 25 // very similar to actionSmartRTLPathConfirm, is triggered on low battery
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying
property bool showArm: _guidedActionsEnabled && !_vehicleArmed
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode
property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying
property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1)
property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive
property bool showOrbit: _guidedActionsEnabled && !_hideOrbit && _vehicleFlying && _activeVehicle.orbitModeSupported && !_missionActive
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.fixedWing && _vehicleLanding
property bool showGotoLocation: _guidedActionsEnabled && _vehicleFlying
property bool wimaEnabled: wimaController.enableWimaController.value
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2)
property bool guidedUIVisible: guidedActionConfirm.visible || guidedActionList.visible
property var _corePlugin: QGroundControl.corePlugin
property bool _guidedActionsEnabled: (!ScreenTools.isDebug && QGroundControl.corePlugin.options.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems && missionController.progressPct === 1
property bool _missionActive: _activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false
property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
property bool _vehicleFlying: _activeVehicle ? _activeVehicle.flying : false
property bool _vehicleLanding: _activeVehicle ? _activeVehicle.landing : false
property bool _vehiclePaused: false
property bool _vehicleInMissionMode: false
property bool _vehicleInRTLMode: false
property bool _vehicleInLandMode: false
property int _missionItemCount: missionController.missionItemCount
property int _currentMissionIndex: missionController.currentMissionIndex
property int _resumeMissionIndex: missionController.resumeMissionIndex
property bool _hideEmergenyStop: !QGroundControl.corePlugin.options.guidedBarShowEmergencyStop
property bool _hideOrbit: !QGroundControl.corePlugin.options.guidedBarShowOrbit
property bool _vehicleWasFlying: false
property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __flightMode: _flightMode
function _outputState() {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log(qsTr("_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10)").arg(_activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount))
}
}
Component.onCompleted: _outputState()
on_ActiveVehicleChanged: _outputState()
on_VehicleArmedChanged: _outputState()
on_VehicleInRTLModeChanged: _outputState()
on_VehiclePausedChanged: _outputState()
on__FlightModeChanged: _outputState()
on__GuidedModeSupportedChanged: _outputState()
on__PauseVehicleSupportedChanged: _outputState()
on_MissionItemCountChanged: _outputState()
on_CurrentMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_currentMissionIndex", _currentMissionIndex)
}
}
on_ResumeMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_resumeMissionIndex", _resumeMissionIndex)
}
}
onShowResumeMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showResumeMission", showResumeMission)
}
_outputState()
}
onShowStartMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showStartMission", showStartMission)
}
_outputState()
}
onShowContinueMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showContinueMission", showContinueMission)
}
_outputState()
}
onShowRTLChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showRTL", showRTL)
}
_outputState()
}
// End of hack
on_VehicleFlyingChanged: {
_outputState()
if (!_vehicleFlying) {
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
_vehicleWasFlying = true
}
}
property var _actionData
on_FlightModeChanged: {
_vehiclePaused = _activeVehicle ? _flightMode === _activeVehicle.pauseFlightMode : false
_vehicleInRTLMode = _activeVehicle ? _flightMode === _activeVehicle.rtlFlightMode : false
_vehicleInLandMode = _activeVehicle ? _flightMode === _activeVehicle.landFlightMode : false
_vehicleInMissionMode = _activeVehicle ? _flightMode === _activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
}
// Called when an action is about to be executed in order to confirm
function confirmAction(actionCode, actionData, mapIndicator) {
var showImmediate = true
closeAll()
confirmDialog.action = actionCode
confirmDialog.actionData = actionData
confirmDialog.hideTrigger = true
confirmDialog.mapIndicator = mapIndicator
_actionData = actionData
switch (actionCode) {
case actionArm:
if (_vehicleFlying || !_guidedActionsEnabled) {
return
}
confirmDialog.title = armTitle
confirmDialog.message = armMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm })
break;
case actionDisarm:
if (_vehicleFlying) {
return
}
confirmDialog.title = disarmTitle
confirmDialog.message = disarmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showDisarm })
break;
case actionEmergencyStop:
confirmDialog.title = emergencyStopTitle
confirmDialog.message = emergencyStopMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showEmergenyStop })
break;
case actionTakeoff:
confirmDialog.title = takeoffTitle
confirmDialog.message = takeoffMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showTakeoff })
altitudeSlider.setToMinimumTakeoff()
altitudeSlider.visible = true
break;
case actionStartMission:
showImmediate = false
confirmDialog.title = startMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showStartMission })
break;
case actionMVStartMission:
confirmDialog.title = mvStartMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = true
break;
case actionContinueMission:
showImmediate = false
confirmDialog.title = continueMissionTitle
confirmDialog.message = continueMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showContinueMission })
break;
case actionResumeMission:
// Resume Mission is handled in mission end dialog
return
case actionResumeMissionUploadFail:
confirmDialog.title = resumeMissionUploadFailTitle
confirmDialog.message = resumeMissionUploadFailMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showResumeMission })
break;
case actionLand:
confirmDialog.title = landTitle
confirmDialog.message = landMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLand })
break;
case actionRTL:
confirmDialog.title = rtlTitle
confirmDialog.message = rtlMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showRTL })
break;
case actionChangeAlt:
confirmDialog.title = changeAltTitle
confirmDialog.message = changeAltMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showChangeAlt })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionGoto:
confirmDialog.title = gotoTitle
confirmDialog.message = gotoMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showGotoLocation })
break;
case actionSetWaypoint:
confirmDialog.title = setWaypointTitle
confirmDialog.message = setWaypointMessage
break;
case actionOrbit:
confirmDialog.title = orbitTitle
confirmDialog.message = orbitMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showOrbit })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionLandAbort:
confirmDialog.title = landAbortTitle
confirmDialog.message = landAbortMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLandAbort })
break;
case actionPause:
confirmDialog.title = pauseTitle
confirmDialog.message = pauseMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showPause })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionMVPause:
confirmDialog.title = mvPauseTitle
confirmDialog.message = mvPauseMessage
confirmDialog.hideTrigger = true
break;
case actionVtolTransitionToFwdFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionFwdMessage
confirmDialog.hideTrigger = true
break
case actionVtolTransitionToMRFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionMRMessage
confirmDialog.hideTrigger = true
break
case actionForceUpload:
confirmDialog.title = forceUploadTitle
confirmDialog.message = forceUploadMessage
confirmDialog.hideTrigger = true
break
case actionSmartRTLPathConfirm:
confirmDialog.title = smartRTLPathConfirmTitle
confirmDialog.message = smartRTLPathConfirmMessage
confirmDialog.hideTrigger = true
break
case actionSmartRTLRequestConfirm:
confirmDialog.title = smartRTLRequestConfirmTitle
confirmDialog.message = smartRTLRequestConfirmMessage
confirmDialog.hideTrigger = true
break
default:
console.warn("Unknown actionCode", actionCode)
return
}
confirmDialog.show(showImmediate)
}
// Executes the specified action
function executeAction(actionCode, actionData, actionAltitudeChange) {
var i;
var rgVehicle;
switch (actionCode) {
case actionRTL:
_activeVehicle.guidedModeRTL()
break
case actionLand:
_activeVehicle.guidedModeLand()
break
case actionTakeoff:
_activeVehicle.guidedModeTakeoff(actionAltitudeChange)
break
case actionResumeMission:
case actionResumeMissionUploadFail:
missionController.resumeMission(missionController.resumeMissionIndex)
break
case actionStartMission:
case actionContinueMission:
_activeVehicle.startMission()
break
case actionMVStartMission:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).startMission()
}
break
case actionArm:
_activeVehicle.armed = true
break
case actionDisarm:
_activeVehicle.armed = false
break
case actionEmergencyStop:
_activeVehicle.emergencyStop()
break
case actionChangeAlt:
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionGoto:
_activeVehicle.guidedModeGotoLocation(actionData)
break
case actionSetWaypoint:
_activeVehicle.setCurrentMissionSequence(actionData)
break
case actionOrbit:
_activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), _activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange)
break
case actionLandAbort:
_activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break
case actionPause:
_activeVehicle.pauseVehicle()
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionMVPause:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).pauseVehicle()
}
break
case actionVtolTransitionToFwdFlight:
_activeVehicle.vtolInFwdFlight = true
break
case actionVtolTransitionToMRFlight:
_activeVehicle.vtolInFwdFlight = false
break
case actionForceUpload:
wimaController.forceUpload()
break
case actionSmartRTLPathConfirm:
wimaController.executeSmartRTL()
break
case actionSmartRTLRequestConfirm:
wimaController.initSmartRTL()
break
default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
break
}
}
}
/****************************************************************************
*
* (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Layouts 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
/// This provides the smarts behind the guided mode commands, minus the user interface. This way you can change UI
/// without affecting the underlying functionality.
Item {
id: _root
property var missionController
property var confirmDialog
property var actionList
property var altitudeSlider
property var orbitMapCircle
readonly property string emergencyStopTitle: qsTr("EMERGENCY STOP")
readonly property string armTitle: qsTr("Arm")
readonly property string forceArmTitle: qsTr("Force Arm")
readonly property string disarmTitle: qsTr("Disarm")
readonly property string rtlTitle: qsTr("Return")
readonly property string takeoffTitle: qsTr("Takeoff")
readonly property string landTitle: qsTr("Land")
readonly property string startMissionTitle: qsTr("Start Mission")
readonly property string mvStartMissionTitle: qsTr("Start Mission (MV)")
readonly property string continueMissionTitle: qsTr("Continue Mission")
readonly property string resumeMissionUploadFailTitle: qsTr("Resume FAILED")
readonly property string pauseTitle: qsTr("Pause")
readonly property string mvPauseTitle: qsTr("Pause (MV)")
readonly property string changeAltTitle: qsTr("Change Altitude")
readonly property string orbitTitle: qsTr("Orbit")
readonly property string landAbortTitle: qsTr("Land Abort")
readonly property string setWaypointTitle: qsTr("Set Waypoint")
readonly property string gotoTitle: qsTr("Go To Location")
readonly property string vtolTransitionTitle: qsTr("VTOL Transition")
readonly property string roiTitle: qsTr("ROI")
readonly property string actionListTitle: qsTr("Action")
readonly property string armMessage: qsTr("Arm the vehicle.")
readonly property string forceArmMessage: qsTr("WARNING: This will force arming of the vehicle bypassing any safety checks.")
readonly property string disarmMessage: qsTr("Disarm the vehicle")
readonly property string emergencyStopMessage: qsTr("WARNING: THIS WILL STOP ALL MOTORS. IF VEHICLE IS CURRENTLY IN THE AIR IT WILL CRASH.")
readonly property string takeoffMessage: qsTr("Takeoff from ground and hold position.")
readonly property string startMissionMessage: qsTr("Takeoff from ground and start the current mission.")
readonly property string continueMissionMessage: qsTr("Continue the mission from the current waypoint.")
readonly property string resumeMissionUploadFailMessage: qsTr("Upload of resume mission failed. Confirm to retry upload")
readonly property string landMessage: qsTr("Land the vehicle at the current position.")
readonly property string rtlMessage: qsTr("Return to the launch position of the vehicle.")
readonly property string changeAltMessage: qsTr("Change the altitude of the vehicle up or down.")
readonly property string gotoMessage: qsTr("Move the vehicle to the specified location.")
property string setWaypointMessage: qsTr("Adjust current waypoint to %1.").arg(_actionData)
readonly property string orbitMessage: qsTr("Orbit the vehicle around the specified location.")
readonly property string landAbortMessage: qsTr("Abort the landing sequence.")
readonly property string pauseMessage: qsTr("Pause the vehicle at it's current position, adjusting altitude up or down as needed.")
readonly property string mvPauseMessage: qsTr("Pause all vehicles at their current position.")
readonly property string vtolTransitionFwdMessage: qsTr("Transition VTOL to fixed wing flight.")
readonly property string vtolTransitionMRMessage: qsTr("Transition VTOL to multi-rotor flight.")
readonly property string roiMessage: qsTr("Make the specified location a Region Of Interest.")
readonly property int actionRTL: 1
readonly property int actionLand: 2
readonly property int actionTakeoff: 3
readonly property int actionArm: 4
readonly property int actionDisarm: 5
readonly property int actionEmergencyStop: 6
readonly property int actionChangeAlt: 7
readonly property int actionGoto: 8
readonly property int actionSetWaypoint: 9
readonly property int actionOrbit: 10
readonly property int actionLandAbort: 11
readonly property int actionStartMission: 12
readonly property int actionContinueMission: 13
readonly property int actionResumeMission: 14
readonly property int _actionUnused: 15
readonly property int actionResumeMissionUploadFail: 16
readonly property int actionPause: 17
readonly property int actionMVPause: 18
readonly property int actionMVStartMission: 19
readonly property int actionVtolTransitionToFwdFlight: 20
readonly property int actionVtolTransitionToMRFlight: 21
readonly property int actionROI: 22
readonly property int actionActionList: 23
readonly property int actionForceArm: 24
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length
property bool _enforceChecklist: _useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue
property bool _canArm: _activeVehicle ? (_useChecklist ? (_enforceChecklist ? _activeVehicle.checkListState === Vehicle.CheckListPassed : true) : true) : false
property bool showEmergenyStop: _guidedActionsEnabled && !_hideEmergenyStop && _vehicleArmed && _vehicleFlying
property bool showArm: _guidedActionsEnabled && !_vehicleArmed && _canArm
property bool showForceArm: _guidedActionsEnabled && !_vehicleArmed
property bool showDisarm: _guidedActionsEnabled && _vehicleArmed && !_vehicleFlying
property bool showRTL: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.guidedModeSupported && _vehicleFlying && !_vehicleInRTLMode
property bool showTakeoff: _guidedActionsEnabled && _activeVehicle.takeoffVehicleSupported && !_vehicleFlying && _canArm
property bool showLand: _guidedActionsEnabled && _activeVehicle.guidedModeSupported && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode
property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying && _canArm
property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _missionItemCount - 1)
property bool showPause: _guidedActionsEnabled && _vehicleArmed && _activeVehicle.pauseVehicleSupported && _vehicleFlying && !_vehiclePaused && !_fixedWingOnApproach
property bool showChangeAlt: _guidedActionsEnabled && _vehicleFlying && _activeVehicle.guidedModeSupported && _vehicleArmed && !_missionActive
property bool showOrbit: _guidedActionsEnabled && _vehicleFlying && __orbitSupported && !_missionActive
property bool showROI: _guidedActionsEnabled && _vehicleFlying && __roiSupported && !_missionActive
property bool showLandAbort: _guidedActionsEnabled && _vehicleFlying && _fixedWingOnApproach
property bool showGotoLocation: _guidedActionsEnabled && _vehicleFlying
property bool showActionList: _guidedActionsEnabled && (showStartMission || showResumeMission || showChangeAlt || showLandAbort)
// Note: The '_missionItemCount - 2' is a hack to not trigger resume mission when a mission ends with an RTL item
property bool showResumeMission: _activeVehicle && !_vehicleArmed && _vehicleWasFlying && _missionAvailable && _resumeMissionIndex > 0 && (_resumeMissionIndex < _missionItemCount - 2)
property bool guidedUIVisible: confirmDialog.visible || actionList.visible
property var _corePlugin: QGroundControl.corePlugin
property var _corePluginOptions: QGroundControl.corePlugin.options
property bool _guidedActionsEnabled: (!ScreenTools.isDebug && _corePluginOptions.guidedActionsRequireRCRSSI && _activeVehicle) ? _rcRSSIAvailable : _activeVehicle
property string _flightMode: _activeVehicle ? _activeVehicle.flightMode : ""
property bool _missionAvailable: missionController.containsItems
property bool _missionActive: _activeVehicle ? _vehicleArmed && (_vehicleInLandMode || _vehicleInRTLMode || _vehicleInMissionMode) : false
property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : false
property bool _vehicleFlying: _activeVehicle ? _activeVehicle.flying : false
property bool _vehicleLanding: _activeVehicle ? _activeVehicle.landing : false
property bool _vehiclePaused: false
property bool _vehicleInMissionMode: false
property bool _vehicleInRTLMode: false
property bool _vehicleInLandMode: false
property int _missionItemCount: missionController.missionItemCount
property int _currentMissionIndex: missionController.currentMissionIndex
property int _resumeMissionIndex: missionController.resumeMissionIndex
property bool _hideEmergenyStop: !_corePluginOptions.flyView.guidedBarShowEmergencyStop
property bool _hideOrbit: !_corePluginOptions.flyView.guidedBarShowOrbit
property bool _hideROI: !_corePluginOptions.flyView.guidedBarShowROI
property bool _vehicleWasFlying: false
property bool _rcRSSIAvailable: _activeVehicle ? _activeVehicle.rcRSSI > 0 && _activeVehicle.rcRSSI <= 100 : false
property bool _fixedWingOnApproach: _activeVehicle ? _activeVehicle.fixedWing && _vehicleLanding : false
// You can turn on log output for GuidedActionsController by turning on GuidedActionsControllerLog category
property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __roiSupported: _activeVehicle ? !_hideROI && _activeVehicle.roiModeSupported : false
property bool __orbitSupported: _activeVehicle ? !_hideOrbit && _activeVehicle.orbitModeSupported : false
property bool __flightMode: _flightMode
function _outputState() {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log(qsTr("_activeVehicle(%1) _vehicleArmed(%2) guidedModeSupported(%3) _vehicleFlying(%4) _vehicleWasFlying(%5) _vehicleInRTLMode(%6) pauseVehicleSupported(%7) _vehiclePaused(%8) _flightMode(%9) _missionItemCount(%10) roiSupported(%11) orbitSupported(%12) _missionActive(%13) _hideROI(%14) _hideOrbit(%15)").arg(_activeVehicle ? 1 : 0).arg(_vehicleArmed ? 1 : 0).arg(__guidedModeSupported ? 1 : 0).arg(_vehicleFlying ? 1 : 0).arg(_vehicleWasFlying ? 1 : 0).arg(_vehicleInRTLMode ? 1 : 0).arg(__pauseVehicleSupported ? 1 : 0).arg(_vehiclePaused ? 1 : 0).arg(_flightMode).arg(_missionItemCount).arg(__roiSupported).arg(__orbitSupported).arg(_missionActive).arg(_hideROI).arg(_hideOrbit))
}
}
on_ActiveVehicleChanged: _outputState()
Component.onCompleted: _outputState()
on_VehicleArmedChanged: _outputState()
on_VehicleInRTLModeChanged: _outputState()
on_VehiclePausedChanged: _outputState()
on__FlightModeChanged: _outputState()
on__GuidedModeSupportedChanged: _outputState()
on__PauseVehicleSupportedChanged: _outputState()
on__RoiSupportedChanged: _outputState()
on__OrbitSupportedChanged: _outputState()
on_MissionItemCountChanged: _outputState()
on_MissionActiveChanged: _outputState()
on_CurrentMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_currentMissionIndex", _currentMissionIndex)
}
}
on_ResumeMissionIndexChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("_resumeMissionIndex", _resumeMissionIndex)
}
}
onShowResumeMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showResumeMission", showResumeMission)
}
_outputState()
}
onShowStartMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showStartMission", showStartMission)
}
_outputState()
if (showStartMission) {
confirmAction(actionStartMission)
}
}
onShowContinueMissionChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showContinueMission", showContinueMission)
}
_outputState()
if (showContinueMission) {
confirmAction(actionContinueMission)
}
}
onShowRTLChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showRTL", showRTL)
}
_outputState()
}
onShowChangeAltChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showChangeAlt", showChangeAlt)
}
_outputState()
}
onShowROIChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showROI", showROI)
}
_outputState()
}
onShowOrbitChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showOrbit", showOrbit)
}
_outputState()
}
onShowGotoLocationChanged: {
if (_corePlugin.guidedActionsControllerLogging()) {
console.log("showGotoLocation", showGotoLocation)
}
_outputState()
}
onShowLandAbortChanged: {
if (showLandAbort) {
confirmAction(actionLandAbort)
}
}
on_VehicleFlyingChanged: {
_outputState()
if (!_vehicleFlying) {
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
_vehicleWasFlying = true
}
}
property var _actionData
on_FlightModeChanged: {
_vehiclePaused = _activeVehicle ? _flightMode === _activeVehicle.pauseFlightMode : false
_vehicleInRTLMode = _activeVehicle ? _flightMode === _activeVehicle.rtlFlightMode || _flightMode === _activeVehicle.smartRTLFlightMode : false
_vehicleInLandMode = _activeVehicle ? _flightMode === _activeVehicle.landFlightMode : false
_vehicleInMissionMode = _activeVehicle ? _flightMode === _activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
}
Connections {
target: missionController
onResumeMissionUploadFail: confirmAction(actionResumeMissionUploadFail)
}
Connections {
target: mainWindow
onArmVehicleRequest: armVehicleRequest()
onForceArmVehicleRequest: forceArmVehicleRequest()
onDisarmVehicleRequest: disarmVehicleRequest()
onVtolTransitionToFwdFlightRequest: vtolTransitionToFwdFlightRequest()
onVtolTransitionToMRFlightRequest: vtolTransitionToMRFlightRequest()
}
function armVehicleRequest() {
confirmAction(actionArm)
}
function forceArmVehicleRequest() {
confirmAction(actionForceArm)
}
function disarmVehicleRequest() {
if (showEmergenyStop) {
confirmAction(actionEmergencyStop)
} else {
confirmAction(actionDisarm)
}
}
function vtolTransitionToFwdFlightRequest() {
confirmAction(actionVtolTransitionToFwdFlight)
}
function vtolTransitionToMRFlightRequest() {
confirmAction(actionVtolTransitionToMRFlight)
}
function closeAll() {
confirmDialog.visible = false
actionList.visible = false
altitudeSlider.visible = false
}
// Called when an action is about to be executed in order to confirm
function confirmAction(actionCode, actionData, mapIndicator) {
var showImmediate = true
closeAll()
confirmDialog.action = actionCode
confirmDialog.actionData = actionData
confirmDialog.hideTrigger = true
confirmDialog.mapIndicator = mapIndicator
confirmDialog.optionText = ""
_actionData = actionData
switch (actionCode) {
case actionArm:
if (_vehicleFlying || !_guidedActionsEnabled) {
return
}
confirmDialog.title = armTitle
confirmDialog.message = armMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showArm })
break;
case actionForceArm:
confirmDialog.title = forceArmTitle
confirmDialog.message = forceArmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showForceArm })
break;
case actionDisarm:
if (_vehicleFlying) {
return
}
confirmDialog.title = disarmTitle
confirmDialog.message = disarmMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showDisarm })
break;
case actionEmergencyStop:
confirmDialog.title = emergencyStopTitle
confirmDialog.message = emergencyStopMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showEmergenyStop })
break;
case actionTakeoff:
confirmDialog.title = takeoffTitle
confirmDialog.message = takeoffMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showTakeoff })
altitudeSlider.setToMinimumTakeoff()
altitudeSlider.visible = true
break;
case actionStartMission:
showImmediate = false
confirmDialog.title = startMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showStartMission })
break;
case actionMVStartMission:
confirmDialog.title = mvStartMissionTitle
confirmDialog.message = startMissionMessage
confirmDialog.hideTrigger = true
break;
case actionContinueMission:
showImmediate = false
confirmDialog.title = continueMissionTitle
confirmDialog.message = continueMissionMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showContinueMission })
break;
case actionResumeMission:
// Resume Mission is handled in mission end dialog
return
case actionResumeMissionUploadFail:
confirmDialog.title = resumeMissionUploadFailTitle
confirmDialog.message = resumeMissionUploadFailMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showResumeMission })
break;
case actionLand:
confirmDialog.title = landTitle
confirmDialog.message = landMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLand })
break;
case actionRTL:
confirmDialog.title = rtlTitle
confirmDialog.message = rtlMessage
if (_activeVehicle.supportsSmartRTL) {
confirmDialog.optionText = qsTr("Smart RTL")
confirmDialog.optionChecked = false
}
confirmDialog.hideTrigger = Qt.binding(function() { return !showRTL })
break;
case actionChangeAlt:
confirmDialog.title = changeAltTitle
confirmDialog.message = changeAltMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showChangeAlt })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionGoto:
confirmDialog.title = gotoTitle
confirmDialog.message = gotoMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showGotoLocation })
break;
case actionSetWaypoint:
confirmDialog.title = setWaypointTitle
confirmDialog.message = setWaypointMessage
break;
case actionOrbit:
confirmDialog.title = orbitTitle
confirmDialog.message = orbitMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showOrbit })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionLandAbort:
confirmDialog.title = landAbortTitle
confirmDialog.message = landAbortMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showLandAbort })
break;
case actionPause:
confirmDialog.title = pauseTitle
confirmDialog.message = pauseMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showPause })
altitudeSlider.reset()
altitudeSlider.visible = true
break;
case actionMVPause:
confirmDialog.title = mvPauseTitle
confirmDialog.message = mvPauseMessage
confirmDialog.hideTrigger = true
break;
case actionVtolTransitionToFwdFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionFwdMessage
confirmDialog.hideTrigger = true
break
case actionVtolTransitionToMRFlight:
confirmDialog.title = vtolTransitionTitle
confirmDialog.message = vtolTransitionMRMessage
confirmDialog.hideTrigger = true
break
case actionROI:
confirmDialog.title = roiTitle
confirmDialog.message = roiMessage
confirmDialog.hideTrigger = Qt.binding(function() { return !showROI })
break;
case actionActionList:
actionList.show()
return
default:
console.warn("Unknown actionCode", actionCode)
return
}
confirmDialog.show(showImmediate)
}
// Executes the specified action
function executeAction(actionCode, actionData, actionAltitudeChange, optionChecked) {
var i;
var rgVehicle;
switch (actionCode) {
case actionRTL:
_activeVehicle.guidedModeRTL(optionChecked)
break
case actionLand:
_activeVehicle.guidedModeLand()
break
case actionTakeoff:
_activeVehicle.guidedModeTakeoff(actionAltitudeChange)
break
case actionResumeMission:
case actionResumeMissionUploadFail:
missionController.resumeMission(missionController.resumeMissionIndex)
break
case actionStartMission:
case actionContinueMission:
_activeVehicle.startMission()
break
case actionMVStartMission:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).startMission()
}
break
case actionArm:
_activeVehicle.armed = true
break
case actionForceArm:
_activeVehicle.forceArm()
break
case actionDisarm:
_activeVehicle.armed = false
break
case actionEmergencyStop:
_activeVehicle.emergencyStop()
break
case actionChangeAlt:
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionGoto:
_activeVehicle.guidedModeGotoLocation(actionData)
break
case actionSetWaypoint:
_activeVehicle.setCurrentMissionSequence(actionData)
break
case actionOrbit:
_activeVehicle.guidedModeOrbit(orbitMapCircle.center, orbitMapCircle.radius() * (orbitMapCircle.clockwiseRotation ? 1 : -1), _activeVehicle.altitudeAMSL.rawValue + actionAltitudeChange)
break
case actionLandAbort:
_activeVehicle.abortLanding(50) // hardcoded value for climbOutAltitude that is currently ignored
break
case actionPause:
_activeVehicle.pauseVehicle()
_activeVehicle.guidedModeChangeAltitude(actionAltitudeChange)
break
case actionMVPause:
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).pauseVehicle()
}
break
case actionVtolTransitionToFwdFlight:
_activeVehicle.vtolInFwdFlight = true
break
case actionVtolTransitionToMRFlight:
_activeVehicle.vtolInFwdFlight = false
break
case actionROI:
_activeVehicle.guidedModeROI(actionData)
break
default:
console.warn(qsTr("Internal error: unknown actionCode"), actionCode)
break
}
}
}
......@@ -15,5 +15,4 @@ PreFlightGPSCheck 1.0 PreFlightGPSCheck.qml
PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
FlightDisplayWimaMenu 1.0 FlightDisplayWimaMenu.qml
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtLocation 5.3
import QtPositioning 5.3
import QGroundControl 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
// Adds visual items generated by wima planer to the map.
Item {
id: _root
property var map ///< Map control to show items on
property bool largeMapView ///< true: map takes up entire view, false: map is in small window
property string color: "green" // Mission Items Color
property var missionItems
property var path
property var zOrderWP
property var zOrderLines
property var _map: map
property var _missionLineViewComponent
property bool showItems: true
Component {
id: missionLineViewComponent
MapPolyline {
line.width: 3
line.color: showItems ? _root.color : "transparent"
path: _root.path
z: _root.zOrderLines
}
}
Repeater {
model: largeMapView ? ( showItems ? missionItems : 0) : 0
delegate: WimaMissionItemMapVisual {
map: _map
color: _root.color
zOrder: _root.zOrderWP
visible: _root.visible
}
}
Component.onCompleted: {
_missionLineViewComponent = missionLineViewComponent.createObject(map)
if (_missionLineViewComponent.status === Component.Error)
console.log(_missionLineViewComponent.errorString())
map.addMapItem(_missionLineViewComponent)
}
Component.onDestruction: {
_missionLineViewComponent.destroy()
}
}
......@@ -391,7 +391,7 @@ bool MeasurementArea::loadFromJson(const QJsonObject &json,
}
if (!progressError) {
_progress.swap(prog);
progressChanged();
emit progressChanged();
}
// do update if error occurred.
......@@ -436,7 +436,7 @@ void MeasurementArea::randomProgress() {
if (ready()) {
std::srand(std::time(nullptr));
for (auto &p : _progress) {
p += std::rand() % 100;
p += std::rand() % 125;
if (p > 100) {
p = 100;
}
......
......@@ -172,7 +172,7 @@ Rectangle {
QGCButton {
text: "Reset"
onClicked: {
_root.reset()
missionItem.reset()
}
Layout.fillWidth: true
}
......
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.4
import QtQuick.Dialogs 1.2
import QtQml 2.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Palette 1.0
/// Wima Item edit control
Rectangle {
id: _root
height: editorLoader.visible ? (editorLoader.y + editorLoader.height + (_margin * 2)) : (commandPicker.y + commandPicker.height + _margin / 2)
color: interactive ? qgcPal.missionItemEditor : qgcPal.windowShade
radius: _radius
property var map ///< Map control
property var wimaPlaner
property var masterController
property bool readOnly ///< true: read only view, false: full editing view
property var rootQgcView
property int _index
property var areaItem
signal clicked
signal remove
property var _masterController: masterController
property var _missionController: _masterController.missionController
property bool interactive: areaItem.wimaAreaInteractive
property color _outerTextColor: interactive ? qgcPal.primaryButtonText : qgcPal.text
property real _sectionSpacer: ScreenTools.defaultFontPixelWidth / 2 // spacing between section headings
readonly property real _editFieldWidth: Math.min(width - _margin * 2, ScreenTools.defaultFontPixelWidth * 12)
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2
readonly property real _hamburgerSize: commandPicker.height * 0.75
QGCPalette {
id: qgcPal
colorGroupEnabled: enabled
}
FocusScope {
id: currentItemScope
anchors.fill: parent
MouseArea {
anchors.fill: parent
onClicked: {
currentItemScope.focus = true
_root.clicked()
}
}
}
QGCLabel {
id: label
anchors.verticalCenter: commandPicker.verticalCenter
anchors.leftMargin: _margin
anchors.left: parent.left
text: _index+1
color: _outerTextColor
}
QGCColoredImage {
id: hamburger
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.right: parent.right
anchors.verticalCenter: commandPicker.verticalCenter
width: _hamburgerSize
height: _hamburgerSize
sourceSize.height: _hamburgerSize
source: "qrc:/qmlimages/Hamburger.svg"
visible: interactive
color: qgcPal.text
}
QGCMouseArea {
fillItem: hamburger
visible: hamburger.visible
onClicked: {
currentItemScope.focus = true
hamburgerMenu.popup()
}
Menu {
id: hamburgerMenu
MenuItem {
text: qsTr("Add Measurement Area")
onTriggered: wimaPlaner.addMeasurementArea()
}
MenuItem {
text: qsTr("Add Service Area")
onTriggered: wimaPlaner.addServiceArea()
}
MenuItem {
text: qsTr("Add Corridor")
onTriggered: wimaPlaner.addCorridor()
}
MenuItem {
text: qsTr("Delete")
onTriggered: remove()
}
/*MenuItem {
text: qsTr("Change Area Type ...")
onTriggered: commandPicker.clicked()
}*/
}
}
QGCButton {
id: commandPicker
anchors.topMargin: _margin / 2
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.left: label.right
anchors.top: parent.top
visible: interactive
text: areaItem.objectName;
Component {
id: commandDialog
MissionCommandDialog {
missionItem: areaItem
}
}
//onClicked: qgcView.showDialog(commandDialog, qsTr("Select Mission Command"), qgcView.showDialogDefaultWidth, StandardButton.Cancel)
}
QGCLabel {
id: commandLabel
anchors.fill: commandPicker
visible: !interactive
verticalAlignment: Text.AlignVCenter
text: areaItem.objectName;
color: _outerTextColor
}
Loader {
id: editorLoader
anchors.leftMargin: _margin
anchors.topMargin: _margin
anchors.left: parent.left
anchors.top: commandPicker.bottom
source: areaItem.editorQML
visible: interactive
property var masterController: _masterController
property real availableWidth: _root.width - (_margin * 2) ///< How wide the editor should be
property var editorRoot: _root
}
} // Rectangle
......@@ -44,7 +44,7 @@ Item {
borderWidth: 3
interiorColor: "green"
altColor: QGroundControl.globalPalette.surveyPolygonTerrainCollision
z: QGroundControl.zOrderMapItems - 1
z: QGroundControl.zOrderMapItems - 3
interiorOpacity: _root.opacity
}
......@@ -59,6 +59,7 @@ Item {
MapPolygon {
id: mapPolygon
z: QGroundControl.zOrderMapItems - 2
path: []
}
......
......@@ -91,6 +91,7 @@ Item {
line.color: "white"
line.width: 2
path: _missionItem.route
z: QGroundControl.zOrderMapItems-1
}
}
......
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
......@@ -6,23 +8,22 @@
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtLocation 5.3
import QtPositioning 5.3
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
Item {
id: _root
property var map: undefined ///< Map control to place item in
property var geoArea: undefined ///< GeoArea derived class.
property var map: undefined ///< Map control to place item in
property var geoArea: undefined ///< GeoArea derived class.
signal clicked(int sequenceNumber)
......@@ -31,18 +32,17 @@ Item {
console.assert(geoArea !== undefined, "please set the geoArea property")
}
// Area polygon
QGCMapPolygonVisuals {
id: mapPolygonVisuals
mapControl: map
mapPolygon: geoArea
interactive: geoArea.interactive
borderWidth: 2
interiorColor: "blue"
altColor: QGroundControl.globalPalette.surveyPolygonTerrainCollision
z: QGroundControl.zOrderMapItems-1
interiorOpacity: 0.2
id: mapPolygonVisuals
mapControl: map
mapPolygon: geoArea
interactive: geoArea.interactive
borderWidth: 2
interiorColor: "blue"
altColor: QGroundControl.globalPalette.surveyPolygonTerrainCollision
z: QGroundControl.zOrderMapItems - 3
interiorOpacity: 0.2
}
Item {
......@@ -51,36 +51,38 @@ Item {
MapQuickItem {
id: mapItem
coordinate: _root.geoArea.depot
anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY
visible: depotMapItem.visible
z: QGroundControl.zOrderMapItems
coordinate: _root.geoArea.depot
anchorPoint.x: sourceItem.anchorPointX
anchorPoint.y: sourceItem.anchorPointY
visible: depotMapItem.visible
z: QGroundControl.zOrderMapItems
Component.onCompleted: {
coordinate = Qt.binding(function(){return _root.geoArea.depot})
coordinate = Qt.binding(function () {
return _root.geoArea.depot
})
}
sourceItem:
MissionItemIndexLabel {
checked: true
label: qsTr("Depot")
highlightSelected: true
onClicked: _root.clicked(0)
visible: mapItem.visible
z: mapItem.z
sourceItem: MissionItemIndexLabel {
checked: true
label: qsTr("Depot")
highlightSelected: true
onClicked: _root.clicked(0)
visible: mapItem.visible
z: mapItem.z
}
}
ItemDragger {
anchor: mapItem
z: QGroundControl.zOrderMapItems+1
anchor: mapItem
z: QGroundControl.zOrderMapItems + 1
draggable: _root.geoArea.interactive
onDragStop:{
onDragStop: {
_root.geoArea.depot = mapItem.coordinate
mapItem.coordinate = Qt.binding(function(){return _root.geoArea.depot})
mapItem.coordinate = Qt.binding(function () {
return _root.geoArea.depot
})
}
}
......
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
/// Wima Area visuals
Item {
id: _root
property var map ///< Map control to place item in
property var qgcView ///< QGCView to use for popping dialogs
property var areaItem: object
property var _polygon: areaItem
signal clicked(int sequenceNumber)
/// Add an initial 4 sided polygon if there is none
function _addInitialPolygon() {
if (_polygon.count < 3) {
// Initial polygon is inset to take 2/3rds space
var rect = Qt.rect(map.centerViewport.x, map.centerViewport.y, map.centerViewport.width, map.centerViewport.height)
rect.x += (rect.width * 0.25) / 2
rect.y += (rect.height * 0.25) / 2
rect.width *= 0.75
rect.height *= 0.75
var centerCoord = map.toCoordinate(Qt.point(rect.x + (rect.width / 2), rect.y + (rect.height / 2)), false /* clipToViewPort */)
var topLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */)
var topRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y), false /* clipToViewPort */)
var bottomLeftCoord = map.toCoordinate(Qt.point(rect.x, rect.y + rect.height), false /* clipToViewPort */)
var bottomRightCoord = map.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */)
// Adjust polygon to max size
var maxSize = 100
var halfWidthMeters = Math.min(topLeftCoord.distanceTo(topRightCoord), maxSize) / 2
var halfHeightMeters = Math.min(topLeftCoord.distanceTo(bottomLeftCoord), maxSize) / 2
topLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 0)
topRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 0)
bottomLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 180)
bottomRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 180)
_polygon.appendVertex(topLeftCoord)
_polygon.appendVertex(topRightCoord)
_polygon.appendVertex(bottomRightCoord)
_polygon.appendVertex(bottomLeftCoord)
}
}
Component.onCompleted: {
_addInitialPolygon()
}
Component.onDestruction: {
}
WimaMapPolygonVisuals {
qgcView: _root.qgcView
mapControl: map
mapPolygon: _polygon
borderWidth: 1
borderColor: "black"
interiorColor: "gray"
interiorOpacity: 0.25
}
}
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.ShapeFileHelper 1.0
/// WimaMapPolygon map visuals
Item {
id: _root
property var qgcView ///< QGCView for popping dialogs
property var mapControl ///< Map control to place item in
property var mapPolygon ///< QGCMapPolygon object
property bool interactive: mapPolygon.interactive
property color interiorColor: "transparent"
property real interiorOpacity: 1
property int borderWidth: 0
property color borderColor: "black"
property bool initPolygon: false
property bool showVertexIndex: true
property var _polygonComponent
property var _dragHandlesComponent
property var _splitHandlesComponent
property var _centerDragHandleComponent
property bool _circle: false
property real _circleRadius
property bool _editCircleRadius: false
property bool _handelsVisible: false // state tracker
property bool _polygonVisible: false // state tracker
property real _zorderDragHandle: QGroundControl.zOrderMapItems + 3 // Highest to prevent splitting when items overlap
property real _zorderSplitHandle: QGroundControl.zOrderMapItems + 2
property real _zorderCenterHandle: QGroundControl.zOrderMapItems + 1 // Lowest such that drag or split takes precedence
signal dragStop // triggered if node or center handle was stopped dragging
function addPolygon() {
if (!_polygonComponent){
_polygonComponent = polygonComponent.createObject(mapControl)
mapControl.addMapItem(_polygonComponent)
}
}
function removePolygon() {
if (_polygonComponent){
_polygonComponent.destroy()
_polygonComponent = undefined
}
}
function addHandles() {
if (!_dragHandlesComponent) {
_dragHandlesComponent = dragHandlesComponent.createObject(mapControl)
}
if (!_splitHandlesComponent) {
_splitHandlesComponent = splitHandlesComponent.createObject(mapControl)
}
if (!_centerDragHandleComponent) {
_centerDragHandleComponent = centerDragHandleComponent.createObject(mapControl)
}
}
function removeHandles() {
if (_dragHandlesComponent) {
_dragHandlesComponent.destroy()
_dragHandlesComponent = undefined
}
if (_splitHandlesComponent) {
_splitHandlesComponent.destroy()
_splitHandlesComponent = undefined
}
if (_centerDragHandleComponent) {
_centerDragHandleComponent.destroy()
_centerDragHandleComponent = undefined
}
}
/// Calculate the default/initial 4 sided polygon
function defaultPolygonVertices() {
// Initial polygon is inset to take 2/3rds space
var rect = Qt.rect(mapControl.centerViewport.x, mapControl.centerViewport.y, mapControl.centerViewport.width, mapControl.centerViewport.height)
rect.x += (rect.width * 0.25) / 2
rect.y += (rect.height * 0.25) / 2
rect.width *= 0.75
rect.height *= 0.75
var centerCoord = mapControl.toCoordinate(Qt.point(rect.x + (rect.width / 2), rect.y + (rect.height / 2)), false /* clipToViewPort */)
var topLeftCoord = mapControl.toCoordinate(Qt.point(rect.x, rect.y), false /* clipToViewPort */)
var topRightCoord = mapControl.toCoordinate(Qt.point(rect.x + rect.width, rect.y), false /* clipToViewPort */)
var bottomLeftCoord = mapControl.toCoordinate(Qt.point(rect.x, rect.y + rect.height), false /* clipToViewPort */)
var bottomRightCoord = mapControl.toCoordinate(Qt.point(rect.x + rect.width, rect.y + rect.height), false /* clipToViewPort */)
// Initial polygon has max width and height of 3000 meters
var halfWidthMeters = Math.min(topLeftCoord.distanceTo(topRightCoord), 3000) / 2
var halfHeightMeters = Math.min(topLeftCoord.distanceTo(bottomLeftCoord), 3000) / 2
topLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 0)
topRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 0)
bottomLeftCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, -90).atDistanceAndAzimuth(halfHeightMeters, 180)
bottomRightCoord = centerCoord.atDistanceAndAzimuth(halfWidthMeters, 90).atDistanceAndAzimuth(halfHeightMeters, 180)
return [ topLeftCoord, topRightCoord, bottomRightCoord, bottomLeftCoord, centerCoord ]
}
/// Add an initial 4 sided polygon
function addInitialPolygon() {
if (mapPolygon.count < 3) {
var initialVertices = defaultPolygonVertices()
mapPolygon.appendVertex(initialVertices[0])
mapPolygon.appendVertex(initialVertices[1])
mapPolygon.appendVertex(initialVertices[2])
mapPolygon.appendVertex(initialVertices[3])
}
}
/// Reset polygon back to initial default
function resetPolygon() {
var initialVertices = defaultPolygonVertices()
mapPolygon.clear()
for (var i=0; i<4; i++) {
mapPolygon.appendVertex(initialVertices[i])
}
_circle = false
}
function setCircleRadius(center, radius) {
var unboundCenter = center.atDistanceAndAzimuth(0, 0)
_circleRadius = radius
var segments = 16
var angleIncrement = 360 / segments
var angle = 0
mapPolygon.clear()
for (var i=0; i<segments; i++) {
var vertex = unboundCenter.atDistanceAndAzimuth(_circleRadius, angle)
mapPolygon.appendVertex(vertex)
angle += angleIncrement
}
_circle = true
}
/// Reset polygon to a circle which fits within initial polygon
function resetCircle() {
var initialVertices = defaultPolygonVertices()
var width = initialVertices[0].distanceTo(initialVertices[1])
var height = initialVertices[1].distanceTo(initialVertices[2])
var radius = Math.min(width, height) / 2
var center = initialVertices[4]
setCircleRadius(center, radius)
}
function updateVisibility(){
if (visible){
addPolygon()
if(interactive){
addHandles()
}else{
removeHandles()
}
} else {
removeHandles()
removePolygon()
}
}
onInteractiveChanged: {
updateVisibility()
}
onVisibleChanged: {
updateVisibility()
}
Component.onCompleted: {
if(initPolygon){
addInitialPolygon()
}
updateVisibility()
}
Component.onDestruction: {
removePolygon()
removeHandles()
}
QGCPalette { id: qgcPal }
QGCFileDialog {
id: kmlOrSHPLoadDialog
qgcView: _root.qgcView
folder: QGroundControl.settingsManager.appSettings.missionSavePath
title: qsTr("Select Polygon File")
selectExisting: true
nameFilters: ShapeFileHelper.fileDialogKMLOrSHPFilters
fileExtension: QGroundControl.settingsManager.appSettings.kmlFileExtension
fileExtension2: QGroundControl.settingsManager.appSettings.shpFileExtension
onAcceptedForLoad: {
mapPolygon.loadKMLOrSHPFile(file)
mapFitFunctions.fitMapViewportToMissionItems()
close()
}
}
Menu {
id: menu
property int _editingVertexIndex: -1
function popupVertex(curIndex) {
menu._editingVertexIndex = curIndex
removeVertexItem.visible = (mapPolygon.count > 3 && menu._editingVertexIndex >= 0)
menu.popup()
}
function popupCenter() {
menu.popup()
}
MenuItem {
id: removeVertexItem
visible: !_circle
text: qsTr("Remove vertex")
onTriggered: {
if (menu._editingVertexIndex >= 0) {
mapPolygon.removeVertex(menu._editingVertexIndex)
}
}
}
MenuSeparator {
visible: removeVertexItem.visible
}
/*MenuItem {
text: qsTr("Circle" )
onTriggered: resetCircle()
}*
/*MenuItem {
text: qsTr("Polygon")
onTriggered: resetPolygon()
}*/
/*MenuItem {
text: qsTr("Set radius..." )
visible: _circle
onTriggered: _editCircleRadius = true
}*/
/*MenuItem {
text: qsTr("Edit position..." )
visible: _circle
onTriggered: qgcView.showDialog(editCenterPositionDialog, qsTr("Edit Center Position"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}*/
MenuItem {
text: qsTr("Edit position..." )
visible: !_circle && menu._editingVertexIndex >= 0
onTriggered: qgcView.showDialog(editVertexPositionDialog, qsTr("Edit Vertex Position"), qgcView.showDialogDefaultWidth, StandardButton.Close)
}
/*MenuItem {
text: qsTr("Load KML/SHP...")
onTriggered: kmlOrSHPLoadDialog.openForLoad()
}*/
}
Component {
id: polygonComponent
MapPolygon {
color: interiorColor
opacity: interiorOpacity
border.color: borderColor
border.width: borderWidth
path: mapPolygon.path
}
}
Component {
id: splitHandleComponent
MapQuickItem {
id: mapQuickItem
anchorPoint.x: dragHandle.width / 2
anchorPoint.y: dragHandle.height / 2
visible: !_circle
property int vertexIndex
sourceItem: Rectangle {
id: dragHandle
width: ScreenTools.defaultFontPixelHeight * 1.5
height: width
radius: width / 2
border.color: "white"
color: "transparent"
opacity: .50
z: _zorderSplitHandle
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
text: "+"
}
QGCMouseArea {
fillItem: parent
onClicked: mapPolygon.splitPolygonSegment(mapQuickItem.vertexIndex)
}
}
}
}
Component {
id: splitHandlesComponent
Repeater {
model: mapPolygon.path
delegate: Item {
property var _splitHandle
property var _vertices: mapPolygon.path
function _setHandlePosition() {
var nextIndex = index + 1
if (nextIndex > _vertices.length - 1) {
nextIndex = 0
}
var distance = _vertices[index].distanceTo(_vertices[nextIndex])
var azimuth = _vertices[index].azimuthTo(_vertices[nextIndex])
_splitHandle.coordinate = _vertices[index].atDistanceAndAzimuth(distance / 2, azimuth)
}
Component.onCompleted: {
_splitHandle = splitHandleComponent.createObject(mapControl)
_splitHandle.vertexIndex = index
_setHandlePosition()
mapControl.addMapItem(_splitHandle)
}
Component.onDestruction: {
if (_splitHandle) {
_splitHandle.destroy()
}
}
}
}
}
// Control which is used to drag polygon vertices
Component {
id: dragAreaComponent
MissionItemIndicatorDrag {
id: dragArea
mapControl: _root.mapControl
z: _zorderDragHandle
visible: !_circle
onDragStop: {
mapPolygon.verifyClockwiseWinding()
_root.dragStop()
}
property int polygonVertex
property bool _creationComplete: false
Component.onCompleted: _creationComplete = true
onItemCoordinateChanged: {
if (_creationComplete) {
// During component creation some bad coordinate values got through which screws up draw
mapPolygon.adjustVertex(polygonVertex, itemCoordinate)
}
}
onClicked: menu.popupVertex(polygonVertex)
}
}
Component {
id: centerDragHandle
MapQuickItem {
id: mapQuickItem
anchorPoint.x: dragHandle.width * 0.5
anchorPoint.y: dragHandle.height * 0.5
z: _zorderDragHandle
sourceItem: Rectangle {
id: dragHandle
width: ScreenTools.defaultFontPixelHeight * 1.5
height: width
radius: width * 0.5
color: Qt.rgba(1,1,1,0.8)
border.color: Qt.rgba(0,0,0,0.25)
border.width: 1
QGCColoredImage {
width: parent.width
height: width
color: Qt.rgba(0,0,0,1)
mipmap: true
fillMode: Image.PreserveAspectFit
source: "/qmlimages/MapCenter.svg"
sourceSize.height: height
anchors.centerIn: parent
}
}
}
}
Component {
id: dragHandleComponent
MapQuickItem {
id: mapQuickItem
anchorPoint.x: dragHandle.width / 2
anchorPoint.y: dragHandle.height / 2
z: _zorderDragHandle
visible: !_circle
property int polygonVertex
sourceItem: Rectangle {
id: dragHandle
width: ScreenTools.defaultFontPixelHeight * 1.5
height: width
radius: width * 0.5
color: Qt.rgba(1,1,1,0.8)
border.color: Qt.rgba(0,0,0,0.25)
border.width: 1
QGCLabel {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
color: "black"
text: showVertexIndex ? polygonVertex : ""
}
}
}
}
// Add all polygon vertex drag handles to the map
Component {
id: dragHandlesComponent
Repeater {
model: mapPolygon.pathModel
delegate: Item {
property var _visuals: [ ]
Component.onCompleted: {
var dragHandle = dragHandleComponent.createObject(mapControl)
dragHandle.coordinate = Qt.binding(function() { return object.coordinate })
dragHandle.polygonVertex = Qt.binding(function() { return index })
mapControl.addMapItem(dragHandle)
var dragArea = dragAreaComponent.createObject(mapControl, { "itemIndicator": dragHandle, "itemCoordinate": object.coordinate })
dragArea.polygonVertex = Qt.binding(function() { return index })
_visuals.push(dragHandle)
_visuals.push(dragArea)
}
Component.onDestruction: {
for (var i=0; i<_visuals.length; i++) {
_visuals[i].destroy()
}
_visuals = [ ]
}
}
}
}
Component {
id: editCenterPositionDialog
EditPositionDialog {
coordinate: mapPolygon.center
onCoordinateChanged: {
// Prevent spamming signals on vertex changes by setting centerDrag = true when changing center position.
// This also fixes a bug where Qt gets confused by all the signalling and draws a bad visual.
mapPolygon.centerDrag = true
mapPolygon.center = coordinate
mapPolygon.centerDrag = false
}
}
}
Component {
id: editVertexPositionDialog
EditPositionDialog {
coordinate: mapPolygon.vertexCoordinate(menu._editingVertexIndex)
onCoordinateChanged: {
mapPolygon.adjustVertex(menu._editingVertexIndex, coordinate)
mapPolygon.verifyClockwiseWinding()
}
}
}
Component {
id: centerDragAreaComponent
MissionItemIndicatorDrag {
mapControl: _root.mapControl
z: _zorderCenterHandle
onItemCoordinateChanged: mapPolygon.center = itemCoordinate
onDragStart: mapPolygon.centerDrag = true
onDragStop: {
mapPolygon.centerDrag = false
_root.dragStop()
}
onClicked: menu.popupCenter()
function setRadiusFromDialog() {
var radius = QGroundControl.appSettingsDistanceUnitsToMeters(radiusField.text)
setCircleRadius(mapPolygon.center, radius)
_editCircleRadius = false
}
Rectangle {
anchors.margins: _margin
anchors.left: parent.right
width: radiusColumn.width + (_margin *2)
height: radiusColumn.height + (_margin *2)
color: qgcPal.window
border.color: qgcPal.text
visible: _editCircleRadius
Column {
id: radiusColumn
anchors.margins: _margin
anchors.left: parent.left
anchors.top: parent.top
spacing: _margin
QGCLabel { text: qsTr("Radius:") }
QGCTextField {
id: radiusField
showUnits: true
unitsLabel: QGroundControl.appSettingsDistanceUnitsString
text: QGroundControl.metersToAppSettingsDistanceUnits(_circleRadius).toFixed(2)
onEditingFinished: setRadiusFromDialog()
inputMethodHints: Qt.ImhFormattedNumbersOnly
}
}
QGCLabel {
anchors.right: radiusColumn.right
anchors.top: radiusColumn.top
text: "X"
QGCMouseArea {
fillItem: parent
onClicked: setRadiusFromDialog()
}
}
}
}
}
Component {
id: centerDragHandleComponent
Item {
property var dragHandle
property var dragArea
Component.onCompleted: {
dragHandle = centerDragHandle.createObject(mapControl)
dragHandle.coordinate = Qt.binding(function() { return mapPolygon.center })
mapControl.addMapItem(dragHandle)
dragArea = centerDragAreaComponent.createObject(mapControl, { "itemIndicator": dragHandle, "itemCoordinate": mapPolygon.center })
}
Component.onDestruction: {
dragHandle.destroy()
dragArea.destroy()
}
}
}
}
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Dialogs 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QtQuick.Layouts 1.2
import QtQuick.Window 2.2
import QGroundControl 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.ShapeFileHelper 1.0
import QGroundControl.Airspace 1.0
import QGroundControl.Airmap 1.0
import Wima 1.0
/// Mission Editor
QGCView {
id: _qgcView
viewPanel: panel
z: QGroundControl.zOrderTopMost
property bool planControlColapsed: false
///< This property is used to determine dirty state for prompting on QGC shutdown
readonly property bool dirty: _planMasterController.dirty
readonly property int _decimalPlaces: 8
readonly property real _horizontalMargin: ScreenTools.defaultFontPixelWidth * 0.5
readonly property real _margin: ScreenTools.defaultFontPixelHeight * 0.5
readonly property real _radius: ScreenTools.defaultFontPixelWidth * 0.5
readonly property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
readonly property real _rightPanelWidth: Math.min(parent.width / 3, ScreenTools.defaultFontPixelWidth * 30)
readonly property real _toolButtonTopMargin: parent.height - ScreenTools.availableHeight + (ScreenTools.defaultFontPixelHeight / 2)
readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276)
readonly property bool _waypointsOnlyMode: QGroundControl.corePlugin.options.missionWaypointsOnly
property bool _airspaceEnabled: QGroundControl.airmapSupported ? (QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue && QGroundControl.airspaceManager.connected): false
property var _wimaPlaner: wimaPlaner
property var _nemo: wimaPlaner.nemoInterface
property var _planMasterController: masterController
property var _missionController: _planMasterController.missionController
property var _visualItems: _missionController.visualItems
property var _wimaVisualItems: _wimaPlaner.visualItems
property bool _lightWidgetBorders: editorMap.isSatelliteMap
property bool _addWaypointOnClick: false
property bool _addROIOnClick: false
property bool _singleComplexItem: _missionController.complexMissionItemNames.length === 1
property real _toolbarHeight: _qgcView.height - ScreenTools.availableHeight
property int _editingLayer: _layerMission
property int _toolStripBottom: _editingLayer == _layerWima ? ( wimaToolStrip.height + wimaToolStrip.y ) : ( missionToolStrip.height + missionToolStrip.y )
property var _appSettings: QGroundControl.settingsManager.appSettings
readonly property int _layerMission: 1
readonly property int _layerWima: 2
readonly property string _armedVehicleUploadPrompt: qsTr("Vehicle is currently armed. Do you want to upload the mission to the vehicle?")
Component.onCompleted: {
toolbar.planMasterController = Qt.binding(function () { return _planMasterController })
toolbar.currentMissionItem = Qt.binding(function () { return _missionController.currentPlanViewItem })
toolbar.wimaPlaner = Qt.binding(function () { return _wimaPlaner })
}
function addComplexItem(complexItemName) {
var coordinate = editorMap.center
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces)
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
insertComplexMissionItem(complexItemName, coordinate, _missionController.visualItems.count)
}
function insertComplexMissionItem(complexItemName, coordinate, index) {
var sequenceNumber = _missionController.insertComplexMissionItem(complexItemName, coordinate, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
}
function insertComplexMissionItemFromKMLOrSHP(complexItemName, file, index) {
var sequenceNumber = _missionController.insertComplexMissionItemFromKMLOrSHP(complexItemName, file, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
}
function updateAirspace(reset) {
if(_airspaceEnabled) {
var coordinateNW = editorMap.toCoordinate(Qt.point(0,0), false /* clipToViewPort */)
var coordinateSE = editorMap.toCoordinate(Qt.point(width,height), false /* clipToViewPort */)
if(coordinateNW.isValid && coordinateSE.isValid) {
QGroundControl.airspaceManager.setROI(coordinateNW, coordinateSE, true /*planView*/, reset)
}
}
}
property bool _firstMissionLoadComplete: false
property bool _firstFenceLoadComplete: false
property bool _firstRallyLoadComplete: false
property bool _firstLoadComplete: false
MapFitFunctions {
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: editorMap
usePlannedHomePosition: masterController
planMasterController: _planMasterController
function fitMapViewportToAreas() {
if (!_wimaPlaner.visualItems) {
// Being called prior to controller.start
return
}
var coordList = [ ]
for (var i = 0; i < _wimaPlaner.visualItems.count; i++){
var area = _wimaPlaner.visualItems.get(i)
for (var j = 0; j < area.path.length; ++j){
var vertex = area.path[j]
coordList.push(vertex)
}
}
fitMapViewportToAllCoordinates(coordList)
}
}
on_AirspaceEnabledChanged: {
if(QGroundControl.airmapSupported) {
if(_airspaceEnabled) {
planControlColapsed = QGroundControl.airspaceManager.airspaceVisible
updateAirspace(true)
} else {
planControlColapsed = false
}
} else {
planControlColapsed = false
}
}
Connections {
target: _appSettings.defaultMissionItemAltitude
onRawValueChanged: {
if (_visualItems.count > 1) {
_qgcView.showDialog(applyNewAltitude, qsTr("Apply new alititude"), showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
}
}
}
Component {
id: applyNewAltitude
QGCViewMessage {
message: qsTr("You have changed the default altitude for mission items. Would you like to apply that altitude to all the items in the current mission?")
function accept() {
hideDialog()
_missionController.applyDefaultMissionAltitude()
}
}
}
Component {
id: activeMissionUploadDialogComponent
QGCViewDialog {
Column {
anchors.fill: parent
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("Your vehicle is currently flying a mission. In order to upload a new or modified mission the current mission will be paused.")
}
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: qsTr("After the mission is uploaded you can adjust the current waypoint and start the mission.")
}
QGCButton {
text: qsTr("Pause and Upload")
onClicked: {
_activeVehicle.flightMode = _activeVehicle.pauseFlightMode
_planMasterController.sendToVehicle()
hideDialog()
}
}
}
}
}
Connections {
target: QGroundControl.airspaceManager
onAirspaceVisibleChanged: {
planControlColapsed = QGroundControl.airspaceManager.airspaceVisible
}
}
Component {
id: noItemForKML
QGCViewMessage {
message: qsTr("You need at least one item to create a KML.")
}
}
WimaPlaner {
id:wimaPlaner
Component.onCompleted: {
wimaPlaner.masterController = Qt.binding(function () { return masterController})
wimaPlaner.missionController = Qt.binding(function () { return masterController.missionController})
}
function addComplexItem(complexItemName) {
var coordinate = editorMap.center
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces)
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
insertComplexMissionItem(complexItemName, coordinate, _missionController.visualItems.count)
}
function insertComplexMissionItem(complexItemName, coordinate, index) {
var sequenceNumber = _missionController.insertComplexMissionItem(complexItemName, coordinate, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
}
function insertComplexMissionItemFromKMLOrSHP(complexItemName, file, index) {
var sequenceNumber = _missionController.insertComplexMissionItemFromKMLOrSHP(complexItemName, file, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
}
function updateAirspace(reset) {
if(_airspaceEnabled) {
var coordinateNW = editorMap.toCoordinate(Qt.point(0,0), false /* clipToViewPort */)
var coordinateSE = editorMap.toCoordinate(Qt.point(width,height), false /* clipToViewPort */)
if(coordinateNW.isValid && coordinateSE.isValid) {
QGroundControl.airspaceManager.setROI(coordinateNW, coordinateSE, true /*planView*/, reset)
}
}
}
function loadFromSelectedFile() {
wimaFileDialog.title = qsTr("Select Wima File")
wimaFileDialog.selectExisting = true
wimaFileDialog.nameFilters = wimaPlaner.loadNameFilters
wimaFileDialog.fileExtension = wimaPlaner.fileExtension
wimaFileDialog.fileExtension2 = _appSettings.planFileExtension
wimaFileDialog.openForLoad()
}
function saveToSelectedFile() {
wimaFileDialog.title = qsTr("Save to Wima File")
wimaFileDialog.selectExisting = false
wimaFileDialog.nameFilters = wimaPlaner.saveNameFilters
wimaFileDialog.fileExtension = wimaPlaner.fileExtension
wimaFileDialog.fileExtension2 = _appSettings.planFileExtension
wimaFileDialog.openForSave()
}
}
PlanMasterController {
id: masterController
Component.onCompleted: {
start(false /* flyView */)
_missionController.setCurrentPlanViewIndex(0, true)
}
function waitingOnDataMessage() {
_qgcView.showMessage(qsTr("Unable to Save/Upload"), qsTr("Plan is waiting on terrain data from server for correct altitude values."), StandardButton.Ok)
}
function upload() {
if (!readyForSaveSend()) {
waitingOnDataMessage()
return
}
if (_activeVehicle && _activeVehicle.armed && _activeVehicle.flightMode === _activeVehicle.missionFlightMode) {
_qgcView.showDialog(activeMissionUploadDialogComponent, qsTr("Plan Upload"), _qgcView.showDialogDefaultWidth, StandardButton.Cancel)
} else {
sendToVehicle()
}
}
function loadFromSelectedFile() {
fileDialog.title = qsTr("Select Plan File")
fileDialog.planFiles = true
fileDialog.selectExisting = true
fileDialog.nameFilters = masterController.loadNameFilters
fileDialog.fileExtension = _appSettings.planFileExtension
fileDialog.fileExtension2 = _appSettings.missionFileExtension
fileDialog.openForLoad()
}
function saveToSelectedFile() {
if (!readyForSaveSend()) {
waitingOnDataMessage()
return
}
fileDialog.title = qsTr("Save Plan")
fileDialog.planFiles = true
fileDialog.selectExisting = false
fileDialog.nameFilters = masterController.saveNameFilters
fileDialog.fileExtension = _appSettings.planFileExtension
fileDialog.fileExtension2 = _appSettings.missionFileExtension
fileDialog.openForSave()
}
function fitViewportToItems() {
mapFitFunctions.fitMapViewportToMissionItems()
}
function loadShapeFromSelectedFile() {
fileDialog.title = qsTr("Load Shape")
fileDialog.planFiles = false
fileDialog.selectExisting = true
fileDialog.nameFilters = ShapeFileHelper.fileDialogKMLOrSHPFilters
fileDialog.fileExtension = _appSettings.kmlFileExtension
fileDialog.fileExtension2 = _appSettings.shpFileExtension
fileDialog.openForLoad()
}
function saveKmlToSelectedFile() {
if (!readyForSaveSend()) {
waitingOnDataMessage()
return
}
fileDialog.title = qsTr("Save KML")
fileDialog.planFiles = false
fileDialog.selectExisting = false
fileDialog.nameFilters = ShapeFileHelper.fileDialogKMLFilters
fileDialog.fileExtension = _appSettings.kmlFileExtension
fileDialog.fileExtension2 = ""
fileDialog.openForSave()
}
}
Connections {
target: _missionController
onNewItemsFromVehicle: {
if (_visualItems && _visualItems.count != 1) {
mapFitFunctions.fitMapViewportToMissionItems()
}
_missionController.setCurrentPlanViewIndex(0, true)
}
}
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
ExclusiveGroup {
id: _mapTypeButtonsExclusiveGroup
}
/// Inserts a new simple mission item
/// @param coordinate Location to insert item
/// @param index Insert item at this index
function insertSimpleMissionItem(coordinate, index) {
var sequenceNumber = _missionController.insertSimpleMissionItem(coordinate, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
}
/// Inserts a new ROI mission item
/// @param coordinate Location to insert item
/// @param index Insert item at this index
function insertROIMissionItem(coordinate, index) {
var sequenceNumber = _missionController.insertROIMissionItem(coordinate, index)
_missionController.setCurrentPlanViewIndex(sequenceNumber, true)
_addROIOnClick = false
toolStrip.uncheckAll()
}
property int _moveDialogMissionItemIndex
QGCFileDialog {
id: fileDialog
qgcView: _qgcView
folder: _appSettings.missionSavePath
property bool planFiles: true ///< true: working with plan files, false: working with kml file
onAcceptedForSave: {
if (planFiles) {
masterController.saveToFile(file)
} else {
masterController.saveToKml(file)
}
close()
}
onAcceptedForLoad: {
if (planFiles) {
masterController.loadFromFile(file)
masterController.fitViewportToItems()
_missionController.setCurrentPlanViewIndex(0, true)
} else {
var retList = ShapeFileHelper.determineShapeType(file)
if (retList[0] === ShapeFileHelper.Error) {
_qgcView.showMessage("Error", retList[1], StandardButton.Ok)
} else if (retList[0] === ShapeFileHelper.Polygon) {
var editVehicle = _activeVehicle ? _activeVehicle : QGroundControl.multiVehicleManager.offlineEditingVehicle
if (editVehicle.fixedWing) {
insertComplexMissionItemFromKMLOrSHP(_missionController.surveyComplexItemName, file, -1)
} else {
polygonSelectPatternFile = file
_qgcView.showDialog(patternPolygonSelectDialog, fileDialog.title, _qgcView.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
}
} else if (retList[0] === ShapeFileHelper.Polyline) {
insertComplexMissionItemFromKMLOrSHP(_missionController.corridorScanComplexItemName, file, -1)
}
}
close()
}
}
QGCFileDialog {
id: wimaFileDialog
qgcView: _qgcView
folder: _appSettings.missionSavePath
onAcceptedForSave: {
wimaPlaner.saveToFile(file)
close()
}
onAcceptedForLoad: {
wimaPlaner.loadFromFile(file)
mapFitFunctions.fitMapViewportToAreas()
close()
}
}
property string polygonSelectPatternFile
Component {
id: patternPolygonSelectDialog
QGCViewDialog {
function accept() {
var complexItemName
if (surveyRadio.checked) {
complexItemName = _missionController.surveyComplexItemName
} else {
complexItemName = _missionController.structureScanComplexItemName
}
insertComplexMissionItemFromKMLOrSHP(complexItemName, polygonSelectPatternFile, -1)
hideDialog()
}
ExclusiveGroup {
id: radioGroup
}
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
text: qsTr("Create which pattern type?")
}
QGCRadioButton {
id: surveyRadio
text: qsTr("Survey")
checked: true
exclusiveGroup: radioGroup
}
QGCRadioButton {
text: qsTr("Structure Scan")
exclusiveGroup: radioGroup
}
}
}
}
Component {
id: moveDialog
QGCViewDialog {
function accept() {
var toIndex = toCombo.currentIndex
if (toIndex === 0) {
toIndex = 1
}
_missionController.moveMissionItem(_moveDialogMissionItemIndex, toIndex)
hideDialog()
}
Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
anchors.left: parent.left
anchors.right: parent.right
wrapMode: Text.WordWrap
text: qsTr("Move the selected mission item to the be after following mission item:")
}
QGCComboBox {
id: toCombo
model: _visualItems.count
currentIndex: _moveDialogMissionItemIndex
}
}
}
}
QGCViewPanel {
id: panel
anchors.fill: parent
FlightMap {
id: editorMap
anchors.fill: parent
mapName: "MissionEditor"
allowGCSLocationCenter: true
allowVehicleLocationCenter: true
planView: true
qgcView: _qgcView
// This is the center rectangle of the map which is not obscured by tools
property rect centerViewport: Qt.rect(_leftToolWidth, _toolbarHeight, editorMap.width - _leftToolWidth - _rightPanelWidth, editorMap.height - _statusHeight - _toolbarHeight)
property real _leftToolWidth: _editingLayer == _layerWima ? ( wimaToolStrip.x + wimaToolStrip.width ) : ( missionToolStrip.x + missionToolStrip.width )
property real _statusHeight: waypointValuesDisplay.visible ? editorMap.height - waypointValuesDisplay.y : 0
readonly property real animationDuration: 500
// Initial map position duplicates Fly view position
Component.onCompleted: editorMap.center = QGroundControl.flightMapPosition
Behavior on zoomLevel {
NumberAnimation {
duration: editorMap.animationDuration
easing.type: Easing.InOutQuad
}
}
QGCMapPalette { id: mapPal; lightColors: editorMap.isSatelliteMap }
onZoomLevelChanged: updateAirspace(false)
onCenterChanged: updateAirspace(false)
MouseArea {
//-- It's a whole lot faster to just fill parent and deal with top offset below
// than computing the coordinate offset.
anchors.fill: parent
onClicked: {
// Take focus to close any previous editing
editorMap.focus = true
//-- Don't pay attention to items beneath the toolbar.
var topLimit = parent.height - ScreenTools.availableHeight
if(mouse.y < topLimit) {
return
}
var coordinate = editorMap.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
coordinate.latitude = coordinate.latitude.toFixed(_decimalPlaces)
coordinate.longitude = coordinate.longitude.toFixed(_decimalPlaces)
coordinate.altitude = coordinate.altitude.toFixed(_decimalPlaces)
switch (_editingLayer) {
case _layerMission:
if (_addWaypointOnClick) {
insertSimpleMissionItem(coordinate, _missionController.visualItems.count)
} else if (_addROIOnClick) {
_addROIOnClick = false
insertROIMissionItem(coordinate, _missionController.visualItems.count)
}
break
}
}
}
// Add the mission item visuals to the map
Repeater {
model: _editingLayer == _layerMission ? _missionController.visualItems : undefined
delegate: MissionItemMapVisual {
map: editorMap
qgcView: _qgcView
onClicked: _missionController.setCurrentPlanViewIndex(sequenceNumber, false)
visible: _editingLayer == _layerMission
}
}
// Add lines between waypoints
MissionLineView {
model: _editingLayer == _layerMission ? _missionController.waypointLines : []
}
//Add Wima Visuals
Repeater {
model: wimaPlaner.visualItems
delegate: WimaMapVisual {
map: editorMap ///< Map control to place item in
qgcView: _qgcView ///< QGCView to use for popping dialogs
visible: true
}
onItemAdded: {
//console.log("Item added")
}
}
// Add the vehicles to the map
MapItemView {
model: QGroundControl.multiVehicleManager.vehicles
delegate:
VehicleMapItem {
vehicle: object
coordinate: object.coordinate
map: editorMap
size: ScreenTools.defaultFontPixelHeight * 3
z: QGroundControl.zOrderMapItems - 1
}
}
// Airspace overlap support
MapItemView {
model: _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.circles : []
delegate: MapCircle {
center: object.center
radius: object.radius
color: object.color
border.color: object.lineColor
border.width: object.lineWidth
}
}
MapItemView {
model: _airspaceEnabled && QGroundControl.airspaceManager.airspaceVisible ? QGroundControl.airspaceManager.airspaces.polygons : []
delegate: MapPolygon {
path: object.polygon
color: object.color
border.color: object.lineColor
border.width: object.lineWidth
}
}
ToolStrip {
id: wimaToolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin
anchors.top: parent.top
color: qgcPal.window
title: qsTr("Wima")
visible: _editingLayer == _layerWima
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ false, false, false, false, false, false, false, false, false ]
rotateImage: [ false, false, false, false, false, false, false, false, false ]
animateImage: [ false, false, false, false, false, false, false, false, false ]
buttonEnabled: [ true, true, true, true, true, true, true, true, true ]
buttonVisible: [ true, true, true, true, true, true, true, _showZoom, _showZoom ]
maxHeight: mapScale.y - wimaToolStrip.y
property bool _showZoom: !ScreenTools.isMobile
model: [
{
name: qsTr("File"),
iconSource: "/qmlimages/MapSync.svg",
alternateIconSource: "/qmlimages/MapSyncChanged.svg",
dropPanelComponent: syncDropPanel
},
{
name: qsTr("Measure"),
iconSource: "/res/measurement.png"
},
{
name: qsTr("Service"),
iconSource: "/res/service.png"
},
{
name: qsTr("Corridor"),
iconSource: "/res/street.png"
},
{
name: qsTr("Update"),
iconSource: "/res/calculator.png"
},
{
name: qsTr("Publish"),
iconSource: "/res/calculator.png"
},
{
name: qsTr("Center"),
iconSource: "/qmlimages/MapCenter.svg",
dropPanelComponent: centerMapDropPanel
},
{
name: qsTr("In"),
iconSource: "/qmlimages/ZoomPlus.svg"
},
{
name: qsTr("Out"),
iconSource: "/qmlimages/ZoomMinus.svg"
}
]
onClicked: {
switch (index) {
case 1:
wimaPlaner.addMeasurementArea();
break
case 2:
wimaPlaner.addServiceArea();
break
case 3:
wimaPlaner.addCorridor();
break
case 4:
wimaPlaner.update();
break
case 5:
_nemo.publishTileData();
break
case 7:
editorMap.zoomLevel += 0.5
break
case 8:
editorMap.zoomLevel -= 0.5
break
}
}
}
ToolStrip {
id: missionToolStrip
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.topMargin: _toolButtonTopMargin
anchors.top: parent.top
color: qgcPal.window
title: qsTr("Plan")
visible: _editingLayer == _layerMission
z: QGroundControl.zOrderWidgets
showAlternateIcon: [ masterController.dirty, false, false, false, false, false, false ]
rotateImage: [ masterController.syncInProgress, false, false, false, false, false, false ]
animateImage: [ masterController.dirty, false, false, false, false, false, false ]
buttonEnabled: [ !masterController.syncInProgress, true, true, true, true, true, true ]
buttonVisible: [ true, true, _waypointsOnlyMode, true, true, _showZoom, _showZoom ]
maxHeight: mapScale.y - missionToolStrip.y
property bool _showZoom: !ScreenTools.isMobile
model: [
{
name: qsTr("File"),
iconSource: "/qmlimages/MapSync.svg",
alternateIconSource: "/qmlimages/MapSyncChanged.svg",
dropPanelComponent: syncDropPanel
},
{
name: qsTr("Waypoint"),
iconSource: "/qmlimages/MapAddMission.svg",
toggle: true
},
{
name: qsTr("ROI"),
iconSource: "/qmlimages/MapAddMission.svg",
toggle: true
},
{
name: _singleComplexItem ? _missionController.complexMissionItemNames[0] : qsTr("Pattern"),
iconSource: "/qmlimages/MapDrawShape.svg",
dropPanelComponent: _singleComplexItem ? undefined : patternDropPanel
},
{
name: qsTr("Center"),
iconSource: "/qmlimages/MapCenter.svg",
dropPanelComponent: centerMapDropPanel
},
{
name: qsTr("In"),
iconSource: "/qmlimages/ZoomPlus.svg"
},
{
name: qsTr("Out"),
iconSource: "/qmlimages/ZoomMinus.svg"
}
]
onClicked: {
switch (index) {
case 1:
_addWaypointOnClick = checked
_addROIOnClick = false
break
case 2:
_addROIOnClick = checked
_addWaypointOnClick = false
break
case 3:
if (_singleComplexItem) {
addComplexItem(_missionController.complexMissionItemNames[0])
}
break
case 5:
editorMap.zoomLevel += 0.5
break
case 6:
editorMap.zoomLevel -= 0.5
break
}
}
}
}
//-----------------------------------------------------------
// Right pane for mission editing controls
Rectangle {
id: rightPanel
height: ScreenTools.availableHeight
width: _rightPanelWidth
color: qgcPal.window
opacity: planExpanded.visible ? 0.2 : 0
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
}
//-------------------------------------------------------
// Right Panel Controls
Item {
anchors.fill: rightPanel
Column {
id: rightControls
spacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.25
//-------------------------------------------------------
// Airmap Airspace Control
AirspaceControl {
id: airspaceControl
width: parent.width
visible: _airspaceEnabled
planView: true
showColapse: true
}
//-------------------------------------------------------
// Mission Controls (Colapsed)
Rectangle {
width: parent.width
height: planControlColapsed ? colapsedRow.height + ScreenTools.defaultFontPixelHeight : 0
color: qgcPal.missionItemEditor
radius: _radius
visible: planControlColapsed && _airspaceEnabled
Row {
id: colapsedRow
spacing: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
anchors.verticalCenter: parent.verticalCenter
QGCColoredImage {
width: height
height: ScreenTools.defaultFontPixelWidth * 2.5
sourceSize.height: height
source: "qrc:/res/waypoint.svg"
color: qgcPal.text
anchors.verticalCenter: parent.verticalCenter
}
QGCLabel {
text: qsTr("Plan")
color: qgcPal.text
anchors.verticalCenter: parent.verticalCenter
}
}
QGCColoredImage {
width: height
height: ScreenTools.defaultFontPixelWidth * 2.5
sourceSize.height: height
source: QGroundControl.airmapSupported ? "qrc:/airmap/expand.svg" : ""
color: "white"
visible: QGroundControl.airmapSupported
anchors.right: parent.right
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.verticalCenter: parent.verticalCenter
}
MouseArea {
anchors.fill: parent
enabled: QGroundControl.airmapSupported
onClicked: {
QGroundControl.airspaceManager.airspaceVisible = false
}
}
}
//-------------------------------------------------------
// Mission Controls (Expanded)
Rectangle {
id: planExpanded
width: parent.width
height: (!planControlColapsed || !_airspaceEnabled) ? expandedCol.height + ScreenTools.defaultFontPixelHeight : 0
color: qgcPal.missionItemEditor
radius: _radius
visible: !planControlColapsed || !_airspaceEnabled
Item {
height: expandedCol.height
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
Column {
id: expandedCol
spacing: ScreenTools.defaultFontPixelHeight * 0.5
anchors.left: parent.left
anchors.right: parent.right
//-- Header
Row {
id: expandedRow
spacing: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.leftMargin: ScreenTools.defaultFontPixelWidth
readonly property real _buttonRadius: ScreenTools.defaultFontPixelHeight * 0.75
QGCLabel {
text: qsTr("Plan")
color: qgcPal.text
visible: !QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter
}
ExclusiveGroup {
id: planElementSelectorGroup
onCurrentChanged: {
switch (current) {
case planElementMission:
_editingLayer = _layerMission
_wimaPlaner.resetAllInteractive();
break
case planElementWima:
_editingLayer = _layerWima
_wimaPlaner.setInteractive();
break
}
}
}
QGCRadioButton {
id: planElementWima
exclusiveGroup: planElementSelectorGroup
text: qsTr("Wima")
checked: true
visible: QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter
onCheckedChanged:{
if (!checked && !wimaPlaner.surveyReady){
wimaPlaner.update()
}
}
}
QGCRadioButton {
id: planElementMission
exclusiveGroup: planElementSelectorGroup
text: qsTr("Mission")
visible: QGroundControl.corePlugin.options.enablePlanViewSelector
anchors.verticalCenter: parent.verticalCenter
}
}
}
}
}
}
//-------------------------------------------------------
// Wima Item Editor
Item {
id: wimaItemEditor
anchors.left: parent.left
anchors.right: parent.right
anchors.top: rightControls.bottom
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.bottom: parent.bottom
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 0.25
visible: _editingLayer == _layerWima && !planControlColapsed
QGCListView {
id: wimaItemEditorListView
anchors.fill: parent
spacing: ScreenTools.defaultFontPixelHeight / 4
orientation: ListView.Vertical
model: wimaPlaner.visualItems
cacheBuffer: Math.max(height * 2, 0)
clip: true
currentIndex: wimaPlaner.currentPolygonIndex
highlightMoveDuration: 250
visible: _editingLayer == _layerWima && !planControlColapsed
//-- List Elements
delegate: WimaItemEditor {
map: editorMap
masterController: _planMasterController
wimaPlaner: _wimaPlaner
_index: index
areaItem: object
width: parent.width
readOnly: false
rootQgcView: _qgcView
onClicked: _wimaPlaner.currentPolygonIndex = index
onRemove: {
var removeIndex = index
_wimaPlaner.removeArea(removeIndex)
}
}
}
}
//-------------------------------------------------------
// Mission Item Editor
Item {
id: missionItemEditor
anchors.left: parent.left
anchors.right: parent.right
anchors.top: rightControls.bottom
anchors.topMargin: ScreenTools.defaultFontPixelHeight * 0.5
anchors.bottom: parent.bottom
anchors.bottomMargin: ScreenTools.defaultFontPixelHeight * 0.25
visible: _editingLayer == _layerMission && !planControlColapsed
QGCListView {
id: missionItemEditorListView
anchors.fill: parent
spacing: ScreenTools.defaultFontPixelHeight / 4
orientation: ListView.Vertical
model: _missionController.visualItems
cacheBuffer: Math.max(height * 2, 0)
clip: true
currentIndex: _missionController.currentPlanViewIndex
highlightMoveDuration: 250
visible: _editingLayer == _layerMission && !planControlColapsed
//-- List Elements
delegate: MissionItemEditor {
map: editorMap
masterController: _planMasterController
missionItem: object
width: parent.width
readOnly: false
rootQgcView: _qgcView
onClicked: _missionController.setCurrentPlanViewIndex(object.sequenceNumber, false)
onRemove: {
var removeIndex = index
_missionController.removeMissionItem(removeIndex)
if (removeIndex >= _missionController.visualItems.count) {
removeIndex--
}
_missionController.setCurrentPlanViewIndex(removeIndex, true)
}
onInsertWaypoint: insertSimpleMissionItem(editorMap.center, index)
onInsertComplexItem: insertComplexMissionItem(complexItemName, editorMap.center, index)
}
}
}
}
MapScale {
id: mapScale
anchors.margins: ScreenTools.defaultFontPixelHeight * (0.66)
anchors.bottom: waypointValuesDisplay.visible ? waypointValuesDisplay.top : parent.bottom
anchors.left: parent.left
mapControl: editorMap
visible: _toolStripBottom < y
}
MissionItemStatus {
id: waypointValuesDisplay
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
height: ScreenTools.defaultFontPixelHeight * 7
maxWidth: parent.width - rightPanel.width - x
anchors.bottom: parent.bottom
missionItems: _missionController.visualItems
visible: _editingLayer === _layerMission && (_toolStripBottom + mapScale.height) < y && QGroundControl.corePlugin.options.showMissionStatus
}
}
Component {
id: syncLoadFromVehicleOverwrite
QGCViewMessage {
id: syncLoadFromVehicleCheck
message: qsTr("You have unsaved/unsent changes. Loading from the Vehicle will lose these changes. Are you sure you want to load from the Vehicle?")
function accept() {
hideDialog()
masterController.loadFromVehicle()
}
}
}
Component {
id: syncLoadFromFileOverwrite
QGCViewMessage {
id: syncLoadFromVehicleCheck
message: qsTr("You have unsaved/unsent changes. Loading from a file will lose these changes. Are you sure you want to load from a file?")
function accept() {
hideDialog()
masterController.loadFromSelectedFile()
}
}
}
Component {
id: removeAllPromptDialog
QGCViewMessage {
message: qsTr("Are you sure you want to remove all items and create a new plan? ") +
(_planMasterController.offline ? "" : qsTr("This will also remove all items from the vehicle."))
function accept() {
if (_planMasterController.offline) {
masterController.removeAll()
} else {
masterController.removeAllFromVehicle()
}
hideDialog()
}
}
}
Component {
id: wimaRemoveAllPromptDialog
QGCViewMessage {
message: qsTr("Are you sure you want to remove all items and create a Wima mission? ")
function accept() {
wimaPlaner.removeAll();
hideDialog()
}
}
}
Component {
id: clearVehicleMissionDialog
QGCViewMessage {
message: qsTr("Are you sure you want to remove all mission items and clear the mission from the vehicle?")
function accept() {
masterController.removeAllFromVehicle()
hideDialog()
}
}
}
//- ToolStrip DropPanel Components
Component {
id: centerMapDropPanel
QGCButtonColumn {
headLine: qsTr("Center map on:")
model:[
[
qsTr("Mission"), /*button text*/
true, /*visible*/
true, /*enabled*/
function(){mapFitFunctions.fitMapViewportToMissionItems()} /*onClicked*/
],
[
qsTr("All Items"), /*button text*/
true, /*visible*/
true, /*enabled*/
function(){mapFitFunctions.fitMapViewportToAllItems()} /*onClicked*/
],
[
qsTr("Areas"), /*button text*/
true, /*visible*/
true, /*enabled*/
function(){mapFitFunctions.fitMapViewportToAreas()} /*onClicked*/
],
[
qsTr("Home"), /*button text*/
true, /*visible*/
true, /*enabled*/
function(){editorMap.center = mapFitFunctions.fitHomePosition()} /*onClicked*/
],
[
qsTr("Vehicle"), /*button text*/
true, /*visible*/
_activeVehicle && _activeVehicle.coordinate.isValid, /*enabled*/
function(){editorMap.center = _activeVehicle.coordinate} /*onClicked*/
],
[
qsTr("Current Location"), /*button text*/
true, /*visible*/
editorMap.gcsPosition.isValid, /*enabled*/
function(){editorMap.center = editorMap.gcsPosition} /*onClicked*/
],
[
qsTr("Specified Location"), /*button text*/
true, /*visible*/
true, /*enabled*/
function(){editorMap.centerToSpecifiedLocation()} /*onClicked*/
]
]
}
}
Component {
id: patternDropPanel
ColumnLayout {
spacing: ScreenTools.defaultFontPixelWidth * 0.5
QGCLabel { text: qsTr("Create complex pattern:") }
Repeater {
model: _missionController.complexMissionItemNames
QGCButton {
text: modelData
Layout.fillWidth: true
onClicked: {
addComplexItem(modelData)
dropPanel.hide()
}
}
}
Rectangle {
width: parent.width * 0.8
height: 1
color: qgcPal.text
opacity: 0.5
Layout.fillWidth: true
Layout.columnSpan: 2
}
QGCButton {
text: qsTr("Load KML/SHP...")
Layout.fillWidth: true
enabled: !masterController.syncInProgress
onClicked: {
masterController.loadShapeFromSelectedFile()
dropPanel.hide()
}
}
} // Column
}
Component {
id: syncDropPanel
Column {
id: columnHolder
spacing: _margin
property string _overwriteText: qsTr("Mission overwrite")
QGCLabel {
width: sendSaveGrid.width
wrapMode: Text.WordWrap
text: masterController.dirty ?
(_activeVehicle ?
qsTr("You have unsaved changes. You should upload to your vehicle, or save to a file:") :
qsTr("You have unsaved changes.")
) :
qsTr("File:")
}
GridLayout {
id: sendSaveGrid
columns: 2
anchors.margins: _margin
rowSpacing: _margin
columnSpacing: ScreenTools.defaultFontPixelWidth
QGCButton {
text: qsTr("New")
Layout.fillWidth: true
enabled: _wimaVisualItems.count >= 1 || _missionController.visualItems.count > 1
onClicked: {
dropPanel.hide()
_qgcView.showDialog(wimaRemoveAllPromptDialog, qsTr("New Plan"), _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.No)
}
}
QGCButton {
text: qsTr("Open")
Layout.fillWidth: true
enabled: true//!masterController.syncInProgress
onClicked: {
dropPanel.hide()
wimaPlaner.loadFromSelectedFile()
}
}
QGCButton {
text: qsTr("Save ")
Layout.fillWidth: true
enabled: wimaPlaner.currentFile !== ""
onClicked: {
dropPanel.hide()
wimaPlaner.saveToCurrent()
console.log("saveing to: ", wimaPlaner.currentFile)
}
}
QGCButton {
text: qsTr("Save As...")
Layout.fillWidth: true
enabled: _wimaVisualItems.count >= 1
onClicked: {
dropPanel.hide()
wimaPlaner.saveToSelectedFile()
}
}
/*QGCButton {
text: qsTr("Save Mission Waypoints As KML...")
Layout.columnSpan: 2
enabled: !masterController.syncInProgress && _visualItems.count > 1
onClicked: {
// First point does not count
if (_visualItems.count < 2) {
_qgcView.showDialog(noItemForKML, qsTr("KML"), _qgcView.showDialogDefaultWidth, StandardButton.Cancel)
return
}
dropPanel.hide()
masterController.saveKmlToSelectedFile()
}
}*/
Rectangle {
width: parent.width * 0.8
height: 1
color: qgcPal.text
opacity: 0.5
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
Layout.fillWidth: true
Layout.columnSpan: 2
}
QGCButton {
text: qsTr("Upload")
Layout.fillWidth: true
enabled: !masterController.offline && !masterController.syncInProgress && _visualItems.count > 1
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
dropPanel.hide()
masterController.upload()
}
}
QGCButton {
text: qsTr("Download")
Layout.fillWidth: true
enabled: !masterController.offline && !masterController.syncInProgress
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
dropPanel.hide()
if (masterController.dirty) {
_qgcView.showDialog(syncLoadFromVehicleOverwrite, columnHolder._overwriteText, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
} else {
masterController.loadFromVehicle()
}
}
}
QGCButton {
text: qsTr("Clear Vehicle Mission")
Layout.fillWidth: true
Layout.columnSpan: 2
enabled: !masterController.offline && !masterController.syncInProgress
visible: !QGroundControl.corePlugin.options.disableVehicleConnection
onClicked: {
dropPanel.hide()
_qgcView.showDialog(clearVehicleMissionDialog, text, _qgcView.showDialogDefaultWidth, StandardButton.Yes | StandardButton.Cancel)
}
}
}
}
}
Rectangle {
id: debugMessageWindow
visible: false
anchors.bottom: parent.bottom
width: parent.width*0.7
x: (parent.width-width)/2
height: 150
radius: 1
border.color: "black"
border.width: 1
color: "green"
z:100
QGCListView {
anchors.fill: parent
model: wimaPlaner.visualItems
delegate: Rectangle{
height: 15
color: "lightsteelblue"
radius: 1
Text {
text: ""
}
}
}
}
} // QGCVIew
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtLocation 5.3
import QtPositioning 5.3
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightMap 1.0
/// Simple Mission Item visuals
Item {
id: _root
property var map ///< Map control to place item in
property var qgcView ///< QGCView to use for popping dialogs
property int zOrder
property var color
property var _missionItem: object
property var _itemVisual
property var _dragArea
property bool _itemVisualShowing: false
property bool _dragAreaShowing: false
signal clicked(int sequenceNumber)
function hideItemVisuals() {
if (_itemVisualShowing) {
_itemVisual.destroy()
_itemVisualShowing = false
}
}
function showItemVisuals() {
if (!_itemVisualShowing) {
_itemVisual = indicatorComponent.createObject(map)
map.addMapItem(_itemVisual)
_itemVisualShowing = true
}
}
function hideDragArea() {
if (_dragAreaShowing) {
_dragArea.destroy()
_dragAreaShowing = false
}
}
function showDragArea() {
if (!_dragAreaShowing && _missionItem.specifiesCoordinate) {
_dragArea = dragAreaComponent.createObject(map)
_dragAreaShowing = true
}
}
Component.onCompleted: {
showItemVisuals()
if (_missionItem.isCurrentItem && map.planView) {
showDragArea()
}
}
Component.onDestruction: {
hideDragArea()
hideItemVisuals()
}
Connections {
target: _missionItem
onIsCurrentItemChanged: {
if (_missionItem.isCurrentItem) {
showDragArea()
} else {
hideDragArea()
}
}
}
// Control which is used to drag items
Component {
id: dragAreaComponent
MissionItemIndicatorDrag {
mapControl: _root.map
itemIndicator: _itemVisual
itemCoordinate: _missionItem.coordinate
onItemCoordinateChanged: _missionItem.coordinate = itemCoordinate
}
}
Component {
id: indicatorComponent
MissionItemIndicator {
coordinate: _missionItem.coordinate
visible: _missionItem.specifiesCoordinate && _root.visible
z: _root.zOrder
missionItem: _missionItem
sequenceNumber: _missionItem.sequenceNumber
color: _root.color
onClicked: _root.clicked(_missionItem.sequenceNumber)
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment