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
bd1cddda
Commit
bd1cddda
authored
Jul 06, 2016
by
Don Gagne
Browse files
Fix home position distance to 0.0
parent
711ee0b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/MissionEditor/MissionItemStatus.qml
View file @
bd1cddda
...
...
@@ -34,7 +34,7 @@ Rectangle {
property
bool
_expanded
:
true
property
real
_distance
:
_statusValid
?
_currentMissionItem
.
distance
:
0
property
real
_altDifference
:
_statusValid
?
_currentMissionItem
.
altDifference
:
0
property
real
_gradient
:
_statusValid
?
Math
.
atan
(
_currentMissionItem
.
altDifference
/
_currentMissionItem
.
distance
)
:
0
property
real
_gradient
:
_statusValid
||
_currentMissionItem
.
distance
==
0
?
Math
.
atan
(
_currentMissionItem
.
altDifference
/
_currentMissionItem
.
distance
)
:
0
property
real
_gradientPercent
:
isNaN
(
_gradient
)
?
0
:
_gradient
*
100
property
real
_azimuth
:
_statusValid
?
_currentMissionItem
.
azimuth
:
-
1
property
bool
_statusValid
:
currentMissionItem
!=
undefined
...
...
src/MissionManager/MissionController.cc
View file @
bd1cddda
...
...
@@ -596,7 +596,7 @@ void MissionController::_calcPrevWaypointValues(double homeAlt, VisualMissionIte
}
else
{
*
altDifference
=
0.0
;
*
azimuth
=
0.0
;
*
distance
=
-
1
.0
;
// Signals no values
*
distance
=
0
.0
;
}
}
...
...
@@ -708,7 +708,7 @@ void MissionController::_recalcAltitudeRangeBearing()
// No values for first item
lastCoordinateItem
->
setAltDifference
(
0.0
);
lastCoordinateItem
->
setAzimuth
(
0.0
);
lastCoordinateItem
->
setDistance
(
-
1
.0
);
lastCoordinateItem
->
setDistance
(
0
.0
);
double
minAltSeen
=
0.0
;
double
maxAltSeen
=
0.0
;
...
...
@@ -721,7 +721,7 @@ void MissionController::_recalcAltitudeRangeBearing()
// Assume the worst
item
->
setAzimuth
(
0.0
);
item
->
setDistance
(
-
1
.0
);
item
->
setDistance
(
0
.0
);
// If we still haven't found the first coordinate item and we hit a a takeoff command link back to home
if
(
firstCoordinateItem
&&
...
...
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