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
c18d3e09
Commit
c18d3e09
authored
May 04, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix alt=0 bug
parent
535ff2ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
TransectStyleComplexItem.cc
src/MissionManager/TransectStyleComplexItem.cc
+17
-14
No files found.
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
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