Show min/max elevation in the track summary instead of up/down, it is more characteristic (up/down contains a lot of noise)

This commit is contained in:
sonora 2014-06-28 10:08:55 +02:00
parent 6e4d8ced8d
commit 98e1c1c30b

View file

@ -213,19 +213,27 @@ public class GpxSelectionHelper {
name += ", ";
name += GpxUiHelper.getColorValue(speedClr, OsmAndFormatter.getFormattedSpeed(analysis.avgSpeed, app));
}
if (analysis.isElevationSpecified() && (analysis.diffElevationUp > eleThreshold ||
analysis.diffElevationDown > eleThreshold) ) {
// Let's show min/max elevation in the track summary instead of up/down, it is more characteristic (up/down contains a lot of noise)
if (analysis.isElevationSpecified()) {
if (name.length() != 0)
name += ", ";
if(analysis.diffElevationDown > eleThreshold) {
name += GpxUiHelper.getColorValue(descClr, " \u2193 "+
OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app));
}
if(analysis.diffElevationUp > eleThreshold) {
name += GpxUiHelper.getColorValue(ascClr, " \u2191 "+
OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app));
}
name += GpxUiHelper.getColorValue(descClr, OsmAndFormatter.getFormattedAlt(analysis.minElevation, app));
name += " - ";
name += GpxUiHelper.getColorValue(ascClr, OsmAndFormatter.getFormattedAlt(analysis.maxElevation, app));
}
// if (analysis.isElevationSpecified() && (analysis.diffElevationUp > eleThreshold ||
// analysis.diffElevationDown > eleThreshold) ) {
// if (name.length() != 0)
// name += ", ";
// if(analysis.diffElevationDown > eleThreshold) {
// name += GpxUiHelper.getColorValue(descClr, " \u2193 "+
// OsmAndFormatter.getFormattedAlt(analysis.diffElevationDown, app));
// }
// if(analysis.diffElevationUp > eleThreshold) {
// name += GpxUiHelper.getColorValue(ascClr, " \u2191 "+
// OsmAndFormatter.getFormattedAlt(analysis.diffElevationUp, app));
// }
// }
item.name = name;
item.locationStart = analysis.locationStart;
item.locationEnd = analysis.locationEnd;