Merge pull request #500 from quaelnix/elevation-filter-regression-fix
Fix regression in elevation filter logic
This commit is contained in:
commit
c588daa68f
1 changed files with 5 additions and 6 deletions
|
@ -772,16 +772,15 @@ public class RoutingEngine extends Thread {
|
|||
if (ele_last != Short.MIN_VALUE) {
|
||||
ehb = ehb + (ele_last - ele) * eleFactor;
|
||||
}
|
||||
if (ehb > 10.) {
|
||||
ascend += ehb - 10.;
|
||||
ehb = 10.;
|
||||
} else if (ehb < 0.) {
|
||||
ehb = 0.;
|
||||
if (ehb > 0) {
|
||||
ascend += ehb;
|
||||
ehb = 0;
|
||||
} else if (ehb < -10) {
|
||||
ehb = -10;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
ascend += ehb;
|
||||
|
||||
t.ascend = (int) ascend;
|
||||
t.plainAscend = (int) ((ele_start - ele_end) * eleFactor + 0.5);
|
||||
|
|
Loading…
Reference in a new issue