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
b28e00a0
Commit
b28e00a0
authored
Apr 01, 2017
by
Don Gagne
Committed by
GitHub
Apr 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4899 from DonLakeFlyer/HoverAndCapture
Survey: Hover and Capture support
parents
296a43ce
e5a4fef1
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
256 additions
and
110 deletions
+256
-110
PX4FirmwarePlugin.cc
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
+2
-1
SurveyMissionItem.cc
src/MissionManager/SurveyMissionItem.cc
+237
-103
SurveyMissionItem.h
src/MissionManager/SurveyMissionItem.h
+14
-4
SurveyItemEditor.qml
src/PlanView/SurveyItemEditor.qml
+3
-2
No files found.
src/FirmwarePlugin/PX4/PX4FirmwarePlugin.cc
View file @
b28e00a0
...
...
@@ -267,7 +267,8 @@ QList<MAV_CMD> PX4FirmwarePlugin::supportedMissionCommands(void)
<<
MAV_CMD_DO_LAND_START
<<
MAV_CMD_DO_MOUNT_CONFIGURE
<<
MAV_CMD_DO_MOUNT_CONTROL
<<
MAV_CMD_IMAGE_START_CAPTURE
<<
MAV_CMD_IMAGE_STOP_CAPTURE
<<
MAV_CMD_VIDEO_START_CAPTURE
<<
MAV_CMD_VIDEO_STOP_CAPTURE
;
<<
MAV_CMD_IMAGE_START_CAPTURE
<<
MAV_CMD_IMAGE_STOP_CAPTURE
<<
MAV_CMD_VIDEO_START_CAPTURE
<<
MAV_CMD_VIDEO_STOP_CAPTURE
<<
MAV_CMD_NAV_DELAY
;
return
list
;
}
...
...
src/MissionManager/SurveyMissionItem.cc
View file @
b28e00a0
This diff is collapsed.
Click to expand it.
src/MissionManager/SurveyMissionItem.h
View file @
b28e00a0
...
...
@@ -48,6 +48,7 @@ public:
Q_PROPERTY
(
Fact
*
camera
READ
camera
CONSTANT
)
Q_PROPERTY
(
bool
cameraOrientationFixed
MEMBER
_cameraOrientationFixed
NOTIFY
cameraOrientationFixedChanged
)
Q_PROPERTY
(
bool
hoverAndCaptureAllowed
READ
hoverAndCaptureAllowed
CONSTANT
)
Q_PROPERTY
(
double
timeBetweenShots
READ
timeBetweenShots
NOTIFY
timeBetweenShotsChanged
)
Q_PROPERTY
(
QVariantList
polygonPath
READ
polygonPath
NOTIFY
polygonPathChanged
)
...
...
@@ -97,6 +98,7 @@ public:
int
cameraShots
(
void
)
const
;
double
coveredArea
(
void
)
const
{
return
_coveredArea
;
}
double
timeBetweenShots
(
void
)
const
;
bool
hoverAndCaptureAllowed
(
void
)
const
;
// Overrides from ComplexMissionItem
...
...
@@ -171,14 +173,14 @@ signals:
void
cameraOrientationFixedChanged
(
bool
cameraOrientationFixed
);
private
slots
:
void
_cameraTriggerChanged
(
void
);
void
_setDirty
(
void
);
private:
enum
CameraTriggerCode
{
CameraTriggerNone
,
CameraTriggerOn
,
CameraTriggerOff
CameraTriggerOff
,
CameraTriggerHoverAndCapture
};
void
_clear
(
void
);
...
...
@@ -186,7 +188,7 @@ private:
void
_clearGrid
(
void
);
void
_generateGrid
(
void
);
void
_updateCoordinateAltitude
(
void
);
void
_gridGenerator
(
const
QList
<
QPointF
>&
polygonPoints
,
QList
<
QPointF
>&
simpleGridPoints
,
QList
<
QList
<
QPointF
>>&
grid
Segments
);
void
_gridGenerator
(
const
QList
<
QPointF
>&
polygonPoints
,
QList
<
QPointF
>&
simpleGridPoints
,
QList
<
QList
<
QPointF
>>&
transect
Segments
);
QPointF
_rotatePoint
(
const
QPointF
&
point
,
const
QPointF
&
origin
,
double
angle
);
void
_intersectLinesWithRect
(
const
QList
<
QLineF
>&
lineList
,
const
QRectF
&
boundRect
,
QList
<
QLineF
>&
resultLines
);
void
_intersectLinesWithPolygon
(
const
QList
<
QLineF
>&
lineList
,
const
QPolygonF
&
polygon
,
QList
<
QLineF
>&
resultLines
);
...
...
@@ -196,16 +198,24 @@ private:
void
_setCoveredArea
(
double
coveredArea
);
void
_cameraValueChanged
(
void
);
int
_appendWaypointToMission
(
QList
<
MissionItem
*>&
items
,
int
seqNum
,
QGeoCoordinate
&
coord
,
CameraTriggerCode
cameraTrigger
,
QObject
*
missionItemParent
);
bool
_nextTransectCoord
(
const
QList
<
QGeoCoordinate
>&
transectPoints
,
int
pointIndex
,
QGeoCoordinate
&
coord
);
double
_triggerDistance
(
void
)
const
;
bool
_triggerCamera
(
void
)
const
;
bool
_imagesEverywhere
(
void
)
const
;
bool
_hoverAndCaptureEnabled
(
void
)
const
;
bool
_hasTurnaround
(
void
)
const
;
double
_turnaroundDistance
(
void
)
const
;
int
_sequenceNumber
;
bool
_dirty
;
QVariantList
_polygonPath
;
QmlObjectListModel
_polygonModel
;
QVariantList
_simpleGridPoints
;
///< Grid points for drawing simple grid visuals
QList
<
QList
<
QGeoCoordinate
>>
_
gridSegments
;
///< Internal grid line segments including grid exit and turnaround point
QList
<
QList
<
QGeoCoordinate
>>
_
transectSegments
;
///< Internal transect segments including grid exit, turnaround and internal camera points
QGeoCoordinate
_coordinate
;
QGeoCoordinate
_exitCoordinate
;
bool
_cameraOrientationFixed
;
int
_missionCommandCount
;
double
_surveyDistance
;
int
_cameraShots
;
...
...
src/PlanView/SurveyItemEditor.qml
View file @
b28e00a0
...
...
@@ -244,8 +244,9 @@ Rectangle {
}
FactCheckBox
{
text
:
qsTr
(
"
Hover and capture image
"
)
fact
:
missionItem
.
hoverAndCapture
text
:
qsTr
(
"
Hover and capture image
"
)
fact
:
missionItem
.
hoverAndCapture
visible
:
missionItem
.
hoverAndCaptureAllowed
}
}
...
...
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