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
9c9e2d14
Commit
9c9e2d14
authored
Mar 20, 2018
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Be careful of climb rates of 0
parent
c168ed75
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
48 deletions
+53
-48
TransectStyleComplexItem.cc
src/MissionManager/TransectStyleComplexItem.cc
+53
-48
No files found.
src/MissionManager/TransectStyleComplexItem.cc
View file @
9c9e2d14
...
@@ -500,7 +500,7 @@ int TransectStyleComplexItem::_maxPathHeight(const TerrainPathQuery::PathHeightI
...
@@ -500,7 +500,7 @@ int TransectStyleComplexItem::_maxPathHeight(const TerrainPathQuery::PathHeightI
void
TransectStyleComplexItem
::
_adjustForMaxRates
(
QList
<
CoordInfo_t
>&
transect
)
void
TransectStyleComplexItem
::
_adjustForMaxRates
(
QList
<
CoordInfo_t
>&
transect
)
{
{
double
maxClimbRate
=
_terrainAdjustMaxClimbRateFact
.
rawValue
().
toDouble
();
double
maxClimbRate
=
_terrainAdjustMaxClimbRateFact
.
rawValue
().
toDouble
();
double
maxDescentRate
=
-
_terrainAdjustMaxDescentRateFact
.
rawValue
().
toDouble
();
double
maxDescentRate
=
_terrainAdjustMaxDescentRateFact
.
rawValue
().
toDouble
();
double
flightSpeed
=
_missionFlightStatus
.
vehicleSpeed
;
double
flightSpeed
=
_missionFlightStatus
.
vehicleSpeed
;
if
(
qIsNaN
(
flightSpeed
)
||
(
maxClimbRate
==
0
&&
maxDescentRate
==
0
))
{
if
(
qIsNaN
(
flightSpeed
)
||
(
maxClimbRate
==
0
&&
maxDescentRate
==
0
))
{
...
@@ -510,6 +510,7 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
...
@@ -510,6 +510,7 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
return
;
return
;
}
}
if
(
maxClimbRate
>
0
)
{
// Adjust climb rates
// Adjust climb rates
bool
climbRateAdjusted
;
bool
climbRateAdjusted
;
do
{
do
{
...
@@ -534,9 +535,12 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
...
@@ -534,9 +535,12 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
}
}
}
}
}
while
(
climbRateAdjusted
);
}
while
(
climbRateAdjusted
);
}
if
(
maxDescentRate
>
0
)
{
// Adjust descent rates
// Adjust descent rates
bool
descentRateAdjusted
;
bool
descentRateAdjusted
;
maxDescentRate
=
-
maxDescentRate
;
do
{
do
{
//qDebug() << "descent rate pass";
//qDebug() << "descent rate pass";
descentRateAdjusted
=
false
;
descentRateAdjusted
=
false
;
...
@@ -559,6 +563,7 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
...
@@ -559,6 +563,7 @@ void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect)
}
}
}
}
}
while
(
descentRateAdjusted
);
}
while
(
descentRateAdjusted
);
}
}
}
void
TransectStyleComplexItem
::
_adjustForTolerance
(
QList
<
CoordInfo_t
>&
transect
)
void
TransectStyleComplexItem
::
_adjustForTolerance
(
QList
<
CoordInfo_t
>&
transect
)
...
...
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