mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +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
+4
+4
@@ -533,8 +533,12 @@ public abstract class AbstractRankingMetric implements RankingMetric {
|
||||
if (legWindwardDistance.compareTo(windwardDistanceFromLegStart) < 0) {
|
||||
d = d.add(legWindwardDistance);
|
||||
} else {
|
||||
// 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 {
|
||||
d = d.add(trackedLeg.getWindwardDistance(cache));
|
||||
|
||||
Reference in new issue
Block a user