mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-29 15:27:14 +00:00
avoid reducing windward distance traveled in case a competitor is at the mark rounding and has a negative windward distance traveled for the current leg
This commit is contained in:
1 parent
2d11ab9a31
commit
9bc3fddebc
1 file changed
+5
-1
+5
-1
@@ -533,7 +533,11 @@ public abstract class AbstractRankingMetric implements RankingMetric {
|
||||
if (legWindwardDistance.compareTo(windwardDistanceFromLegStart) < 0) {
|
||||
d = d.add(legWindwardDistance);
|
||||
} else {
|
||||
d = d.add(windwardDistanceFromLegStart);
|
||||
// if the competitor is currently at the mark rounding, the windward distance within the leg may
|
||||
// be negative; don't reduce the distance in this case
|
||||
if (windwardDistanceFromLegStart.getMeters() > 0) {
|
||||
d = d.add(windwardDistanceFromLegStart);
|
||||
}
|
||||
}
|
||||
break;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user