Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qgroundcontrol
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Platzgummer
qgroundcontrol
Commits
bd1cddda
Commit
bd1cddda
authored
8 years ago
by
Don Gagne
Browse files
Options
Downloads
Patches
Plain Diff
Fix home position distance to 0.0
parent
711ee0b2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/MissionEditor/MissionItemStatus.qml
+1
-1
1 addition, 1 deletion
src/MissionEditor/MissionItemStatus.qml
src/MissionManager/MissionController.cc
+3
-3
3 additions, 3 deletions
src/MissionManager/MissionController.cc
with
4 additions
and
4 deletions
src/MissionEditor/MissionItemStatus.qml
+
1
−
1
View file @
bd1cddda
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/MissionManager/MissionController.cc
+
3
−
3
View file @
bd1cddda
...
@@ -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
&&
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment