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