mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-01 01:44:08 +00:00
I've added a static variable for the treshold minimum distance for cutting out the very close turns.
This commit is contained in:
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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user