bug fix in min/max elevation
This commit is contained in:
parent
a9d7b0b684
commit
a7d21c3089
1 changed files with 5 additions and 3 deletions
|
@ -115,6 +115,7 @@ public class LocalIndexHelper {
|
||||||
double diffElevationUp = 0;
|
double diffElevationUp = 0;
|
||||||
double diffElevationDown = 0;
|
double diffElevationDown = 0;
|
||||||
double totalElevation = 0;
|
double totalElevation = 0;
|
||||||
|
double Elevation = 0;
|
||||||
double minElevation = 99999;
|
double minElevation = 99999;
|
||||||
double maxElevation = 0;
|
double maxElevation = 0;
|
||||||
|
|
||||||
|
@ -140,9 +141,10 @@ public class LocalIndexHelper {
|
||||||
speedCount ++;
|
speedCount ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
totalElevation += subtrack.get(j).getAltitude();
|
Elevation = subtrack.get(j).getAltitude();
|
||||||
minElevation = Math.min(totalElevation, minElevation);
|
totalElevation += Elevation;
|
||||||
maxElevation = Math.max(totalElevation, maxElevation);
|
minElevation = Math.min(Elevation, minElevation);
|
||||||
|
maxElevation = Math.max(Elevation, maxElevation);
|
||||||
if (j > 0) {
|
if (j > 0) {
|
||||||
double diff = subtrack.get(j).getAltitude() - subtrack.get(j - 1).getAltitude();
|
double diff = subtrack.get(j).getAltitude() - subtrack.get(j - 1).getAltitude();
|
||||||
if(diff > 0){
|
if(diff > 0){
|
||||||
|
|
Loading…
Reference in a new issue