Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
44644da9
Commit
44644da9
authored
Nov 10, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
altitude issue for pattern flight plans solved
parent
24bbbf6a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
265 additions
and
6 deletions
+265
-6
KlingenbachSurvey.plan
Paths/KlingenbachSurvey.plan
+239
-0
SurveyComplexItem.cc
src/MissionManager/SurveyComplexItem.cc
+1
-0
TransectStyleComplexItem.cc
src/MissionManager/TransectStyleComplexItem.cc
+24
-6
TransectStyleComplexItem.h
src/MissionManager/TransectStyleComplexItem.h
+1
-0
No files found.
Paths/KlingenbachSurvey.plan
0 → 100644
View file @
44644da9
{
"fileType": "Plan",
"geoFence": {
"circles": [
],
"polygons": [
],
"version": 2
},
"groundStation": "QGroundControl",
"mission": {
"cruiseSpeed": 15,
"firmwareType": 3,
"hoverSpeed": 2,
"items": [
{
"autoContinue": true,
"command": 22,
"doJumpId": 1,
"frame": 3,
"params": [
15,
0,
0,
null,
0,
0,
15
],
"type": "SimpleItem"
},
{
"TransectStyleComplexItem": {
"CameraCalc": {
"AdjustedFootprintFrontal": 25,
"AdjustedFootprintSide": 25,
"CameraName": "Manual (no camera specs)",
"DistanceToSurface": 16,
"DistanceToSurfaceRelative": true,
"version": 1
},
"CameraShots": 6,
"CameraTriggerInTurnAround": true,
"FollowTerrain": false,
"HoverAndCapture": false,
"Items": [
{
"autoContinue": true,
"command": 16,
"doJumpId": 2,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76823086287187,
16.53058942509675,
12
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 3,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 4,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 5,
"frame": 3,
"params": [
0,
0,
0,
null,
47.767777545528425,
16.530589422507354,
12
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 6,
"frame": 3,
"params": [
0,
0,
0,
null,
47.7678946477262,
16.53092392473375,
12
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 7,
"frame": 2,
"params": [
25,
0,
1,
0,
0,
0,
0
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 16,
"doJumpId": 8,
"frame": 3,
"params": [
0,
0,
0,
null,
47.76834255995745,
16.530923930172992,
12
],
"type": "SimpleItem"
},
{
"autoContinue": true,
"command": 206,
"doJumpId": 9,
"frame": 2,
"params": [
0,
0,
0,
0,
0,
0,
0
],
"type": "SimpleItem"
}
],
"Refly90Degrees": false,
"TurnAroundDistance": 0,
"VisualTransectPoints": [
[
47.76823086287187,
16.53058942509675
],
[
47.767777545528425,
16.530589422507354
],
[
47.7678946477262,
16.53092392473375
],
[
47.76834255995745,
16.530923930172992
]
],
"version": 1
},
"angle": 0,
"complexItemType": "survey",
"entryLocation": 0,
"flyAlternateTransects": false,
"polygon": [
[
47.76813165710231,
16.530292332060014
],
[
47.76836780779515,
16.530999541789157
],
[
47.767985395495465,
16.531183148525685
],
[
47.76771877171136,
16.530421536814117
]
],
"splitConcavePolygons": false,
"type": "ComplexItem",
"version": 5
}
],
"plannedHomePosition": [
47.7677909,
16.5305408,
0.01
],
"vehicleType": 2,
"version": 2
},
"rallyPoints": {
"points": [
],
"version": 2
},
"version": 1
}
src/MissionManager/SurveyComplexItem.cc
View file @
44644da9
...
...
@@ -640,6 +640,7 @@ void SurveyComplexItem::_buildAndAppendMissionItems(QList<MissionItem*>& items,
bool
transectEntry
=
true
;
for
(
const
CoordInfo_t
&
transectCoordInfo
:
transect
)
{
qWarning
()
<<
transectCoordInfo
.
coord
.
altitude
();
item
=
new
MissionItem
(
seqNum
++
,
MAV_CMD_NAV_WAYPOINT
,
mavFrame
,
...
...
src/MissionManager/TransectStyleComplexItem.cc
View file @
44644da9
...
...
@@ -108,6 +108,10 @@ TransectStyleComplexItem::TransectStyleComplexItem(Vehicle* vehicle, bool flyVie
connect
(
this
,
&
TransectStyleComplexItem
::
followTerrainChanged
,
this
,
&
TransectStyleComplexItem
::
_followTerrainChanged
);
connect
(
_cameraCalc
.
distanceToSurface
(),
&
Fact
::
rawValueChanged
,
this
,
&
TransectStyleComplexItem
::
_updateTransectAltitude
);
connect
(
_cameraCalc
.
distanceToSurface
(),
&
Fact
::
rawValueChanged
,
this
,
&
TransectStyleComplexItem
::
_clearLoadedMissionItems
);
setDirty
(
false
);
}
...
...
@@ -228,6 +232,11 @@ bool TransectStyleComplexItem::_load(const QJsonObject& complexObject, QString&
_coordinate
=
_visualTransectPoints
.
count
()
?
_visualTransectPoints
.
first
().
value
<
QGeoCoordinate
>
()
:
QGeoCoordinate
();
_exitCoordinate
=
_visualTransectPoints
.
count
()
?
_visualTransectPoints
.
last
().
value
<
QGeoCoordinate
>
()
:
QGeoCoordinate
();
// Load CameraCalc data
if
(
!
_cameraCalc
.
load
(
innerObject
[
_jsonCameraCalcKey
].
toObject
(),
errorString
))
{
return
false
;
}
// Load generated mission items
_loadedMissionItemsParent
=
new
QObject
(
this
);
QJsonArray
missionItemsJsonArray
=
innerObject
[
_jsonItemsKey
].
toArray
();
...
...
@@ -241,10 +250,6 @@ bool TransectStyleComplexItem::_load(const QJsonObject& complexObject, QString&
_loadedMissionItems
.
append
(
missionItem
);
}
// Load CameraCalc data
if
(
!
_cameraCalc
.
load
(
innerObject
[
_jsonCameraCalcKey
].
toObject
(),
errorString
))
{
return
false
;
}
// Load TransectStyleComplexItem individual values
_turnAroundDistanceFact
.
setRawValue
(
innerObject
[
turnAroundDistanceName
].
toDouble
());
...
...
@@ -419,9 +424,22 @@ void TransectStyleComplexItem::_updateTransectAltitude()
{
double
altitude
=
_cameraCalc
.
distanceToSurface
()
->
rawValue
().
toDouble
();
if
(
altitude
>
0
)
for
(
auto
list
:
_transects
)
for
(
auto
vertex
:
list
)
for
(
int
h
=
0
;
h
<
_transects
.
length
();
h
++
){
QList
<
CoordInfo_t
>
&
list
=
_transects
[
h
];
for
(
int
i
=
0
;
i
<
list
.
length
();
i
++
)
{
CoordInfo_t
&
vertex
=
list
[
i
];
vertex
.
coord
.
setAltitude
(
altitude
);
}
}
}
void
TransectStyleComplexItem
::
_clearLoadedMissionItems
()
{
if
(
_loadedMissionItemsParent
){
_loadedMissionItems
.
clear
();
_loadedMissionItemsParent
->
deleteLater
();
_loadedMissionItemsParent
=
nullptr
;
}
}
void
TransectStyleComplexItem
::
_queryTransectsPathHeightInfo
(
void
)
...
...
src/MissionManager/TransectStyleComplexItem.h
View file @
44644da9
...
...
@@ -135,6 +135,7 @@ protected slots:
void
_polyPathTerrainData
(
bool
success
,
const
QList
<
TerrainPathQuery
::
PathHeightInfo_t
>&
rgPathHeightInfo
);
void
_rebuildTransects
(
void
);
void
_updateTransectAltitude
(
void
);
void
_clearLoadedMissionItems
(
void
);
protected:
virtual
void
_rebuildTransectsPhase1
(
void
)
=
0
;
///< Rebuilds the _transects array
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment