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
c08ae502
Unverified
Commit
c08ae502
authored
May 21, 2018
by
Don Gagne
Committed by
GitHub
May 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6478 from DonLakeFlyer/ROIDistance
Fix standalone coords affecting time/distance
parents
5ad6fdf2
ec0f015d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
MavCmdInfoCommon.json
src/MissionManager/MavCmdInfoCommon.json
+1
-0
MissionController.cc
src/MissionManager/MissionController.cc
+9
-8
No files found.
src/MissionManager/MavCmdInfoCommon.json
View file @
c08ae502
...
...
@@ -640,6 +640,7 @@
"friendlyName"
:
"ROI to next waypoint"
,
"description"
:
"Sets the region of interest to point towards the next waypoint with optional offsets."
,
"specifiesCoordinate"
:
false
,
"standaloneCoordinate"
:
true
,
"friendlyEdit"
:
true
,
"category"
:
"Camera"
,
"param5"
:
{
...
...
src/MissionManager/MissionController.cc
View file @
c08ae502
...
...
@@ -1343,12 +1343,6 @@ void MissionController::_recalcMissionFlightStatus()
_addCommandTimeDelay
(
simpleItem
,
vtolInHover
);
if
(
item
->
specifiesCoordinate
())
{
// Update vehicle yaw assuming direction to next waypoint
if
(
item
!=
lastCoordinateItem
)
{
_missionFlightStatus
.
vehicleYaw
=
lastCoordinateItem
->
exitCoordinate
().
azimuthTo
(
item
->
coordinate
());
lastCoordinateItem
->
setMissionVehicleYaw
(
_missionFlightStatus
.
vehicleYaw
);
}
// Keep track of the min/max altitude for all waypoints so we can show altitudes as a percentage
double
absoluteAltitude
=
item
->
coordinate
().
altitude
();
...
...
@@ -1366,6 +1360,13 @@ void MissionController::_recalcMissionFlightStatus()
if
(
!
item
->
isStandaloneCoordinate
())
{
firstCoordinateItem
=
false
;
// Update vehicle yaw assuming direction to next waypoint
if
(
item
!=
lastCoordinateItem
)
{
_missionFlightStatus
.
vehicleYaw
=
lastCoordinateItem
->
exitCoordinate
().
azimuthTo
(
item
->
coordinate
());
lastCoordinateItem
->
setMissionVehicleYaw
(
_missionFlightStatus
.
vehicleYaw
);
}
if
(
lastCoordinateItem
!=
_settingsItem
||
linkStartToHome
)
{
// This is a subsequent waypoint or we are forcing the first waypoint back to home
double
azimuth
,
distance
,
altDifference
;
...
...
@@ -1395,9 +1396,9 @@ void MissionController::_recalcMissionFlightStatus()
}
item
->
setMissionFlightStatus
(
_missionFlightStatus
);
}
lastCoordinateItem
=
item
;
lastCoordinateItem
=
item
;
}
}
}
lastCoordinateItem
->
setMissionVehicleYaw
(
_missionFlightStatus
.
vehicleYaw
);
...
...
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