Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ec0f015d
Commit
ec0f015d
authored
May 21, 2018
by
DonLakeFlyer
Browse files
Fix standalone coords affecting time/distance
parent
65ebabe4
Changes
2
Show whitespace changes
Inline
Side-by-side
src/MissionManager/MavCmdInfoCommon.json
View file @
ec0f015d
...
...
@@ -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 @
ec0f015d
...
...
@@ -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,11 +1396,11 @@ void MissionController::_recalcMissionFlightStatus()
}
item
->
setMissionFlightStatus
(
_missionFlightStatus
);
}
lastCoordinateItem
=
item
;
}
}
}
lastCoordinateItem
->
setMissionVehicleYaw
(
_missionFlightStatus
.
vehicleYaw
);
if
(
linkEndToHome
&&
lastCoordinateItem
!=
_settingsItem
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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