mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-25 06:58:39 +00:00
fixed calculation of corrected times in ToT/ToD calculations;
was using duration since race start but has to use duration the competitor sailed which may be limited by a finish mark passing Change-Id: I09983c395554d367b54c0bb54ca2824ba9b3a550
This commit is contained in:
+1
-1
@@ -98,7 +98,7 @@ public abstract class NonPerformanceCurveRankingMetric extends AbstractRankingMe
|
||||
final Duration calculatedTime = getCalculatedTime(competitor,
|
||||
() -> getTrackedRace().getCurrentLeg(competitor, timePoint).getLeg(), () -> getTrackedRace()
|
||||
.getTrack(competitor).getEstimatedPosition(timePoint, /* extrapolated */true),
|
||||
actualRaceDuration, totalWindwardDistanceTraveled);
|
||||
getTrackedRace().getTimeSailedSinceRaceStart(competitor, timePoint), totalWindwardDistanceTraveled);
|
||||
RankingMetric.CompetitorRankingInfo rankingInfo = new CompetitorRankingInfoImpl(timePoint, competitor,
|
||||
getWindwardDistanceTraveled(competitor, timePoint, cache), actualRaceDuration, calculatedTime,
|
||||
predictedDurationToReachWindwardPositionOfCompetitorFarthestAhead,
|
||||
|
||||
@@ -8,8 +8,9 @@ public abstract class AbstractDuration implements Duration {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return ""+Util.padPositiveValue((int) asHours(), 2, 0, /* round */ false)+":"+
|
||||
Util.padPositiveValue(asMinutes()%60, 2, 0, /* round */ false)+":"+
|
||||
Util.padPositiveValue(asSeconds()%60, 2, 3, /* round */ true);
|
||||
return (Math.signum(asHours()) < 0 ? "-" : "")+
|
||||
Util.padPositiveValue((int) Math.abs(asHours()), 2, 0, /* round */ false)+":"+
|
||||
Util.padPositiveValue(Math.abs(asMinutes())%60, 2, 0, /* round */ false)+":"+
|
||||
Util.padPositiveValue(Math.abs(asSeconds())%60, 2, 3, /* round */ true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user