I've added a static variable for the treshold minimum distance for cutting out the very close turns.

This commit is contained in:
I077899 committed 2013-03-06 11:10:00 +02:00
1 parent e0f7a68cd6
commit fccfee26a0
1 file changed
+2 -3
@@ -272,8 +272,7 @@ public class PathImpl implements Path, Serializable {
}
}
return eliminateVeryCloseTurns(list, 15.0);
// return list;
return eliminateVeryCloseTurns(list, THRESHOLD_DISTANCE_METERS);
}
public static List<TimedPositionWithSpeed> eliminateVeryCloseTurns(List<TimedPositionWithSpeed> turns, double tresholdDistanceMeters) {
@@ -296,7 +295,7 @@ public class PathImpl implements Path, Serializable {
} else {
if (clusterFound) {
clusterFound = false;
goodTurns.add(turns.get(clusterStart + clusterEnd / 2));
goodTurns.add(turns.get((clusterStart + clusterEnd) / 2));
} else {
goodTurns.add(turns.get(index));
}