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
071506a9
Commit
071506a9
authored
Oct 26, 2019
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WimaPlaner auto recacl paths added
parent
e07f9bc8
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
171 additions
and
111 deletions
+171
-111
MissionController.cc
src/MissionManager/MissionController.cc
+5
-5
MissionController.h
src/MissionManager/MissionController.h
+2
-2
WimaController.cc
src/Wima/WimaController.cc
+1
-1
WimaPlaner.cc
src/Wima/WimaPlaner.cc
+154
-102
WimaPlaner.h
src/Wima/WimaPlaner.h
+9
-1
No files found.
src/MissionManager/MissionController.cc
View file @
071506a9
...
...
@@ -1053,9 +1053,9 @@ bool MissionController::readyForSaveSend(void) const
return
true
;
}
bool
MissionController
::
setTakeoffCommand
(
SimpleMissionItem
&
missionItem
,
Vehicle
&
vehicle
)
bool
MissionController
::
setTakeoffCommand
(
SimpleMissionItem
&
missionItem
)
{
if
(
vehicle
.
fixedWing
()
||
vehicle
.
vtol
()
||
vehicle
.
multiRotor
())
{
if
(
_controllerVehicle
->
fixedWing
()
||
_controllerVehicle
->
vtol
()
||
_controllerVehicle
->
multiRotor
())
{
MAV_CMD
takeoffCmd
=
_controllerVehicle
->
vtol
()
?
MAV_CMD_NAV_VTOL_TAKEOFF
:
MAV_CMD_NAV_TAKEOFF
;
if
(
_controllerVehicle
->
firmwarePlugin
()
->
supportedMissionCommands
().
contains
(
takeoffCmd
))
{
missionItem
.
setCommand
(
takeoffCmd
);
...
...
@@ -1067,10 +1067,10 @@ bool MissionController::setTakeoffCommand(SimpleMissionItem &missionItem, Vehicl
return
true
;
}
bool
MissionController
::
setLandCommand
(
SimpleMissionItem
&
missionItem
,
Vehicle
&
vehicle
)
bool
MissionController
::
setLandCommand
(
SimpleMissionItem
&
missionItem
)
{
MAV_CMD
landCmd
=
vehicle
.
vtol
()
?
MAV_CMD_NAV_VTOL_LAND
:
MAV_CMD_NAV_LAND
;
if
(
vehicle
.
firmwarePlugin
()
->
supportedMissionCommands
().
contains
(
landCmd
))
{
MAV_CMD
landCmd
=
_controllerVehicle
->
vtol
()
?
MAV_CMD_NAV_VTOL_LAND
:
MAV_CMD_NAV_LAND
;
if
(
_controllerVehicle
->
firmwarePlugin
()
->
supportedMissionCommands
().
contains
(
landCmd
))
{
missionItem
.
setCommand
(
landCmd
);
}
else
return
false
;
...
...
src/MissionManager/MissionController.h
View file @
071506a9
...
...
@@ -151,9 +151,9 @@ public:
bool
readyForSaveSend
(
void
)
const
;
/// sets the command in missionItem to a land command
bool
setLandCommand
(
SimpleMissionItem
&
missionItem
,
Vehicle
&
vehicle
);
bool
setLandCommand
(
SimpleMissionItem
&
missionItem
);
/// sets the command in missionItem to a takeoff command
bool
setTakeoffCommand
(
SimpleMissionItem
&
missionItem
,
Vehicle
&
vehicle
);
bool
setTakeoffCommand
(
SimpleMissionItem
&
missionItem
);
/// Sends the mission items to the specified vehicle
static
void
sendItemsToVehicle
(
Vehicle
*
vehicle
,
QmlObjectListModel
*
visualMissionItems
);
...
...
src/Wima/WimaController.cc
View file @
071506a9
...
...
@@ -548,7 +548,7 @@ bool WimaController::calcNextPhase()
qWarning
(
"WimaController::calcNextPhase(): nullptr"
);
return
false
;
}
_missionController
->
setLandCommand
(
*
landItem
,
*
_masterController
->
controllerVehicle
()
);
_missionController
->
setLandCommand
(
*
landItem
);
// copy to _currentMissionItems
for
(
int
i
=
1
;
i
<
missionControllerVisuals
->
count
();
i
++
)
{
...
...
src/Wima/WimaPlaner.cc
View file @
071506a9
This diff is collapsed.
Click to expand it.
src/Wima/WimaPlaner.h
View file @
071506a9
...
...
@@ -122,10 +122,12 @@ signals:
private
slots
:
void
recalcPolygonInteractivity
(
int
index
);
bool
calcArrivalAndReturnPath
(
void
);
bool
recalcJoinedArea
(
QString
&
errorString
);
void
pushToContainer
();
void
setDirtyTrue
();
// called by _updateTimer::timeout signal, updates different mission parts, if parameters (e.g. survey or areas) have changed
void
updateTimerSlot
();
private:
// Member Functions
WimaPlanData
toPlanData
();
...
...
@@ -145,4 +147,10 @@ private:
WimaCorridor
_corridor
;
// corridor connecting _measurementArea and _serviceArea
int
_arrivalPathLength
;
// the number waypoints the arrival path consists of (path from takeoff to first measurement point)
int
_returnPathLength
;
// the number waypoints the return path consists of (path from last measurement point to land)
CircularSurveyComplexItem
*
_circularSurvey
;
// pointer to the CircularSurvey item in _missionController.visualItems()
QTimer
_updateTimer
;
// on this timers timeout different mission parts will be updated, if parameters (e.g. survey or areas) have changed
QGeoCoordinate
_lastSurveyRefPoint
;
bool
_surveyRefChanging
;
};
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