mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-02 17:19:37 +00:00
removed getCorrectedTime for leg again; corrected times should always be relative to the entire race, if needed taken for a particular mark passing time
This commit is contained in:
1 parent
d334099dd0
commit
d2e318899c
2 files changed
+10
-22
No files matched your search
-6
@@ -40,12 +40,6 @@ public class OneDesignRankingMetric implements RankingMetric {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration getCorrectedTime(TrackedLegOfCompetitor leg, TimePoint timePoint,
|
||||
WindLegTypeAndLegBearingCache cache) {
|
||||
return leg.getTime(timePoint);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Duration getCorrectedTime(TrackedRace trackedRace, Competitor competitor, TimePoint timePoint,
|
||||
WindLegTypeAndLegBearingCache cache) {
|
||||
|
||||
@@ -56,27 +56,21 @@ public interface RankingMetric {
|
||||
Duration getTimeToImprove(TrackedRace trackedRace, Competitor trailing, Competitor leading, TimePoint timePoint,
|
||||
WindLegTypeAndLegBearingCache cache);
|
||||
|
||||
/**
|
||||
* How much time did the {@link TrackedLegOfCompetitor#getCompetitor() competitor} spend in the
|
||||
* {@link TrackedLegOfCompetitor#getLeg() leg} at <code>timePoint</code>, corrected by the handicapping rules
|
||||
* defined by this ranking metric? If the competitor hasn't started the leg yet at <code>timePoint</code>,
|
||||
* <code>null</code> is returned. If the competitor has finished the leg already at <code>timePoint</code>, the time
|
||||
* it took the competitor to complete the leg, corrected by any handicap, is returned. If the competitor didn't
|
||||
* finish the leg before the end of tracking, <code>null</code> is returned because this indicates that the tracker
|
||||
* stopped sending valid data.
|
||||
*/
|
||||
Duration getCorrectedTime(TrackedLegOfCompetitor leg, TimePoint timePoint, WindLegTypeAndLegBearingCache cache);
|
||||
|
||||
/**
|
||||
* How much time did the <code>competitor</code> spend in the {@link TrackedRace#getRace() race} described by
|
||||
* <code>trackedRace</code> at <code>timePoint</code>, corrected by the handicapping rules defined by this ranking
|
||||
* metric? If the competitor hasn't started the race yet at <code>timePoint</code>, <code>null</code> is returned. If
|
||||
* the competitor has finished the race already at <code>timePoint</code>, the time it took the competitor to
|
||||
* metric? If the competitor hasn't started the race yet at <code>timePoint</code>, <code>null</code> is returned.
|
||||
* If the competitor has finished the race already at <code>timePoint</code>, the time it took the competitor to
|
||||
* complete the race, corrected by any handicap, is returned. If the competitor didn't finish the leg before the end
|
||||
* of tracking, <code>null</code> is returned because this indicates that the tracker stopped sending valid data.<p>
|
||||
* of tracking, <code>null</code> is returned because this indicates that the tracker stopped sending valid data.
|
||||
* <p>
|
||||
*
|
||||
* The result will also be <code>null</code> if the course does not have any waypoints or the race hasn't started yet
|
||||
* at <code>timePoint</code>.
|
||||
* The result will also be <code>null</code> if the course does not have any waypoints or the race hasn't started
|
||||
* yet at <code>timePoint</code>.
|
||||
* <p>
|
||||
*
|
||||
* This method can also be used to calculate the corrected times at the end of each leg, simply by passing the time
|
||||
* when the competitor finished the respective leg as <code>timePoint</code>.
|
||||
*/
|
||||
Duration getCorrectedTime(TrackedRace trackedRace, Competitor competitor, TimePoint timePoint, WindLegTypeAndLegBearingCache cache);
|
||||
}
|
||||
Reference in new issue
Block a user