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
19c3e2cb
Commit
19c3e2cb
authored
Aug 31, 2016
by
Kelly Steich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
survey item coordinate now has altitude
formating
parent
d9fa1118
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+15
-2
SurveyMissionItem.h
src/MissionManager/SurveyMissionItem.h
+1
-0
No files found.
src/MissionManager/SurveyMissionItem.cc
View file @
19c3e2cb
...
...
@@ -80,6 +80,7 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent)
connect
(
&
_gridAngleFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
_generateGrid
);
connect
(
&
_turnaroundDistFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
_generateGrid
);
connect
(
&
_cameraTriggerDistanceFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
_generateGrid
);
connect
(
&
_gridAltitudeFact
,
&
Fact
::
valueChanged
,
this
,
&
SurveyMissionItem
::
_updateCoordinateAltitude
);
connect
(
this
,
&
SurveyMissionItem
::
cameraTriggerChanged
,
this
,
&
SurveyMissionItem
::
_cameraTriggerChanged
);
}
...
...
@@ -397,11 +398,23 @@ void SurveyMissionItem::_generateGrid(void)
emit
lastSequenceNumberChanged
(
lastSequenceNumber
());
if
(
_gridPoints
.
count
())
{
setCoordinate
(
_gridPoints
.
first
().
value
<
QGeoCoordinate
>
());
_setExitCoordinate
(
_gridPoints
.
last
().
value
<
QGeoCoordinate
>
());
QGeoCoordinate
coordinate
=
_gridPoints
.
first
().
value
<
QGeoCoordinate
>
();
coordinate
.
setAltitude
(
_gridAltitudeFact
.
rawValue
().
toDouble
());
setCoordinate
(
coordinate
);
QGeoCoordinate
exitCoordinate
=
_gridPoints
.
last
().
value
<
QGeoCoordinate
>
();
exitCoordinate
.
setAltitude
(
_gridAltitudeFact
.
rawValue
().
toDouble
());
_setExitCoordinate
(
exitCoordinate
);
}
}
void
SurveyMissionItem
::
_updateCoordinateAltitude
(
void
)
{
_coordinate
.
setAltitude
(
_gridAltitudeFact
.
rawValue
().
toDouble
());
_exitCoordinate
.
setAltitude
(
_gridAltitudeFact
.
rawValue
().
toDouble
());
emit
coordinateChanged
(
_coordinate
);
emit
exitCoordinateChanged
(
_exitCoordinate
);
}
QPointF
SurveyMissionItem
::
_rotatePoint
(
const
QPointF
&
point
,
const
QPointF
&
origin
,
double
angle
)
{
QPointF
rotated
;
...
...
src/MissionManager/SurveyMissionItem.h
View file @
19c3e2cb
...
...
@@ -104,6 +104,7 @@ private:
void
_setExitCoordinate
(
const
QGeoCoordinate
&
coordinate
);
void
_clearGrid
(
void
);
void
_generateGrid
(
void
);
void
_updateCoordinateAltitude
(
void
);
void
_gridGenerator
(
const
QList
<
QPointF
>&
polygonPoints
,
QList
<
QPointF
>&
gridPoints
);
QPointF
_rotatePoint
(
const
QPointF
&
point
,
const
QPointF
&
origin
,
double
angle
);
void
_intersectLinesWithRect
(
const
QList
<
QLineF
>&
lineList
,
const
QRectF
&
boundRect
,
QList
<
QLineF
>&
resultLines
);
...
...
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