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
c18d3e09
Commit
c18d3e09
authored
May 04, 2018
by
DonLakeFlyer
Browse files
Fix alt=0 bug
parent
535ff2ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/MissionManager/TransectStyleComplexItem.cc
View file @
c18d3e09
...
...
@@ -349,7 +349,23 @@ void TransectStyleComplexItem::_rebuildTransects(void)
_rebuildTransectsPhase1
();
_queryTransectsPathHeightInfo
();
if
(
_followTerrain
)
{
// Query the terrain data. Once available terrain heights will be calculated
_queryTransectsPathHeightInfo
();
}
else
{
// Not following terrain, just add requested altitude to coords
double
requestedAltitude
=
_cameraCalc
.
distanceToSurface
()
->
rawValue
().
toDouble
();
for
(
int
i
=
0
;
i
<
_transects
.
count
();
i
++
)
{
QList
<
CoordInfo_t
>&
transect
=
_transects
[
i
];
for
(
int
j
=
0
;
j
<
transect
.
count
();
j
++
)
{
QGeoCoordinate
&
coord
=
transect
[
j
].
coord
;
coord
.
setAltitude
(
requestedAltitude
);
}
}
}
// Generate the visuals transect representation
_visualTransectPoints
.
clear
();
...
...
@@ -455,19 +471,6 @@ void TransectStyleComplexItem::_adjustTransectsForTerrain(void)
}
emit
lastSequenceNumberChanged
(
lastSequenceNumber
());
}
else
{
// Not following terrain show just add requested altitude to coords
double
requestedAltitude
=
_cameraCalc
.
distanceToSurface
()
->
rawValue
().
toDouble
();
for
(
int
i
=
0
;
i
<
_transects
.
count
();
i
++
)
{
QList
<
CoordInfo_t
>&
transect
=
_transects
[
i
];
for
(
int
j
=
0
;
j
<
transect
.
count
();
j
++
)
{
QGeoCoordinate
&
coord
=
transect
[
j
].
coord
;
coord
.
setAltitude
(
requestedAltitude
);
}
}
}
}
...
...
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