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
6f7ec666
Commit
6f7ec666
authored
Jul 06, 2016
by
Don Gagne
Committed by
GitHub
Jul 06, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3737 from DonLakeFlyer/HomeDistance
Fix home position distance to 0.0
parents
4a39f75a
bd1cddda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
MissionItemStatus.qml
src/MissionEditor/MissionItemStatus.qml
+1
-1
MissionController.cc
src/MissionManager/MissionController.cc
+3
-3
No files found.
src/MissionEditor/MissionItemStatus.qml
View file @
6f7ec666
...
@@ -34,7 +34,7 @@ Rectangle {
...
@@ -34,7 +34,7 @@ Rectangle {
property
bool
_expanded
:
true
property
bool
_expanded
:
true
property
real
_distance
:
_statusValid
?
_currentMissionItem
.
distance
:
0
property
real
_distance
:
_statusValid
?
_currentMissionItem
.
distance
:
0
property
real
_altDifference
:
_statusValid
?
_currentMissionItem
.
altDifference
:
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
_gradientPercent
:
isNaN
(
_gradient
)
?
0
:
_gradient
*
100
property
real
_azimuth
:
_statusValid
?
_currentMissionItem
.
azimuth
:
-
1
property
real
_azimuth
:
_statusValid
?
_currentMissionItem
.
azimuth
:
-
1
property
bool
_statusValid
:
currentMissionItem
!=
undefined
property
bool
_statusValid
:
currentMissionItem
!=
undefined
...
...
src/MissionManager/MissionController.cc
View file @
6f7ec666
...
@@ -596,7 +596,7 @@ void MissionController::_calcPrevWaypointValues(double homeAlt, VisualMissionIte
...
@@ -596,7 +596,7 @@ void MissionController::_calcPrevWaypointValues(double homeAlt, VisualMissionIte
}
else
{
}
else
{
*
altDifference
=
0.0
;
*
altDifference
=
0.0
;
*
azimuth
=
0.0
;
*
azimuth
=
0.0
;
*
distance
=
-
1.0
;
// Signals no values
*
distance
=
0.0
;
}
}
}
}
...
@@ -708,7 +708,7 @@ void MissionController::_recalcAltitudeRangeBearing()
...
@@ -708,7 +708,7 @@ void MissionController::_recalcAltitudeRangeBearing()
// No values for first item
// No values for first item
lastCoordinateItem
->
setAltDifference
(
0.0
);
lastCoordinateItem
->
setAltDifference
(
0.0
);
lastCoordinateItem
->
setAzimuth
(
0.0
);
lastCoordinateItem
->
setAzimuth
(
0.0
);
lastCoordinateItem
->
setDistance
(
-
1
.0
);
lastCoordinateItem
->
setDistance
(
0
.0
);
double
minAltSeen
=
0.0
;
double
minAltSeen
=
0.0
;
double
maxAltSeen
=
0.0
;
double
maxAltSeen
=
0.0
;
...
@@ -721,7 +721,7 @@ void MissionController::_recalcAltitudeRangeBearing()
...
@@ -721,7 +721,7 @@ void MissionController::_recalcAltitudeRangeBearing()
// Assume the worst
// Assume the worst
item
->
setAzimuth
(
0.0
);
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 we still haven't found the first coordinate item and we hit a a takeoff command link back to home
if
(
firstCoordinateItem
&&
if
(
firstCoordinateItem
&&
...
...
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