diff --git a/OsmAnd/src/net/osmand/plus/GPXUtilities.java b/OsmAnd/src/net/osmand/plus/GPXUtilities.java index 2b49f5c89a..6ff72809b2 100644 --- a/OsmAnd/src/net/osmand/plus/GPXUtilities.java +++ b/OsmAnd/src/net/osmand/plus/GPXUtilities.java @@ -344,8 +344,8 @@ public class GPXUtilities { double totalSpeedSum = 0; points = 0; - double channelThresMin = 5; // Minimum oscillation amplitude considered as noise for Up/Down analysis - double channelThres = channelThresMin; // Actual oscillation amplitude considered as noise, try depedency on current hdop/getAccuracy + double channelThresMin = 10; // Minimum oscillation amplitude considered as relevant or as above noise for accumulated Ascent/Descent analysis + double channelThres = channelThresMin; // Actual oscillation amplitude considered as above noise (accomodates depedency on current VDOP/getAccuracy if desired) double channelBase; double channelTop; double channelBottom; @@ -424,8 +424,11 @@ public class GPXUtilities { hasSpeedInTrack = true; } - // Trend channel approach for elevation gain/loss, Hardy 2015-09-22 - // Self-adjusting turnarund threshold added for testing 2015-09-25: Current rule is now: "All up/down trends of amplitude channelTop) { channelTop = point.ele; - if (!Double.isNaN(point.hdop)) { - channelThres = Math.max(channelThres, 2.0 * point.hdop); //Use empirical 2*getAccuracy(vertical), this better serves very flat tracks or high dop tracks - } + //if (!Double.isNaN(point.hdop)) { + // channelThres = Math.max(channelThres, 2.0 * point.hdop); //Use empirical 2*getAccuracy(vertical), this better serves very flat tracks or high dop tracks + //} } else if (point.ele < channelBottom) { channelBottom = point.ele; - if (!Double.isNaN(point.hdop)) { - channelThres = Math.max(channelThres, 2.0 * point.hdop); - } + //if (!Double.isNaN(point.hdop)) { + // channelThres = Math.max(channelThres, 2.0 * point.hdop); + //} } // Turnaround (breakout) detection if ((point.ele <= (channelTop - channelThres)) && (climb == true)) {