remove heuristic test code - should be ok for now
This commit is contained in:
parent
27bc276b3a
commit
cc8b8f85e1
2 changed files with 13 additions and 16 deletions
|
@ -251,9 +251,9 @@ public class GPXUtilities {
|
||||||
public long startTime = Long.MAX_VALUE;
|
public long startTime = Long.MAX_VALUE;
|
||||||
public long endTime = Long.MIN_VALUE;
|
public long endTime = Long.MIN_VALUE;
|
||||||
public long timeSpan = 0;
|
public long timeSpan = 0;
|
||||||
//*****Issue 3222, for testing only
|
//Next few lines for Issue 3222 heuristic testing only
|
||||||
public long timeMoving0 = 0;
|
//public long timeMoving0 = 0;
|
||||||
public float totalDistanceMoving0 = 0;
|
//public float totalDistanceMoving0 = 0;
|
||||||
public long timeMoving = 0;
|
public long timeMoving = 0;
|
||||||
public float totalDistanceMoving = 0;
|
public float totalDistanceMoving = 0;
|
||||||
|
|
||||||
|
@ -424,17 +424,15 @@ public class GPXUtilities {
|
||||||
// Motion detection:
|
// Motion detection:
|
||||||
// speed > 0 uses GPS chipset's motion detection
|
// speed > 0 uses GPS chipset's motion detection
|
||||||
// calculations[0] > minDisplacment * time is heuristic needed because tracks may be filtered at recording time, so points at rest may not be present in file at all
|
// calculations[0] > minDisplacment * time is heuristic needed because tracks may be filtered at recording time, so points at rest may not be present in file at all
|
||||||
|
|
||||||
//*****Issue 3222, for testing only
|
|
||||||
if (speed > 0 && point.time != 0 && prev.time != 0) {
|
|
||||||
timeMoving0 = timeMoving0 + (point.time - prev.time);
|
|
||||||
totalDistanceMoving0 += calculations[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((speed > 0) && (calculations[0] > 0.1 / 1000f * (point.time - prev.time)) && point.time != 0 && prev.time != 0) {
|
if ((speed > 0) && (calculations[0] > 0.1 / 1000f * (point.time - prev.time)) && point.time != 0 && prev.time != 0) {
|
||||||
timeMoving = timeMoving + (point.time - prev.time);
|
timeMoving = timeMoving + (point.time - prev.time);
|
||||||
totalDistanceMoving += calculations[0];
|
totalDistanceMoving += calculations[0];
|
||||||
}
|
}
|
||||||
|
//Next few lines for Issue 3222 heuristic testing only
|
||||||
|
// if (speed > 0 && point.time != 0 && prev.time != 0) {
|
||||||
|
// timeMoving0 = timeMoving0 + (point.time - prev.time);
|
||||||
|
// totalDistanceMoving0 += calculations[0];
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,12 +133,11 @@ public class GpxUiHelper {
|
||||||
|
|
||||||
// 3. Time moving, if any
|
// 3. Time moving, if any
|
||||||
if (analysis.isTimeMoving()) {
|
if (analysis.isTimeMoving()) {
|
||||||
//*****Issue 3222, for testing only
|
//Next few lines for Issue 3222 heuristic testing only
|
||||||
final String formatDuration0 = Algorithms.formatDuration((int) (analysis.timeMoving0 / 1000), app.accessibilityEnabled());
|
//final String formatDuration0 = Algorithms.formatDuration((int) (analysis.timeMoving0 / 1000), app.accessibilityEnabled());
|
||||||
description.append(nl).append(app.getString(R.string.gpx_timemoving,
|
//description.append(nl).append(app.getString(R.string.gpx_timemoving,
|
||||||
getColorValue(timeSpanClr, formatDuration0, html)));
|
// getColorValue(timeSpanClr, formatDuration0, html)));
|
||||||
description.append(" (" + getColorValue(distanceClr, OsmAndFormatter.getFormattedDistance(analysis.totalDistanceMoving0, app), html) + ")");
|
//description.append(" (" + getColorValue(distanceClr, OsmAndFormatter.getFormattedDistance(analysis.totalDistanceMoving0, app), html) + ")");
|
||||||
|
|
||||||
final String formatDuration = Algorithms.formatDuration((int) (analysis.timeMoving / 1000), app.accessibilityEnabled());
|
final String formatDuration = Algorithms.formatDuration((int) (analysis.timeMoving / 1000), app.accessibilityEnabled());
|
||||||
description.append(nl).append(app.getString(R.string.gpx_timemoving,
|
description.append(nl).append(app.getString(R.string.gpx_timemoving,
|
||||||
getColorValue(timeSpanClr, formatDuration, html)));
|
getColorValue(timeSpanClr, formatDuration, html)));
|
||||||
|
|
Loading…
Reference in a new issue