Commit af4b4687 authored by Valentin Platzgummer's avatar Valentin Platzgummer

wima planer issues solve, progress indicator added

parent dfceedc3
...@@ -63,8 +63,8 @@ execute_process( ...@@ -63,8 +63,8 @@ execute_process(
) )
add_definitions( add_definitions(
-DQGC_APPLICATION_NAME="QGroundControl" -DQGC_APPLICATION_NAME="QGCWima"
-DQGC_ORG_NAME="QGroundControl.org" -DQGC_ORG_NAME="QGCWima.org"
-DQGC_ORG_DOMAIN="org.qgroundcontrol" -DQGC_ORG_DOMAIN="org.qgroundcontrol"
) )
......
...@@ -2,4 +2,5 @@ ...@@ -2,4 +2,5 @@
<qresource prefix="/qml"> <qresource prefix="/qml">
<file alias="QGroundControl/Controls/HackFileDialog.qml">src/QmlControls/HackFileDialog.qml</file> <file alias="QGroundControl/Controls/HackFileDialog.qml">src/QmlControls/HackFileDialog.qml</file>
</qresource> </qresource>
<qresource prefix="/"/>
</RCC> </RCC>
...@@ -4,18 +4,18 @@ ...@@ -4,18 +4,18 @@
"AreaType": "Service Area", "AreaType": "Service Area",
"BorderPolygonOffset": 6, "BorderPolygonOffset": 6,
"DepotAltitude": 0, "DepotAltitude": 0,
"DepotLatitude": 47.76798743982897, "DepotLatitude": 47.76779586216649,
"DepotLongitude": 16.529971617189517, "DepotLongitude": 16.530510396830728,
"ShowBorderPolygon": 0, "ShowBorderPolygon": 0,
"maxAltitude": 30, "maxAltitude": 30,
"polygon": [ "polygon": [
[ [
47.767969216951194, 47.76780094967389,
16.52966542475528 16.530343715825353
], ],
[ [
47.768300890394606, 47.76788238112663,
16.530430381687438 16.530625096151965
], ],
[ [
47.767783696604035, 47.767783696604035,
...@@ -59,10 +59,6 @@ ...@@ -59,10 +59,6 @@
47.7677855557718, 47.7677855557718,
16.530403347547246 16.530403347547246
], ],
[
47.76800516387784,
16.530513932174728
],
[ [
47.76799814678123, 47.76799814678123,
16.530388491662848 16.530388491662848
...@@ -95,19 +91,19 @@ ...@@ -95,19 +91,19 @@
0, 0,
0, 0,
null, null,
47.76794255683365, 47.76779586216649,
16.53029214577345, 16.530510396830728,
5 5
], ],
"type": "SimpleItem" "type": "SimpleItem"
}, },
{ {
"DeltaAlpha": 3, "Alpha": 23,
"DeltaR": 10, "MinLength": 5,
"ReferencePointAlt": 0, "ReferencePointAlt": 0,
"ReferencePointLat": 47.77087170283815, "ReferencePointLat": 47.76807182520187,
"ReferencePointLong": 16.53120355954269, "ReferencePointLong": 16.530610531894183,
"TransectMinLength": 1, "TransectDistance": 2,
"TransectStyleComplexItem": { "TransectStyleComplexItem": {
"CameraCalc": { "CameraCalc": {
"AdjustedFootprintFrontal": 25, "AdjustedFootprintFrontal": 25,
...@@ -132,8 +128,8 @@ ...@@ -132,8 +128,8 @@
0, 0,
0, 0,
null, null,
47.76786965695791, 47.76780546458091,
16.5304471058032, 16.530404628981014,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -148,8 +144,8 @@ ...@@ -148,8 +144,8 @@
0, 0,
0, 0,
null, null,
47.767852121581285, 47.7680176218918,
16.530624995372722, 16.531145995840845,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -164,8 +160,8 @@ ...@@ -164,8 +160,8 @@
0, 0,
0, 0,
null, null,
47.768280070477275, 47.76803465648041,
16.531012421511814, 16.53113723392403,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -180,8 +176,8 @@ ...@@ -180,8 +176,8 @@
0, 0,
0, 0,
null, null,
47.76828174772784, 47.76782462170033,
16.53094964311624, 16.530403289516762,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -196,8 +192,8 @@ ...@@ -196,8 +192,8 @@
0, 0,
0, 0,
null, null,
47.768293889869426, 47.767843780618456,
16.530755276539708, 16.530401950051516,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -212,8 +208,8 @@ ...@@ -212,8 +208,8 @@
0, 0,
0, 0,
null, null,
47.7682219391165, 47.76805169016891,
16.530560469333935, 16.53112847333554,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -228,8 +224,8 @@ ...@@ -228,8 +224,8 @@
0, 0,
0, 0,
null, null,
47.76820508527868, 47.768068723856686,
16.5307314416142, 16.531119712741326,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -244,8 +240,8 @@ ...@@ -244,8 +240,8 @@
0, 0,
0, 0,
null, null,
47.76819200424394, 47.767862938637116,
16.53094084541531, 16.53040061191935,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -260,8 +256,8 @@ ...@@ -260,8 +256,8 @@
0, 0,
0, 0,
null, null,
47.76818883948184, 47.76788209665569,
16.531059344799864, 16.53039927245214,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -276,8 +272,8 @@ ...@@ -276,8 +272,8 @@
0, 0,
0, 0,
null, null,
47.76809760666698, 47.76808575754375,
16.53110626925785, 16.53111095080734,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -292,8 +288,8 @@ ...@@ -292,8 +288,8 @@
0, 0,
0, 0,
null, null,
47.76810225985858, 47.76810279212948,
16.5309320464106, 16.53110218886764,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -308,8 +304,8 @@ ...@@ -308,8 +304,8 @@
0, 0,
0, 0,
null, null,
47.76811577885341, 47.76790125467419,
16.530715631144773, 16.530397934318007,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -324,8 +320,8 @@ ...@@ -324,8 +320,8 @@
0, 0,
0, 0,
null, null,
47.768136979184064, 47.767920412692604,
16.530500573736578, 16.530396594848835,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -340,8 +336,8 @@ ...@@ -340,8 +336,8 @@
0, 0,
0, 0,
null, null,
47.7681521944103, 47.76811982671451,
16.530388084190108, 16.531093428256273,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -356,8 +352,8 @@ ...@@ -356,8 +352,8 @@
0, 0,
0, 0,
null, null,
47.76807542298544, 47.768136860399416,
16.53027770936353, 16.53108466630512,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -372,8 +368,8 @@ ...@@ -372,8 +368,8 @@
0, 0,
0, 0,
null, null,
47.76804836071953, 47.76793957161033,
16.53047779455375, 16.530395256712723,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -388,8 +384,8 @@ ...@@ -388,8 +384,8 @@
0, 0,
0, 0,
null, null,
47.76802647332397, 47.767958730527994,
16.530699820729467, 16.53039391724158,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -404,8 +400,8 @@ ...@@ -404,8 +400,8 @@
0, 0,
0, 0,
null, null,
47.768012516370526, 47.768153894983,
16.530923248770208, 16.53107590568231,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -420,8 +416,8 @@ ...@@ -420,8 +416,8 @@
0, 0,
0, 0,
null, null,
47.76800654291486, 47.76817092866645,
16.531146891465884, 16.531067145053775,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -436,8 +432,8 @@ ...@@ -436,8 +432,8 @@
0, 0,
0, 0,
null, null,
47.76792538641036, 47.76797788764677,
16.530872608510265, 16.530392579103516,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -452,8 +448,8 @@ ...@@ -452,8 +448,8 @@
0, 0,
0, 0,
null, null,
47.76793716779096, 47.767997046564254,
16.530684010368297, 16.530391239630404,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -468,8 +464,328 @@ ...@@ -468,8 +464,328 @@
0, 0,
0, 0,
null, null,
47.767956224940995, 47.7681879623492,
16.530490697489185, 16.53105838308546,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 24,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820499693062,
16.531049622445487,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 25,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768011359505685,
16.530372972324884,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 26,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802514809256,
16.530352870682762,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76822203061193,
16.531040860465723,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 28,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7682390651919,
16.53103209981431,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 29,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768038937575305,
16.530332769030014,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 30,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76805272615508,
16.53031266736664,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 31,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768256098871774,
16.531023337823104,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 32,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768273133450315,
16.531014577160242,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 33,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768066514731295,
16.53029256569264,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 34,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76808030330396,
16.530272464008018,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 35,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76829016802814,
16.531005815157602,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 36,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76830720170584,
16.530997054483304,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 37,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809409187308,
16.530252363646827,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 38,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76815568462939,
16.530399306029828,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 39,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768324235382835,
16.53098829246921,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 40,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76831125036794,
16.530806343268754,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 41,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76835830363405,
16.530970769757932,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 42,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7683412699585,
16.53097953178347,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 43,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768222452326334,
16.530564330637993,
15 15
], ],
"type": "SimpleItem" "type": "SimpleItem"
...@@ -479,96 +795,177 @@ ...@@ -479,96 +795,177 @@
"TurnAroundDistance": 10, "TurnAroundDistance": 10,
"VisualTransectPoints": [ "VisualTransectPoints": [
[ [
47.76786965695791, 47.76780546458091,
16.5304471058032 16.530404628981014
],
[
47.7680176218918,
16.531145995840845
],
[
47.76803465648041,
16.53113723392403
], ],
[ [
47.767852121581285, 47.76782462170033,
16.530624995372722 16.530403289516762
], ],
[ [
47.768280070477275, 47.767843780618456,
16.531012421511814 16.530401950051516
], ],
[ [
47.76828174772784, 47.76805169016891,
16.53094964311624 16.53112847333554
], ],
[ [
47.768293889869426, 47.768068723856686,
16.530755276539708 16.531119712741326
], ],
[ [
47.7682219391165, 47.767862938637116,
16.530560469333935 16.53040061191935
], ],
[ [
47.76820508527868, 47.76788209665569,
16.5307314416142 16.53039927245214
], ],
[ [
47.76819200424394, 47.76808575754375,
16.53094084541531 16.53111095080734
], ],
[ [
47.76818883948184, 47.76810279212948,
16.531059344799864 16.53110218886764
], ],
[ [
47.76809760666698, 47.76790125467419,
16.53110626925785 16.530397934318007
], ],
[ [
47.76810225985858, 47.767920412692604,
16.5309320464106 16.530396594848835
], ],
[ [
47.76811577885341, 47.76811982671451,
16.530715631144773 16.531093428256273
], ],
[ [
47.768136979184064, 47.768136860399416,
16.530500573736578 16.53108466630512
], ],
[ [
47.7681521944103, 47.76793957161033,
16.530388084190108 16.530395256712723
], ],
[ [
47.76807542298544, 47.767958730527994,
16.53027770936353 16.53039391724158
], ],
[ [
47.76804836071953, 47.768153894983,
16.53047779455375 16.53107590568231
], ],
[ [
47.76802647332397, 47.76817092866645,
16.530699820729467 16.531067145053775
], ],
[ [
47.768012516370526, 47.76797788764677,
16.530923248770208 16.530392579103516
], ],
[ [
47.76800654291486, 47.767997046564254,
16.531146891465884 16.530391239630404
], ],
[ [
47.76792538641036, 47.7681879623492,
16.530872608510265 16.53105838308546
], ],
[ [
47.76793716779096, 47.76820499693062,
16.530684010368297 16.531049622445487
], ],
[ [
47.767956224940995, 47.768011359505685,
16.530490697489185 16.530372972324884
],
[
47.76802514809256,
16.530352870682762
],
[
47.76822203061193,
16.531040860465723
],
[
47.7682390651919,
16.53103209981431
],
[
47.768038937575305,
16.530332769030014
],
[
47.76805272615508,
16.53031266736664
],
[
47.768256098871774,
16.531023337823104
],
[
47.768273133450315,
16.531014577160242
],
[
47.768066514731295,
16.53029256569264
],
[
47.76808030330396,
16.530272464008018
],
[
47.76829016802814,
16.531005815157602
],
[
47.76830720170584,
16.530997054483304
],
[
47.76809409187308,
16.530252363646827
],
[
47.76815568462939,
16.530399306029828
],
[
47.768324235382835,
16.53098829246921
],
[
47.76831125036794,
16.530806343268754
],
[
47.76835830363405,
16.530970769757932
],
[
47.7683412699585,
16.53097953178347
],
[
47.768222452326334,
16.530564330637993
] ]
], ],
"version": 1 "version": 1
}, },
"Type": 1,
"complexItemType": "CircularSurvey", "complexItemType": "CircularSurvey",
"polygon": [ "polygon": [
[ [
...@@ -592,11 +989,7 @@ ...@@ -592,11 +989,7 @@
16.530403347547246 16.530403347547246
], ],
[ [
47.76800516387783, 47.76799814678123,
16.530513932174728
],
[
47.767998146781224,
16.530388491662848 16.530388491662848
] ]
], ],
...@@ -609,23 +1002,23 @@ ...@@ -609,23 +1002,23 @@
"AltitudeMode": 1, "AltitudeMode": 1,
"autoContinue": true, "autoContinue": true,
"command": 21, "command": 21,
"doJumpId": 27, "doJumpId": 47,
"frame": 3, "frame": 3,
"params": [ "params": [
0, 0,
0, 0,
0, 0,
null, null,
47.76794255683365, 47.76779586216649,
16.53029214577345, 16.530510396830728,
0 0
], ],
"type": "SimpleItem" "type": "SimpleItem"
} }
], ],
"plannedHomePosition": [ "plannedHomePosition": [
47.76794255683365, 47.76779586216649,
16.53029214577345, 16.530510396830728,
178 178
], ],
"vehicleType": 2, "vehicleType": 2,
......
{
"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.76794255683365,
16.53029214577345,
5
],
"type": "SimpleItem"
},
{
"DeltaAlpha": 3,
"DeltaR": 10,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.77087170283815,
"ReferencePointLong": 16.53120355954269,
"TransectMinLength": 1,
"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.76786965695791,
16.5304471058032,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767852121581285,
16.530624995372722,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768280070477275,
16.531012421511814,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76828174772784,
16.53094964311624,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768293889869426,
16.530755276539708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7682219391165,
16.530560469333935,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820508527868,
16.5307314416142,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76819200424394,
16.53094084541531,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76818883948184,
16.531059344799864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809760666698,
16.53110626925785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810225985858,
16.5309320464106,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811577885341,
16.530715631144773,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136979184064,
16.530500573736578,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7681521944103,
16.530388084190108,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807542298544,
16.53027770936353,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76804836071953,
16.53047779455375,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802647332397,
16.530699820729467,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768012516370526,
16.530923248770208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76800654291486,
16.531146891465884,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792538641036,
16.530872608510265,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76793716779096,
16.530684010368297,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767956224940995,
16.530490697489185,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76786965695791,
16.5304471058032
],
[
47.767852121581285,
16.530624995372722
],
[
47.768280070477275,
16.531012421511814
],
[
47.76828174772784,
16.53094964311624
],
[
47.768293889869426,
16.530755276539708
],
[
47.7682219391165,
16.530560469333935
],
[
47.76820508527868,
16.5307314416142
],
[
47.76819200424394,
16.53094084541531
],
[
47.76818883948184,
16.531059344799864
],
[
47.76809760666698,
16.53110626925785
],
[
47.76810225985858,
16.5309320464106
],
[
47.76811577885341,
16.530715631144773
],
[
47.768136979184064,
16.530500573736578
],
[
47.7681521944103,
16.530388084190108
],
[
47.76807542298544,
16.53027770936353
],
[
47.76804836071953,
16.53047779455375
],
[
47.76802647332397,
16.530699820729467
],
[
47.768012516370526,
16.530923248770208
],
[
47.76800654291486,
16.531146891465884
],
[
47.76792538641036,
16.530872608510265
],
[
47.76793716779096,
16.530684010368297
],
[
47.767956224940995,
16.530490697489185
]
],
"version": 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.76800516387783,
16.530513932174728
],
[
47.767998146781224,
16.530388491662848
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76794255683365,
16.53029214577345,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76794255683365,
16.53029214577345,
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.76794255683365,
16.53029214577345,
5
],
"type": "SimpleItem"
},
{
"DeltaAlpha": 3,
"DeltaR": 10,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.77087170283815,
"ReferencePointLong": 16.53120355954269,
"TransectMinLength": 1,
"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.76786965695791,
16.5304471058032,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767852121581285,
16.530624995372722,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768280070477275,
16.531012421511814,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76828174772784,
16.53094964311624,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768293889869426,
16.530755276539708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7682219391165,
16.530560469333935,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820508527868,
16.5307314416142,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76819200424394,
16.53094084541531,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76818883948184,
16.531059344799864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809760666698,
16.53110626925785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810225985858,
16.5309320464106,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811577885341,
16.530715631144773,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136979184064,
16.530500573736578,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7681521944103,
16.530388084190108,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807542298544,
16.53027770936353,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76804836071953,
16.53047779455375,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802647332397,
16.530699820729467,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768012516370526,
16.530923248770208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76800654291486,
16.531146891465884,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792538641036,
16.530872608510265,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76793716779096,
16.530684010368297,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767956224940995,
16.530490697489185,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76786965695791,
16.5304471058032
],
[
47.767852121581285,
16.530624995372722
],
[
47.768280070477275,
16.531012421511814
],
[
47.76828174772784,
16.53094964311624
],
[
47.768293889869426,
16.530755276539708
],
[
47.7682219391165,
16.530560469333935
],
[
47.76820508527868,
16.5307314416142
],
[
47.76819200424394,
16.53094084541531
],
[
47.76818883948184,
16.531059344799864
],
[
47.76809760666698,
16.53110626925785
],
[
47.76810225985858,
16.5309320464106
],
[
47.76811577885341,
16.530715631144773
],
[
47.768136979184064,
16.530500573736578
],
[
47.7681521944103,
16.530388084190108
],
[
47.76807542298544,
16.53027770936353
],
[
47.76804836071953,
16.53047779455375
],
[
47.76802647332397,
16.530699820729467
],
[
47.768012516370526,
16.530923248770208
],
[
47.76800654291486,
16.531146891465884
],
[
47.76792538641036,
16.530872608510265
],
[
47.76793716779096,
16.530684010368297
],
[
47.767956224940995,
16.530490697489185
]
],
"version": 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.76800516387783,
16.530513932174728
],
[
47.767998146781224,
16.530388491662848
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76794255683365,
16.53029214577345,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76794255683365,
16.53029214577345,
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.76794255683365,
16.53029214577345,
5
],
"type": "SimpleItem"
},
{
"DeltaAlpha": 3,
"DeltaR": 10,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.77087170283815,
"ReferencePointLong": 16.53120355954269,
"TransectMinLength": 1,
"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.76786965695791,
16.5304471058032,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767852121581285,
16.530624995372722,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768280070477275,
16.531012421511814,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76828174772784,
16.53094964311624,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768293889869426,
16.530755276539708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7682219391165,
16.530560469333935,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820508527868,
16.5307314416142,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76819200424394,
16.53094084541531,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76818883948184,
16.531059344799864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809760666698,
16.53110626925785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810225985858,
16.5309320464106,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811577885341,
16.530715631144773,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136979184064,
16.530500573736578,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7681521944103,
16.530388084190108,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807542298544,
16.53027770936353,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76804836071953,
16.53047779455375,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802647332397,
16.530699820729467,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768012516370526,
16.530923248770208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76800654291486,
16.531146891465884,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792538641036,
16.530872608510265,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76793716779096,
16.530684010368297,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767956224940995,
16.530490697489185,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76786965695791,
16.5304471058032
],
[
47.767852121581285,
16.530624995372722
],
[
47.768280070477275,
16.531012421511814
],
[
47.76828174772784,
16.53094964311624
],
[
47.768293889869426,
16.530755276539708
],
[
47.7682219391165,
16.530560469333935
],
[
47.76820508527868,
16.5307314416142
],
[
47.76819200424394,
16.53094084541531
],
[
47.76818883948184,
16.531059344799864
],
[
47.76809760666698,
16.53110626925785
],
[
47.76810225985858,
16.5309320464106
],
[
47.76811577885341,
16.530715631144773
],
[
47.768136979184064,
16.530500573736578
],
[
47.7681521944103,
16.530388084190108
],
[
47.76807542298544,
16.53027770936353
],
[
47.76804836071953,
16.53047779455375
],
[
47.76802647332397,
16.530699820729467
],
[
47.768012516370526,
16.530923248770208
],
[
47.76800654291486,
16.531146891465884
],
[
47.76792538641036,
16.530872608510265
],
[
47.76793716779096,
16.530684010368297
],
[
47.767956224940995,
16.530490697489185
]
],
"version": 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.76800516387783,
16.530513932174728
],
[
47.767998146781224,
16.530388491662848
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76794255683365,
16.53029214577345,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76794255683365,
16.53029214577345,
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.76794255683365,
16.53029214577345,
5
],
"type": "SimpleItem"
},
{
"DeltaAlpha": 3,
"DeltaR": 10,
"ReferencePointAlt": 0,
"ReferencePointLat": 47.77087170283815,
"ReferencePointLong": 16.53120355954269,
"TransectMinLength": 1,
"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.76786965695791,
16.5304471058032,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 3,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767852121581285,
16.530624995372722,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 4,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768280070477275,
16.531012421511814,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76828174772784,
16.53094964311624,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768293889869426,
16.530755276539708,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 7,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7682219391165,
16.530560469333935,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76820508527868,
16.5307314416142,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 9,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76819200424394,
16.53094084541531,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 10,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76818883948184,
16.531059344799864,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 11,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76809760666698,
16.53110626925785,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 12,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76810225985858,
16.5309320464106,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 13,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76811577885341,
16.530715631144773,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 14,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768136979184064,
16.530500573736578,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 15,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7681521944103,
16.530388084190108,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 16,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76807542298544,
16.53027770936353,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 17,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76804836071953,
16.53047779455375,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 18,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76802647332397,
16.530699820729467,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 19,
"frame": 3,
"params": [
0,
0,
0,
null,
47.768012516370526,
16.530923248770208,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 20,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76800654291486,
16.531146891465884,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 21,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76792538641036,
16.530872608510265,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 22,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76793716779096,
16.530684010368297,
15
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 23,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767956224940995,
16.530490697489185,
15
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 10,
"VisualTransectPoints": [
[
47.76786965695791,
16.5304471058032
],
[
47.767852121581285,
16.530624995372722
],
[
47.768280070477275,
16.531012421511814
],
[
47.76828174772784,
16.53094964311624
],
[
47.768293889869426,
16.530755276539708
],
[
47.7682219391165,
16.530560469333935
],
[
47.76820508527868,
16.5307314416142
],
[
47.76819200424394,
16.53094084541531
],
[
47.76818883948184,
16.531059344799864
],
[
47.76809760666698,
16.53110626925785
],
[
47.76810225985858,
16.5309320464106
],
[
47.76811577885341,
16.530715631144773
],
[
47.768136979184064,
16.530500573736578
],
[
47.7681521944103,
16.530388084190108
],
[
47.76807542298544,
16.53027770936353
],
[
47.76804836071953,
16.53047779455375
],
[
47.76802647332397,
16.530699820729467
],
[
47.768012516370526,
16.530923248770208
],
[
47.76800654291486,
16.531146891465884
],
[
47.76792538641036,
16.530872608510265
],
[
47.76793716779096,
16.530684010368297
],
[
47.767956224940995,
16.530490697489185
]
],
"version": 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.76800516387783,
16.530513932174728
],
[
47.767998146781224,
16.530388491662848
]
],
"type": "ComplexItem",
"version": 1
},
{
"AMSLAltAboveTerrain": null,
"Altitude": 0,
"AltitudeMode": 1,
"autoContinue": true,
"command": 21,
"doJumpId": 27,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76794255683365,
16.53029214577345,
0
],
"type": "SimpleItem"
}
],
"plannedHomePosition": [
47.76794255683365,
16.53029214577345,
178
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
...@@ -29,6 +29,7 @@ DebugBuild { ...@@ -29,6 +29,7 @@ DebugBuild {
DESTDIR = $${OUT_PWD}/debug DESTDIR = $${OUT_PWD}/debug
DEFINES += DEBUG DEFINES += DEBUG
DEFINES += SNAKE_SHOW_TIME DEFINES += SNAKE_SHOW_TIME
DEFINES += DEBUG_SRTL
#DEFINES += SNAKE_DEBUG #DEFINES += SNAKE_DEBUG
DEFINES += SHOW_CIRCULAR_SURVEY_TIME DEFINES += SHOW_CIRCULAR_SURVEY_TIME
DEFINES += DEBUG_CIRCULAR_SURVEY DEFINES += DEBUG_CIRCULAR_SURVEY
...@@ -37,7 +38,9 @@ DebugBuild { ...@@ -37,7 +38,9 @@ DebugBuild {
else { else {
DESTDIR = $${OUT_PWD}/release DESTDIR = $${OUT_PWD}/release
#DEFINES += ROS_BRIDGE_DEBUG #DEFINES += ROS_BRIDGE_DEBUG
DEFINES += SNAKE_SHOW_TIME #DEFINES += SHOW_CIRCULAR_SURVEY_TIME
#DEFINES += SNAKE_SHOW_TIME
DEFINES += DEBUG_SRTL
DEFINES += NDEBUG DEFINES += NDEBUG
} }
...@@ -66,9 +69,9 @@ WindowsBuild { ...@@ -66,9 +69,9 @@ WindowsBuild {
# Branding # Branding
# #
QGC_APP_NAME = "QGroundControl" QGC_APP_NAME = "QGCWima"
QGC_ORG_NAME = "QGroundControl.org" QGC_ORG_NAME = "QGCWima.org"
QGC_ORG_DOMAIN = "org.qgroundcontrol" QGC_ORG_DOMAIN = "org.qgcwima"
QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl dev team" QGC_APP_DESCRIPTION = "Open source ground control app provided by QGroundControl dev team"
QGC_APP_COPYRIGHT = "Copyright (C) 2017 QGroundControl Development Team. All rights reserved." QGC_APP_COPYRIGHT = "Copyright (C) 2017 QGroundControl Development Team. All rights reserved."
...@@ -317,9 +320,9 @@ CustomBuild { ...@@ -317,9 +320,9 @@ CustomBuild {
RESOURCES += $$PWD/qgcresources.qrc RESOURCES += $$PWD/qgcresources.qrc
} }
} else { } else {
DEFINES += QGC_APPLICATION_NAME=\"\\\"QGroundControl\\\"\" DEFINES += QGC_APPLICATION_NAME=\"\\\"QGCWima\\\"\"
DEFINES += QGC_ORG_NAME=\"\\\"QGroundControl.org\\\"\" DEFINES += QGC_ORG_NAME=\"\\\"QGCWima.org\\\"\"
DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgroundcontrol\\\"\" DEFINES += QGC_ORG_DOMAIN=\"\\\"org.qgcwima\\\"\"
RESOURCES += \ RESOURCES += \
$$PWD/qgroundcontrol.qrc \ $$PWD/qgroundcontrol.qrc \
$$PWD/qgcresources.qrc $$PWD/qgcresources.qrc
...@@ -413,9 +416,9 @@ FORMS += \ ...@@ -413,9 +416,9 @@ FORMS += \
# #
HEADERS += \ HEADERS += \
src/Wima/CSWorker.h \
src/Wima/CircularSurvey.h \ src/Wima/CircularSurvey.h \
src/Wima/Geometry/GenericCircle.h \ src/Wima/Geometry/GenericCircle.h \
src/Wima/RoutingThread.h \
src/Wima/Snake/clipper/clipper.hpp \ src/Wima/Snake/clipper/clipper.hpp \
src/Wima/Snake/mapbox/feature.hpp \ src/Wima/Snake/mapbox/feature.hpp \
src/Wima/Snake/mapbox/geometry.hpp \ src/Wima/Snake/mapbox/geometry.hpp \
...@@ -503,8 +506,8 @@ HEADERS += \ ...@@ -503,8 +506,8 @@ HEADERS += \
src/comm/ros_bridge/include/topic_subscriber.h \ src/comm/ros_bridge/include/topic_subscriber.h \
src/comm/utilities.h src/comm/utilities.h
SOURCES += \ SOURCES += \
src/Wima/CSWorker.cpp \
src/Wima/CircularSurvey.cc \ src/Wima/CircularSurvey.cc \
src/Wima/RoutingThread.cpp \
src/Wima/Snake/clipper/clipper.cpp \ src/Wima/Snake/clipper/clipper.cpp \
src/Wima/Snake/snake.cpp \ src/Wima/Snake/snake.cpp \
src/Wima/Geometry/GeoPoint3D.cpp \ src/Wima/Geometry/GeoPoint3D.cpp \
......
...@@ -231,6 +231,7 @@ ...@@ -231,6 +231,7 @@
<file alias="QGroundControl/FlightDisplay/FlightDisplayWimaMenu.qml">src/FlightDisplay/FlightDisplayWimaMenu.qml</file> <file alias="QGroundControl/FlightDisplay/FlightDisplayWimaMenu.qml">src/FlightDisplay/FlightDisplayWimaMenu.qml</file>
<file alias="QGroundControl/Controls/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file> <file alias="QGroundControl/Controls/CircularSurveyMapVisual.qml">src/WimaView/CircularSurveyMapVisual.qml</file>
<file alias="QGroundControl/FlightDisplay/SmallValue.qml">src/FlightDisplay/SmallValue.qml</file> <file alias="QGroundControl/FlightDisplay/SmallValue.qml">src/FlightDisplay/SmallValue.qml</file>
<file alias="QGroundControl/Controls/ProgressIndicator.qml">src/WimaView/ProgressIndicator.qml</file>
</qresource> </qresource>
<qresource prefix="/json"> <qresource prefix="/json">
<file alias="APMMavlinkStreamRate.SettingsGroup.json">src/Settings/APMMavlinkStreamRate.SettingsGroup.json</file> <file alias="APMMavlinkStreamRate.SettingsGroup.json">src/Settings/APMMavlinkStreamRate.SettingsGroup.json</file>
......
...@@ -247,22 +247,20 @@ FlightMap { ...@@ -247,22 +247,20 @@ FlightMap {
&& wimaController.enableSnake.value && wimaController.enableSnake.value
model: _enable ? wimaController.snakeTileCenterPoints : 0 model: _enable ? wimaController.snakeTileCenterPoints : 0
delegate: MapCircle{ delegate: ProgressIndicator{
center: modelData coordinate: modelData
border.color: "transparent" currentValue: getProgress()
border.width: 1 width: 10
color: getColor(wimaController.nemoProgress[index]) height: 10
radius: 0.6
opacity: 1
z: 1 z: 1
function getColor(progress) { function getProgress() {
if (progress < 50) var progress = wimaController.nemoProgress[index]
return "red" if (progress < 0)
if (progress < 100) progress = 0
return "orange" if (progress > 100)
progress = 100
return "green" return progress
} }
} }
} }
......
...@@ -100,5 +100,6 @@ CircularSurveyMapVisual 1.0 CircularSurveyMapVisual.qml ...@@ -100,5 +100,6 @@ CircularSurveyMapVisual 1.0 CircularSurveyMapVisual.qml
DragCoordinate 1.0 DragCoordinate.qml DragCoordinate 1.0 DragCoordinate.qml
CoordinateIndicator 1.0 CoordinateIndicator.qml CoordinateIndicator 1.0 CoordinateIndicator.qml
CoordinateIndicatorDrag 1.0 CoordinateIndicatorDrag.qml CoordinateIndicatorDrag 1.0 CoordinateIndicatorDrag.qml
ProgressIndicator 1.0 ProgressIndicator.qml
...@@ -7,85 +7,90 @@ ...@@ -7,85 +7,90 @@
* *
****************************************************************************/ ****************************************************************************/
#ifndef QmlObjectListModel_H #ifndef QmlObjectListModel_H
#define QmlObjectListModel_H #define QmlObjectListModel_H
#include <QAbstractListModel> #include <QAbstractListModel>
class QmlObjectListModel : public QAbstractListModel class QmlObjectListModel : public QAbstractListModel {
{ Q_OBJECT
Q_OBJECT
public: public:
QmlObjectListModel(QObject* parent = NULL); QmlObjectListModel(QObject *parent = NULL);
~QmlObjectListModel(); ~QmlObjectListModel();
Q_PROPERTY(int count READ count NOTIFY countChanged) Q_PROPERTY(int count READ count NOTIFY countChanged)
/// Returns true if any of the items in the list are dirty. Requires each object to have /// Returns true if any of the items in the list are dirty. Requires each
/// a dirty property and dirtyChanged signal. /// object to have a dirty property and dirtyChanged signal.
Q_PROPERTY(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged) Q_PROPERTY(bool dirty READ dirty WRITE setDirty NOTIFY dirtyChanged)
Q_INVOKABLE QObject* get(int index) { return _objectList[index]; } Q_INVOKABLE QObject *get(int index) { return _objectList[index]; }
Q_INVOKABLE const QObject *get(int index) const { return _objectList[index]; }
// Property accessors
// Property accessors
int count () const;
bool dirty () const { return _dirty; } int count() const;
void setDirty (bool dirty); bool dirty() const { return _dirty; }
void append (QObject* object); void setDirty(bool dirty);
void append (QList<QObject*> objects); void append(QObject *object);
QObjectList swapObjectList (const QObjectList& newlist); void append(QList<QObject *> objects);
void clear (); QObjectList swapObjectList(const QObjectList &newlist);
QObject* removeAt (int i); void clear();
QObject* removeOne (QObject* object) { return removeAt(indexOf(object)); } QObject *removeAt(int i);
void insert (int i, QObject* object); QObject *removeOne(QObject *object) { return removeAt(indexOf(object)); }
void insert (int i, QList<QObject*> objects); void insert(int i, QObject *object);
bool contains (QObject* object) { return _objectList.indexOf(object) != -1; } void insert(int i, QList<QObject *> objects);
int indexOf (QObject* object) { return _objectList.indexOf(object); } bool contains(QObject *object) { return _objectList.indexOf(object) != -1; }
int indexOf(QObject *object) { return _objectList.indexOf(object); }
QObject* operator[] (int i);
const QObject* operator[] (int i) const; QObject *operator[](int i);
template<class T> T value (int index) const { return qobject_cast<T>(_objectList[index]); } const QObject *operator[](int i) const;
QList<QObject*>* objectList () { return &_objectList; } template <class T> T value(int index) const {
return qobject_cast<T>(_objectList[index]);
/// Calls deleteLater on all items and this itself. }
void deleteListAndContents (); QList<QObject *> *objectList() { return &_objectList; }
/// Clears the list and calls deleteLater on each entry /// Calls deleteLater on all items and this itself.
void clearAndDeleteContents (); void deleteListAndContents();
void beginReset () { beginResetModel(); } /// Clears the list and calls deleteLater on each entry
void endReset () { endResetModel(); } void clearAndDeleteContents();
// Friends void beginReset() { beginResetModel(); }
friend void swap(QmlObjectListModel& list1, QmlObjectListModel& list2); void endReset() { endResetModel(); }
// Friends
friend void swap(QmlObjectListModel &list1, QmlObjectListModel &list2);
signals: signals:
void countChanged (int count); void countChanged(int count);
void dirtyChanged (bool dirtyChanged); void dirtyChanged(bool dirtyChanged);
private slots: private slots:
void _childDirtyChanged (bool dirty); void _childDirtyChanged(bool dirty);
private: private:
// Overrides from QAbstractListModel // Overrides from QAbstractListModel
int rowCount (const QModelIndex & parent = QModelIndex()) const override; int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data (const QModelIndex & index, int role = Qt::DisplayRole) const override; QVariant data(const QModelIndex &index,
bool insertRows (int position, int rows, const QModelIndex &index = QModelIndex()) override; int role = Qt::DisplayRole) const override;
bool removeRows (int position, int rows, const QModelIndex &index = QModelIndex()) override; bool insertRows(int position, int rows,
bool setData (const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; const QModelIndex &index = QModelIndex()) override;
QHash<int, QByteArray> roleNames(void) const override; bool removeRows(int position, int rows,
const QModelIndex &index = QModelIndex()) override;
bool setData(const QModelIndex &index, const QVariant &value,
int role = Qt::EditRole) override;
QHash<int, QByteArray> roleNames(void) const override;
private: private:
QList<QObject*> _objectList; QList<QObject *> _objectList;
bool _dirty; bool _dirty;
bool _skipDirtyFirstItem; bool _skipDirtyFirstItem;
static const int ObjectRole; static const int ObjectRole;
static const int TextRole; static const int TextRole;
}; };
#endif #endif
#include "CircularSurvey.h" #include "CircularSurvey.h"
#include "CSWorker.h" #include "RoutingThread.h"
// QGC // QGC
#include "JsonHelper.h" #include "JsonHelper.h"
#include "QGCApplication.h" #include "QGCApplication.h"
...@@ -60,7 +60,7 @@ CircularSurvey::CircularSurvey(Vehicle *vehicle, bool flyView, ...@@ -60,7 +60,7 @@ CircularSurvey::CircularSurvey(Vehicle *vehicle, bool flyView,
_alpha(settingsGroup, _metaDataMap[alphaName]), _alpha(settingsGroup, _metaDataMap[alphaName]),
_minLength(settingsGroup, _metaDataMap[minLengthName]), _minLength(settingsGroup, _metaDataMap[minLengthName]),
_type(settingsGroup, _metaDataMap[typeName]), _type(settingsGroup, _metaDataMap[typeName]),
_pWorker(std::make_unique<RoutingWorker>()), _needsStoring(false), _pWorker(std::make_unique<RoutingThread>()), _needsStoring(false),
_needsReversal(false), _hidePolygon(false) { _needsReversal(false), _hidePolygon(false) {
Q_UNUSED(kmlOrShpFile) Q_UNUSED(kmlOrShpFile)
_editorQml = "qrc:/qml/CircularSurveyItemEditor.qml"; _editorQml = "qrc:/qml/CircularSurveyItemEditor.qml";
...@@ -81,9 +81,9 @@ CircularSurvey::CircularSurvey(Vehicle *vehicle, bool flyView, ...@@ -81,9 +81,9 @@ CircularSurvey::CircularSurvey(Vehicle *vehicle, bool flyView,
connect(&this->_type, &Fact::rawValueChanged, this, connect(&this->_type, &Fact::rawValueChanged, this,
&CircularSurvey::_rebuildTransects); &CircularSurvey::_rebuildTransects);
// Connect worker. // Connect worker.
connect(this->_pWorker.get(), &RoutingWorker::result, this, connect(this->_pWorker.get(), &RoutingThread::result, this,
&CircularSurvey::_setTransects); &CircularSurvey::_setTransects);
connect(this->_pWorker.get(), &RoutingWorker::calculatingChanged, this, connect(this->_pWorker.get(), &RoutingThread::calculatingChanged, this,
&CircularSurvey::calculatingChanged); &CircularSurvey::calculatingChanged);
this->_transectsDirty = false; this->_transectsDirty = false;
} }
...@@ -287,7 +287,7 @@ void CircularSurvey::_appendLoadedMissionItems(QList<MissionItem *> &items, ...@@ -287,7 +287,7 @@ void CircularSurvey::_appendLoadedMissionItems(QList<MissionItem *> &items,
void CircularSurvey::_buildAndAppendMissionItems(QList<MissionItem *> &items, void CircularSurvey::_buildAndAppendMissionItems(QList<MissionItem *> &items,
QObject *missionItemParent) { QObject *missionItemParent) {
if (_transectsDirty) if (_transectsDirty || _transects.count() == 0)
return; return;
MissionItem *item; MissionItem *item;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "SettingsFact.h" #include "SettingsFact.h"
#include "TransectStyleComplexItem.h" #include "TransectStyleComplexItem.h"
class RoutingWorker; class RoutingThread;
class RoutingData; class RoutingData;
class CircularSurvey : public TransectStyleComplexItem { class CircularSurvey : public TransectStyleComplexItem {
...@@ -119,7 +119,7 @@ private: ...@@ -119,7 +119,7 @@ private:
SettingsFact _type; SettingsFact _type;
// Worker // Worker
using PtrWorker = std::shared_ptr<RoutingWorker>; using PtrWorker = std::shared_ptr<RoutingThread>;
PtrWorker _pWorker; PtrWorker _pWorker;
PtrRoutingData _workerOutput; PtrRoutingData _workerOutput;
QList<QList<QGeoCoordinate>> _rawTransects; QList<QList<QGeoCoordinate>> _rawTransects;
......
#include "CSWorker.h" #include "RoutingThread.h"
// std // std
#include <chrono> #include <chrono>
// Qt // Qt
#include <QDebug> #include <QDebug>
RoutingWorker::RoutingWorker(QObject *parent) RoutingThread::RoutingThread(QObject *parent)
: QThread(parent), _calculating(false), _stop(false), _restart(false) { : QThread(parent), _calculating(false), _stop(false), _restart(false) {
static std::once_flag flag; static std::once_flag flag;
...@@ -12,7 +12,7 @@ RoutingWorker::RoutingWorker(QObject *parent) ...@@ -12,7 +12,7 @@ RoutingWorker::RoutingWorker(QObject *parent)
[] { qRegisterMetaType<PtrRoutingData>("PtrRoutingData"); }); [] { qRegisterMetaType<PtrRoutingData>("PtrRoutingData"); });
} }
RoutingWorker::~RoutingWorker() { RoutingThread::~RoutingThread() {
this->_stop = true; this->_stop = true;
Lock lk(this->_mutex); Lock lk(this->_mutex);
this->_restart = true; this->_restart = true;
...@@ -21,10 +21,10 @@ RoutingWorker::~RoutingWorker() { ...@@ -21,10 +21,10 @@ RoutingWorker::~RoutingWorker() {
this->wait(); this->wait();
} }
bool RoutingWorker::calculating() { return this->_calculating; } bool RoutingThread::calculating() { return this->_calculating; }
void RoutingWorker::route(const snake::BoostPolygon &safeArea, void RoutingThread::route(const snake::BoostPolygon &safeArea,
const RoutingWorker::Generator &generator) { const RoutingThread::Generator &generator) {
// Sample input. // Sample input.
Lock lk(this->_mutex); Lock lk(this->_mutex);
this->_safeArea = safeArea; this->_safeArea = safeArea;
...@@ -40,7 +40,7 @@ void RoutingWorker::route(const snake::BoostPolygon &safeArea, ...@@ -40,7 +40,7 @@ void RoutingWorker::route(const snake::BoostPolygon &safeArea,
} }
} }
void RoutingWorker::run() { void RoutingThread::run() {
qWarning() << "RoutingWorker::run(): thread start."; qWarning() << "RoutingWorker::run(): thread start.";
while (!this->_stop) { while (!this->_stop) {
#ifdef DEBUG_CIRCULAR_SURVEY #ifdef DEBUG_CIRCULAR_SURVEY
......
...@@ -20,7 +20,7 @@ struct RoutingData { ...@@ -20,7 +20,7 @@ struct RoutingData {
//! \brief The CSWorker class //! \brief The CSWorker class
//! \note Don't call QThread::start, QThread::quit, etc. onyl use Worker //! \note Don't call QThread::start, QThread::quit, etc. onyl use Worker
//! members! //! members!
class RoutingWorker : public QThread { class RoutingThread : public QThread {
Q_OBJECT Q_OBJECT
using Lock = std::unique_lock<std::mutex>; using Lock = std::unique_lock<std::mutex>;
...@@ -28,8 +28,8 @@ public: ...@@ -28,8 +28,8 @@ public:
using PtrRoutingData = QSharedPointer<RoutingData>; using PtrRoutingData = QSharedPointer<RoutingData>;
using Generator = std::function<bool(snake::Transects &)>; using Generator = std::function<bool(snake::Transects &)>;
RoutingWorker(QObject *parent = nullptr); RoutingThread(QObject *parent = nullptr);
~RoutingWorker() override; ~RoutingThread() override;
bool calculating(); bool calculating();
......
...@@ -326,7 +326,7 @@ bool dijkstraAlgorithm( ...@@ -326,7 +326,7 @@ bool dijkstraAlgorithm(
return true; return true;
} }
void toDistanceMatrix(Matrix<double> &graph) { bool toDistanceMatrix(Matrix<double> &graph) {
size_t n = graph.getN(); size_t n = graph.getN();
auto distance = [graph](size_t i, size_t j) { return graph.get(i, j); }; auto distance = [graph](size_t i, size_t j) { return graph.get(i, j); };
...@@ -338,9 +338,9 @@ void toDistanceMatrix(Matrix<double> &graph) { ...@@ -338,9 +338,9 @@ void toDistanceMatrix(Matrix<double> &graph) {
if (!std::isinf(d)) if (!std::isinf(d))
continue; continue;
path.clear(); path.clear();
bool ret = dijkstraAlgorithm(n, i, j, path, distance); if (!dijkstraAlgorithm(n, i, j, path, distance)) {
assert(ret); return false;
(void)ret; }
// cout << "(" << i << "," << j << ") d: " << d << endl; // cout << "(" << i << "," << j << ") d: " << d << endl;
// cout << "Path size: " << path.size() << endl; // cout << "Path size: " << path.size() << endl;
// for (auto idx : path) // for (auto idx : path)
...@@ -360,6 +360,7 @@ void toDistanceMatrix(Matrix<double> &graph) { ...@@ -360,6 +360,7 @@ void toDistanceMatrix(Matrix<double> &graph) {
graph.set(j, i, d); graph.set(j, i, d);
} }
} }
return true;
} }
void shortestPathFromGraph(const Matrix<double> &graph, size_t startIndex, void shortestPathFromGraph(const Matrix<double> &graph, size_t startIndex,
...@@ -740,7 +741,7 @@ struct RoutingDataModel { ...@@ -740,7 +741,7 @@ struct RoutingDataModel {
RoutingIndexManager::NodeIndex depot; RoutingIndexManager::NodeIndex depot;
}; };
void generateRoutingModel(const BoostLineString &vertices, bool generateRoutingModel(const BoostLineString &vertices,
const BoostPolygon &polygonOffset, size_t n0, const BoostPolygon &polygonOffset, size_t n0,
RoutingDataModel &dataModel, Matrix<double> &graph) { RoutingDataModel &dataModel, Matrix<double> &graph) {
...@@ -758,7 +759,9 @@ void generateRoutingModel(const BoostLineString &vertices, ...@@ -758,7 +759,9 @@ void generateRoutingModel(const BoostLineString &vertices,
#ifdef SNAKE_SHOW_TIME #ifdef SNAKE_SHOW_TIME
start = std::chrono::high_resolution_clock::now(); start = std::chrono::high_resolution_clock::now();
#endif #endif
toDistanceMatrix(distanceMatrix); if (!toDistanceMatrix(distanceMatrix)) {
return false;
}
#ifdef SNAKE_SHOW_TIME #ifdef SNAKE_SHOW_TIME
delta = std::chrono::duration_cast<std::chrono::milliseconds>( delta = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start); std::chrono::high_resolution_clock::now() - start);
...@@ -778,6 +781,7 @@ void generateRoutingModel(const BoostLineString &vertices, ...@@ -778,6 +781,7 @@ void generateRoutingModel(const BoostLineString &vertices,
} }
dataModel.numVehicles = 1; dataModel.numVehicles = 1;
dataModel.depot = 0; dataModel.depot = 0;
return true;
} }
bool route(const BoostPolygon &area, const Transects &transects, bool route(const BoostPolygon &area, const Transects &transects,
...@@ -836,7 +840,11 @@ bool route(const BoostPolygon &area, const Transects &transects, ...@@ -836,7 +840,11 @@ bool route(const BoostPolygon &area, const Transects &transects,
#ifdef SNAKE_SHOW_TIME #ifdef SNAKE_SHOW_TIME
auto start = std::chrono::high_resolution_clock::now(); auto start = std::chrono::high_resolution_clock::now();
#endif #endif
generateRoutingModel(vertices, areaOffset, n0, dataModel, connectionGraph); if (!generateRoutingModel(vertices, areaOffset, n0, dataModel,
connectionGraph)) {
errorString = "Routing model generation failed.";
return false;
}
#ifdef SNAKE_SHOW_TIME #ifdef SNAKE_SHOW_TIME
auto delta = std::chrono::duration_cast<std::chrono::milliseconds>( auto delta = std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::high_resolution_clock::now() - start); std::chrono::high_resolution_clock::now() - start);
......
...@@ -149,7 +149,7 @@ void offsetPolygon(const BoostPolygon &polygon, BoostPolygon &polygonOffset, ...@@ -149,7 +149,7 @@ void offsetPolygon(const BoostPolygon &polygon, BoostPolygon &polygonOffset,
double offset); double offset);
void graphFromPolygon(const BoostPolygon &polygon, void graphFromPolygon(const BoostPolygon &polygon,
const BoostLineString &vertices, Matrix<double> &graph); const BoostLineString &vertices, Matrix<double> &graph);
void toDistanceMatrix(Matrix<double> &graph); bool toDistanceMatrix(Matrix<double> &graph);
bool dijkstraAlgorithm( bool dijkstraAlgorithm(
const size_t numElements, size_t startIndex, size_t endIndex, const size_t numElements, size_t startIndex, size_t endIndex,
std::vector<size_t> &elementPath, std::vector<size_t> &elementPath,
......
...@@ -5,242 +5,215 @@ ...@@ -5,242 +5,215 @@
#include "MissionSettingsItem.h" #include "MissionSettingsItem.h"
#include "SimpleMissionItem.h" #include "SimpleMissionItem.h"
WaypointManager::RTLManager::RTLManager(Settings &settings, WaypointManager::RTLManager::RTLManager(Settings &settings,
AreaInterface &interface) AreaInterface &interface)
: ManagerBase(settings) : ManagerBase(settings), _areaInterface(&interface) {}
, _areaInterface(&interface)
{
}
void WaypointManager::RTLManager::setWaypoints(const QVector<QGeoCoordinate> &waypoints) void WaypointManager::RTLManager::setWaypoints(
{ const QVector<QGeoCoordinate> &waypoints) {
(void)waypoints; (void)waypoints;
return; return;
} }
void WaypointManager::RTLManager::push_back(const QGeoCoordinate &wp) void WaypointManager::RTLManager::push_back(const QGeoCoordinate &wp) {
{ (void)wp;
(void)wp; return;
return;
} }
void WaypointManager::RTLManager::push_front(const QGeoCoordinate &wp) void WaypointManager::RTLManager::push_front(const QGeoCoordinate &wp) {
{ (void)wp;
(void)wp; return;
return;
} }
void WaypointManager::RTLManager::clear() void WaypointManager::RTLManager::clear() {
{ _dirty = true;
_dirty = true; _waypoints.clear();
_waypoints.clear(); _currentWaypoints.clear();
_currentWaypoints.clear(); _missionItems.clearAndDeleteContents();
_missionItems.clearAndDeleteContents(); _currentMissionItems.clearAndDeleteContents();
_currentMissionItems.clearAndDeleteContents(); _waypointsVariant.clear();
_waypointsVariant.clear(); _currentWaypointsVariant.clear();
_currentWaypointsVariant.clear();
} }
void WaypointManager::RTLManager::insert(std::size_t i, const QGeoCoordinate &wp) void WaypointManager::RTLManager::insert(std::size_t i,
{ const QGeoCoordinate &wp) {
(void)i; (void)i;
(void)wp; (void)wp;
return; return;
} }
std::size_t WaypointManager::RTLManager::size() const std::size_t WaypointManager::RTLManager::size() const { return 0; }
{
return 0;
}
void WaypointManager::RTLManager::remove(std::size_t i) void WaypointManager::RTLManager::remove(std::size_t i) { (void)i; }
{
(void)i;
}
bool WaypointManager::RTLManager::update() bool WaypointManager::RTLManager::update() {
{ this->clear();
this->clear(); return _worker();
return _worker();
} }
bool WaypointManager::RTLManager::next() bool WaypointManager::RTLManager::next() { return true; }
{
return true;
}
bool WaypointManager::RTLManager::previous() bool WaypointManager::RTLManager::previous() { return true; }
{
return true;
}
bool WaypointManager::RTLManager::reset() bool WaypointManager::RTLManager::reset() { return true; }
{
return true;
}
bool WaypointManager::RTLManager::checkPrecondition(QString &errorString) bool WaypointManager::RTLManager::checkPrecondition(QString &errorString) {
{ // Be aware of the error message order!
// Be aware of the error message order! Vehicle *managerVehicle = _settings->masterController()->managerVehicle();
Vehicle *managerVehicle = _settings->masterController()->managerVehicle();
if ( managerVehicle->isOfflineEditingVehicle() ) { if (managerVehicle->isOfflineEditingVehicle()) {
errorString.append("No vehicle connected. Smart RTL not available."); errorString.append("No vehicle connected. Smart RTL not available.");
return false; return false;
} }
if ( !managerVehicle->flying() ) { if (!managerVehicle->flying()) {
errorString.append("Vehicle is not flying. Smart RTL not available."); errorString.append("Vehicle is not flying. Smart RTL not available.");
return false; return false;
} }
if ( !_areaInterface->joinedArea()->containsCoordinate( if (!_areaInterface->joinedArea()->containsCoordinate(
managerVehicle->coordinate()) ) { managerVehicle->coordinate())) {
errorString.append("Vehicle not inside save area. Smart RTL not available."); errorString.append(
return false; "Vehicle not inside save area. Smart RTL not available.");
} return false;
}
return true; return true;
} }
bool WaypointManager::RTLManager::_insertMissionItem(const QGeoCoordinate &c, bool WaypointManager::RTLManager::_insertMissionItem(const QGeoCoordinate &c,
size_t index, size_t index,
QmlObjectListModel &list, QmlObjectListModel &list,
bool doUpdate) bool doUpdate) {
{ using namespace WaypointManager::Utils;
using namespace WaypointManager::Utils;
if (!insertMissionItem(c, index /*insertion index*/, list,
if ( !insertMissionItem(c, _settings->vehicle(), _settings->isFlyView(),
index /*insertion index*/, &list /*parent*/, doUpdate /*do update*/)) {
list, qWarning("WaypointManager::RTLManager::next(): insertMissionItem failed.");
_settings->vehicle(), Q_ASSERT(false);
_settings->isFlyView(), return false;
&list /*parent*/, }
doUpdate /*do update*/) ) return true;
{
qWarning("WaypointManager::RTLManager::next(): insertMissionItem failed.");
Q_ASSERT(false);
return false;
}
return true;
} }
bool WaypointManager::RTLManager::_insertMissionItem(const QGeoCoordinate &c, bool WaypointManager::RTLManager::_insertMissionItem(const QGeoCoordinate &c,
size_t index, size_t index,
bool doUpdate) bool doUpdate) {
{ return _insertMissionItem(c, index, _currentMissionItems, doUpdate);
return _insertMissionItem(c, index, _currentMissionItems, doUpdate);
} }
bool WaypointManager::RTLManager::_calcShortestPath( bool WaypointManager::RTLManager::_calcShortestPath(
const QGeoCoordinate &start, const QGeoCoordinate &start, const QGeoCoordinate &destination,
const QGeoCoordinate &destination, QVector<QGeoCoordinate> &path) {
QVector<QGeoCoordinate> &path) using namespace GeoUtilities;
{ using namespace PolygonCalculus;
using namespace GeoUtilities; QPolygonF joinedArea2D;
using namespace PolygonCalculus; toCartesianList(_areaInterface->joinedArea()->coordinateList(),
QPolygonF joinedArea2D; /*origin*/ start, joinedArea2D);
toCartesianList(_areaInterface->joinedArea()->coordinateList(), /*origin*/ start, joinedArea2D); QPointF start2D(0, 0);
QPointF start2D(0,0); QPointF end2D;
QPointF end2D; toCartesian(destination, start, end2D);
toCartesian(destination, start, end2D); QVector<QPointF> path2DOut;
QVector<QPointF> path2DOut;
bool retVal =
bool retVal = PolygonCalculus::shortestPath(joinedArea2D, start2D, end2D, path2DOut); PolygonCalculus::shortestPath(joinedArea2D, start2D, end2D, path2DOut);
toGeoList(path2DOut, /*origin*/ start, path); toGeoList(path2DOut, /*origin*/ start, path);
return retVal; return retVal;
} }
bool WaypointManager::RTLManager::_worker() bool WaypointManager::RTLManager::_worker() {
{ // Precondition: settings must be valid.
// Precondition: settings must be valid.
using namespace WaypointManager::Utils;
using namespace WaypointManager::Utils;
if (!_settings->valid()) {
if (!_settings->valid()) { return false;
return false; }
}
_currentMissionItems.clearAndDeleteContents();
initialize(_currentMissionItems, _settings->vehicle(), _settings->isFlyView()); initialize(_currentMissionItems, _settings->vehicle(),
_settings->isFlyView());
// Calculate path from vehicle to home position.
QVector<QGeoCoordinate> returnPath; // Calculate path from vehicle to home position.
auto vehicleCoordinate = _settings->masterController()->managerVehicle()->coordinate(); QVector<QGeoCoordinate> returnPath;
if ( !_calcShortestPath(vehicleCoordinate, _settings->homePosition(), returnPath) ) { auto vehicleCoordinate =
qWarning("WaypointManager::RTLManager::next(): Not able to calc path from vehicle to home position."); _settings->masterController()->managerVehicle()->coordinate();
return false; if (!_calcShortestPath(vehicleCoordinate, _settings->homePosition(),
} returnPath)) {
qWarning("WaypointManager::RTLManager::next(): Not able to calc path from "
// Create mission items. "vehicle to home position.");
// Set home position of MissionSettingsItem. return false;
MissionSettingsItem* settingsItem = _currentMissionItems.value<MissionSettingsItem *>(0); }
if (settingsItem == nullptr) {
Q_ASSERT(false); // Create mission items.
qWarning("WaypointManager::RTLManager::next(): nullptr."); // Set home position of MissionSettingsItem.
return false; MissionSettingsItem *settingsItem =
} _currentMissionItems.value<MissionSettingsItem *>(0);
settingsItem->setCoordinate(_settings->homePosition()); if (settingsItem == nullptr) {
Q_ASSERT(false);
// Create change speed item. qWarning("WaypointManager::RTLManager::next(): nullptr.");
_insertMissionItem(_settings->homePosition(), return false;
_currentMissionItems.count() /*insertion index*/, }
settingsItem->setCoordinate(vehicleCoordinate);
// Create change speed item.
int index = _currentMissionItems.count();
_insertMissionItem(vehicleCoordinate, index /*insertion index*/,
false /*do update*/);
SimpleMissionItem *speedItem =
_currentMissionItems.value<SimpleMissionItem *>(index);
if (speedItem == nullptr) {
qWarning("WaypointManager::RTLManager::next(): nullptr.");
Q_ASSERT(speedItem != nullptr);
return false;
}
makeSpeedCmd(speedItem, _settings->arrivalReturnSpeed());
// Insert return path coordinates.
for (auto coordinate : returnPath) {
index = _currentMissionItems.count();
_insertMissionItem(coordinate, index /*insertion index*/,
false /*do update*/); false /*do update*/);
SimpleMissionItem *speedItem = _currentMissionItems.value<SimpleMissionItem*>(2); }
if (speedItem == nullptr) { // Set land command for last mission item.
qWarning("WaypointManager::RTLManager::next(): nullptr."); index = _currentMissionItems.count();
Q_ASSERT(speedItem != nullptr); _insertMissionItem(_settings->homePosition(), index /*insertion index*/,
return false; false /*do update*/);
SimpleMissionItem *landItem =
_currentMissionItems.value<SimpleMissionItem *>(index);
if (landItem == nullptr) {
Q_ASSERT(false);
qWarning("WaypointManager::RTLManager::next(): nullptr.");
return false;
}
makeLandCmd(landItem, _settings->masterController()->managerVehicle());
// Set altitude.
for (int i = 1; i < _currentMissionItems.count(); ++i) {
SimpleMissionItem *item =
_currentMissionItems.value<SimpleMissionItem *>(i);
if (item == nullptr) {
Q_ASSERT(false);
qWarning("WimaController::updateAltitude(): nullptr");
return false;
} }
makeSpeedCmd(speedItem, _settings->arrivalReturnSpeed()); item->altitude()->setRawValue(_settings->altitude());
}
// Insert return path coordinates.
for (auto coordinate : returnPath) {
_insertMissionItem(coordinate,
_currentMissionItems.count() /*insertion index*/,
false /*do update*/);
}
// Set land command for last mission item.
int index = _currentMissionItems.count();
_insertMissionItem(_settings->homePosition(),
index /*insertion index*/,
false /*do update*/);
SimpleMissionItem *landItem = _currentMissionItems.value<SimpleMissionItem*>(index);
if (landItem == nullptr) {
Q_ASSERT(false);
qWarning("WaypointManager::RTLManager::next(): nullptr.");
return false;
}
makeLandCmd(landItem, _settings->masterController()->managerVehicle());
// Set altitude.
for (int i = 1; i < _currentMissionItems.count(); ++i) {
SimpleMissionItem *item = _currentMissionItems.value<SimpleMissionItem *>(i);
if (item == nullptr) {
Q_ASSERT(false);
qWarning("WimaController::updateAltitude(): nullptr");
return false;
}
item->altitude()->setRawValue(_settings->altitude());
}
// Update list _currentMissionItems.
updateHirarchy(_currentMissionItems);
updateSequenceNumbers(_currentMissionItems);
// Update list _currentMissionItems.
updateHirarchy(_currentMissionItems);
updateSequenceNumbers(_currentMissionItems);
// Append return path to _currentWaypoints. // Append return path to _currentWaypoints.
for ( auto c : returnPath ) for (auto c : returnPath)
_currentWaypoints.push_back(c); _currentWaypoints.push_back(c);
// Create variant list. // Create variant list.
_currentWaypointsVariant.clear(); _currentWaypointsVariant.clear();
for ( auto c : _currentWaypoints) for (auto c : _currentWaypoints)
_currentWaypointsVariant.push_back(QVariant::fromValue(c)); _currentWaypointsVariant.push_back(QVariant::fromValue(c));
return true; return true;
} }
...@@ -270,8 +270,11 @@ void WimaController::resetPhase() { ...@@ -270,8 +270,11 @@ void WimaController::resetPhase() {
} }
void WimaController::requestSmartRTL() { void WimaController::requestSmartRTL() {
QString errorString("Smart RTL requested. "); #ifdef DEBUG_SRTL
if (!_checkSmartRTLPreCondition(errorString)) { qWarning() << "WimaController::requestSmartRTL() called";
#endif
QString errorString("Smart RTL requested.");
if (!_SRTLPrecondition(errorString)) {
qgcApp()->showMessage(errorString); qgcApp()->showMessage(errorString);
return; return;
} }
...@@ -279,59 +282,85 @@ void WimaController::requestSmartRTL() { ...@@ -279,59 +282,85 @@ void WimaController::requestSmartRTL() {
} }
bool WimaController::upload() { bool WimaController::upload() {
auto &currentMissionItems = _defaultWM.currentMissionItems(); auto &items = _currentWM->currentMissionItems();
if (!_serviceArea.containsCoordinate( if (_masterController && _masterController->managerVehicle() &&
_masterController->managerVehicle()->coordinate()) && items.count() > 0) {
currentMissionItems.count() > 0) { if (!_joinedArea.containsCoordinate(
emit forceUploadConfirm(); _masterController->managerVehicle()->coordinate())) {
emit forceUploadConfirm();
return false;
} else {
return forceUpload();
}
} else {
return false; return false;
} }
return forceUpload();
} }
bool WimaController::forceUpload() { bool WimaController::forceUpload() {
auto &currentMissionItems = _defaultWM.currentMissionItems(); auto &currentMissionItems = _currentWM->currentMissionItems();
if (currentMissionItems.count() < 1) if (currentMissionItems.count() < 1 || !_missionController ||
return false; !_masterController) {
qWarning() << "WimaController::forceUpload(): error:";
_missionController->removeAll(); qWarning() << "currentMissionItems.count(): "
// Set homeposition of settingsItem. << currentMissionItems.count();
QmlObjectListModel *visuals = _missionController->visualItems(); qWarning() << "_missionController: " << _missionController;
MissionSettingsItem *settingsItem = visuals->value<MissionSettingsItem *>(0); qWarning() << "_masterController: " << _masterController;
if (settingsItem == nullptr) {
Q_ASSERT(false);
qWarning("WimaController::updateCurrentMissionItems(): nullptr");
return false; return false;
} } else {
settingsItem->setCoordinate(_WMSettings.homePosition()); _missionController->removeAll();
// Set homeposition of settingsItem.
QmlObjectListModel *visuals = _missionController->visualItems();
MissionSettingsItem *settingsItem =
visuals->value<MissionSettingsItem *>(0);
if (settingsItem == nullptr) {
Q_ASSERT(false);
qWarning("WimaController::updateCurrentMissionItems(): nullptr");
return false;
} else {
settingsItem->setCoordinate(_WMSettings.homePosition());
// Copy mission items to _missionController. // Copy mission items to _missionController and send them.
for (int i = 1; i < currentMissionItems.count(); i++) { for (int i = 1; i < currentMissionItems.count(); i++) {
auto *item = currentMissionItems.value<const SimpleMissionItem *>(i); auto *item = currentMissionItems.value<const SimpleMissionItem *>(i);
_missionController->insertSimpleMissionItem(*item, visuals->count()); _missionController->insertSimpleMissionItem(*item, visuals->count());
}
_masterController->sendToVehicle();
return true;
}
} }
_masterController->sendToVehicle();
return true;
} }
void WimaController::removeFromVehicle() { void WimaController::removeFromVehicle() {
_masterController->removeAllFromVehicle(); if (_masterController && _missionController) {
_missionController->removeAll(); _masterController->removeAllFromVehicle();
_missionController->removeAll();
}
} }
void WimaController::executeSmartRTL() { void WimaController::executeSmartRTL() {
forceUpload(); #ifdef DEBUG_SRTL
masterController()->managerVehicle()->startMission(); qWarning() << "WimaController::executeSmartRTL() called";
#endif
if (_masterController && _masterController->managerVehicle()) {
forceUpload();
_masterController->managerVehicle()->startMission();
}
} }
void WimaController::initSmartRTL() { _initSmartRTL(); } void WimaController::initSmartRTL() {
#ifdef DEBUG_SRTL
qWarning() << "WimaController::initSmartRTL() called";
#endif
_initSmartRTL();
}
void WimaController::removeVehicleTrajectoryHistory() { void WimaController::removeVehicleTrajectoryHistory() {
Vehicle *managerVehicle = masterController()->managerVehicle(); if (_masterController && _masterController->managerVehicle()) {
managerVehicle->trajectoryPoints()->clear(); _masterController->managerVehicle()
->trajectoryPoints()
->clearAndDeleteContents();
}
} }
bool WimaController::_calcShortestPath(const QGeoCoordinate &start, bool WimaController::_calcShortestPath(const QGeoCoordinate &start,
...@@ -371,8 +400,8 @@ bool WimaController::setWimaPlanData(QSharedPointer<WimaPlanData> planData) { ...@@ -371,8 +400,8 @@ bool WimaController::setWimaPlanData(QSharedPointer<WimaPlanData> planData) {
QList<const WimaAreaData *> areaList = planData->areaList(); QList<const WimaAreaData *> areaList = planData->areaList();
int areaCounter = 0; int areaCounter = 0;
const int numAreas = 4; // extract only numAreas Areas, if there are more they const int numAreas = 4; // extract only numAreas Areas, if there are more
// are invalid and ignored // they are invalid and ignored
for (int i = 0; i < areaList.size(); i++) { for (int i = 0; i < areaList.size(); i++) {
const WimaAreaData *areaData = areaList[i]; const WimaAreaData *areaData = areaList[i];
...@@ -586,33 +615,35 @@ void WimaController::_updateAltitude() { ...@@ -586,33 +615,35 @@ void WimaController::_updateAltitude() {
} }
void WimaController::_checkBatteryLevel() { void WimaController::_checkBatteryLevel() {
Vehicle *managerVehicle = masterController()->managerVehicle(); if (_missionController && _masterController &&
WimaSettings *wimaSettings = _masterController->managerVehicle()) {
qgcApp()->toolbox()->settingsManager()->wimaSettings(); Vehicle *managerVehicle = masterController()->managerVehicle();
int batteryThreshold = WimaSettings *wimaSettings =
wimaSettings->lowBatteryThreshold()->rawValue().toInt(); qgcApp()->toolbox()->settingsManager()->wimaSettings();
bool enabled = _enableWimaController.rawValue().toBool(); int threshold = wimaSettings->lowBatteryThreshold()->rawValue().toInt();
unsigned int minTime = bool enabled = _enableWimaController.rawValue().toBool();
wimaSettings->minimalRemainingMissionTime()->rawValue().toUInt(); unsigned int minTime =
wimaSettings->minimalRemainingMissionTime()->rawValue().toUInt();
if (managerVehicle != nullptr && enabled == true) {
Fact *battery1percentRemaining = if (enabled) {
managerVehicle->battery1FactGroup()->getFact( Fact *battery1percentRemaining =
VehicleBatteryFactGroup::_percentRemainingFactName); managerVehicle->battery1FactGroup()->getFact(
Fact *battery2percentRemaining = VehicleBatteryFactGroup::_percentRemainingFactName);
managerVehicle->battery2FactGroup()->getFact( Fact *battery2percentRemaining =
VehicleBatteryFactGroup::_percentRemainingFactName); managerVehicle->battery2FactGroup()->getFact(
VehicleBatteryFactGroup::_percentRemainingFactName);
if (battery1percentRemaining->rawValue().toDouble() < batteryThreshold &&
battery2percentRemaining->rawValue().toDouble() < batteryThreshold) { if (battery1percentRemaining->rawValue().toDouble() < threshold &&
if (!_lowBatteryHandlingTriggered) { battery2percentRemaining->rawValue().toDouble() < threshold) {
_lowBatteryHandlingTriggered = true; if (!_lowBatteryHandlingTriggered) {
if (!(_missionController->remainingTime() <= minTime)) { _lowBatteryHandlingTriggered = true;
requestSmartRTL(); if (!(_missionController->remainingTime() <= minTime)) {
requestSmartRTL();
}
} }
} else {
_lowBatteryHandlingTriggered = false;
} }
} else {
_lowBatteryHandlingTriggered = false;
} }
} }
} }
...@@ -630,9 +661,8 @@ void WimaController::_eventTimerHandler() { ...@@ -630,9 +661,8 @@ void WimaController::_eventTimerHandler() {
} }
void WimaController::_smartRTLCleanUp(bool flying) { void WimaController::_smartRTLCleanUp(bool flying) {
if (!flying) { // vehicle has landed if (!flying && _missionController) { // vehicle has landed
_switchWaypointManager(_defaultWM); _switchWaypointManager(_defaultWM);
_missionController->removeAllFromVehicle();
_missionController->removeAll(); _missionController->removeAll();
disconnect(masterController()->managerVehicle(), &Vehicle::flyingChanged, disconnect(masterController()->managerVehicle(), &Vehicle::flyingChanged,
this, &WimaController::_smartRTLCleanUp); this, &WimaController::_smartRTLCleanUp);
...@@ -657,7 +687,7 @@ void WimaController::_setPhaseDuration(double duration) { ...@@ -657,7 +687,7 @@ void WimaController::_setPhaseDuration(double duration) {
// } // }
} }
bool WimaController::_checkSmartRTLPreCondition(QString &errorString) { bool WimaController::_SRTLPrecondition(QString &errorString) {
if (!_localPlanDataValid) { if (!_localPlanDataValid) {
errorString.append(tr("No WiMA data available. Please define at least a " errorString.append(tr("No WiMA data available. Please define at least a "
"measurement and a service area.")); "measurement and a service area."));
...@@ -695,25 +725,28 @@ void WimaController::_switchWaypointManager( ...@@ -695,25 +725,28 @@ void WimaController::_switchWaypointManager(
emit waypointPathChanged(); emit waypointPathChanged();
emit currentWaypointPathChanged(); emit currentWaypointPathChanged();
qWarning() qWarning() << "WimaController::_switchWaypointManager: statistics update "
<< "WimaController::_switchWaypointManager: statistics update missing."; "missing.";
} }
} }
void WimaController::_initSmartRTL() { void WimaController::_initSmartRTL() {
QString errorString;
static int attemptCounter = 0; static int attemptCounter = 0;
attemptCounter++; attemptCounter++;
QString errorString;
if (_checkSmartRTLPreCondition(errorString)) { if (_SRTLPrecondition(errorString)) {
_masterController->managerVehicle()->pauseVehicle(); if (_missionController && _masterController &&
connect(masterController()->managerVehicle(), &Vehicle::flyingChanged, this, _masterController->managerVehicle()) {
&WimaController::_smartRTLCleanUp); _masterController->managerVehicle()->pauseVehicle();
if (_rtlWM.update()) { // Calculate return path. connect(_masterController->managerVehicle(), &Vehicle::flyingChanged,
_switchWaypointManager(_rtlWM); this, &WimaController::_smartRTLCleanUp);
attemptCounter = 0; if (_rtlWM.update()) { // Calculate return path.
emit smartRTLPathConfirm(); _switchWaypointManager(_rtlWM);
return; removeFromVehicle();
attemptCounter = 0;
emit smartRTLPathConfirm();
}
} }
} else if (attemptCounter > SMART_RTL_MAX_ATTEMPTS) { } else if (attemptCounter > SMART_RTL_MAX_ATTEMPTS) {
errorString.append( errorString.append(
......
...@@ -138,7 +138,6 @@ public: ...@@ -138,7 +138,6 @@ public:
QString nemoStatusString(void) const; QString nemoStatusString(void) const;
bool snakeCalcInProgress(void) const; bool snakeCalcInProgress(void) const;
// Smart RTL.
bool uploadOverrideRequired(void) const; bool uploadOverrideRequired(void) const;
bool vehicleHasLowBattery(void) const; bool vehicleHasLowBattery(void) const;
// Waypoint statistics. // Waypoint statistics.
...@@ -234,7 +233,7 @@ private slots: ...@@ -234,7 +233,7 @@ private slots:
void _setPhaseDuration(double duration); void _setPhaseDuration(double duration);
// SMART RTL // SMART RTL
void _checkBatteryLevel(void); void _checkBatteryLevel(void);
bool _checkSmartRTLPreCondition(QString &errorString); bool _SRTLPrecondition(QString &errorString);
void _initSmartRTL(); void _initSmartRTL();
void _smartRTLCleanUp(bool flying); void _smartRTLCleanUp(bool flying);
// Snake. // Snake.
......
...@@ -742,12 +742,14 @@ QSharedPointer<WimaPlanData> WimaPlaner::toPlanData() { ...@@ -742,12 +742,14 @@ QSharedPointer<WimaPlanData> WimaPlaner::toPlanData() {
// convert mission items to mavlink commands // convert mission items to mavlink commands
QList<MissionItem *> missionItems; QList<MissionItem *> missionItems;
_TSComplexItem->appendMissionItems(missionItems, nullptr); if (_missionController && _missionController->visualItems()) {
// store mavlink commands int surveyIndex =
qWarning() << "WimaPlaner"; _missionController->visualItems()->indexOf(_TSComplexItem);
for (auto *item : missionItems) { if (surveyIndex > 0) {
qWarning() << item->coordinate(); _TSComplexItem->appendMissionItems(missionItems, nullptr);
}
} }
// store mavlink commands
planData->append(missionItems); planData->append(missionItems);
return planData; return planData;
} }
......
import QtQml 2.2
import QtQuick 2.0
import QtLocation 5.3
MapQuickItem {
id: root
width: 20
height: 20
anchorPoint.x: width/2
anchorPoint.y: height/2
property color primaryColor: "orange"
property color secondaryColor: "lightblue"
property real centerWidth: width / 2
property real centerHeight: height / 2
property real radius: Math.min(canvas.width, canvas.height) / 2
property real minimumValue: 0
property real maximumValue: 100
property real currentValue: 33
// this is the angle that splits the circle in two arcs
// first arc is drawn from 0 radians to angle radians
// second arc is angle radians to 2*PI radians
property real angle: (currentValue - minimumValue) / (maximumValue - minimumValue) * 2 * Math.PI
// we want both circle to start / end at 12 o'clock
// without this offset we would start / end at 9 o'clock
property real angleOffset: -Math.PI / 2
property string text: ""
signal clicked()
onPrimaryColorChanged: canvas.requestPaint()
onSecondaryColorChanged: canvas.requestPaint()
onMinimumValueChanged: canvas.requestPaint()
onMaximumValueChanged: canvas.requestPaint()
onCurrentValueChanged: canvas.requestPaint()
// draws two arcs (portion of a circle)
// fills the circle with a lighter secondary color
// when pressed
sourceItem: Canvas {
id: canvas
width: root.width
height: root.height
antialiasing: true
onPaint: {
var ctx = getContext("2d");
ctx.save();
ctx.clearRect(0, 0, canvas.width, canvas.height);
// fills the mouse area when pressed
// the fill color is a lighter version of the
// secondary color
if (mouseArea.pressed) {
ctx.beginPath();
ctx.lineWidth = 1;
ctx.fillStyle = Qt.lighter(root.secondaryColor, 1.25);
ctx.arc(root.centerWidth,
root.centerHeight,
root.radius,
0,
2*Math.PI);
ctx.fill();
}
// First, thinner arc
// From angle to 2*PI
ctx.beginPath();
ctx.lineWidth = 1;
ctx.strokeStyle = primaryColor;
ctx.arc(root.centerWidth,
root.centerHeight,
root.radius,
angleOffset + root.angle,
angleOffset + 2*Math.PI);
ctx.stroke();
// Second, thicker arc
// From 0 to angle
ctx.beginPath();
ctx.lineWidth = 3;
ctx.strokeStyle = root.secondaryColor;
ctx.arc(root.centerWidth,
root.centerHeight,
root.radius,
root.angleOffset,
root.angleOffset + root.angle);
ctx.stroke();
ctx.restore();
}
Text {
anchors.centerIn: parent
text: root.text
color: root.primaryColor
}
MouseArea {
id: mouseArea
anchors.fill: parent
onClicked: root.clicked()
onPressedChanged: canvas.requestPaint()
}
}
}
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