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:
Axel Uhl committed 2015-04-21 10:51:13 +02:00
1 parent d334099dd0
commit d2e318899c
2 files changed
+10 -22

No files matched your search

@@ -40,12 +40,6 @@ public class OneDesignRankingMetric implements RankingMetric {
return result; return result;
} }
@Override
public Duration getCorrectedTime(TrackedLegOfCompetitor leg, TimePoint timePoint,
WindLegTypeAndLegBearingCache cache) {
return leg.getTime(timePoint);
}
@Override @Override
public Duration getCorrectedTime(TrackedRace trackedRace, Competitor competitor, TimePoint timePoint, public Duration getCorrectedTime(TrackedRace trackedRace, Competitor competitor, TimePoint timePoint,
WindLegTypeAndLegBearingCache cache) { WindLegTypeAndLegBearingCache cache) {
@@ -56,27 +56,21 @@ public interface RankingMetric {
Duration getTimeToImprove(TrackedRace trackedRace, Competitor trailing, Competitor leading, TimePoint timePoint, Duration getTimeToImprove(TrackedRace trackedRace, Competitor trailing, Competitor leading, TimePoint timePoint,
WindLegTypeAndLegBearingCache cache); 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 * 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 * <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 * metric? If the competitor hasn't started the race yet at <code>timePoint</code>, <code>null</code> is returned.
* the competitor has finished the race already at <code>timePoint</code>, the time it took the competitor to * 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 * 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 * The result will also be <code>null</code> if the course does not have any waypoints or the race hasn't started
* at <code>timePoint</code>. * 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); Duration getCorrectedTime(TrackedRace trackedRace, Competitor competitor, TimePoint timePoint, WindLegTypeAndLegBearingCache cache);
} }