mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-26 23:46:36 +00:00
turned timeInMilliseconds into a Long, returning null if leg hasn't started yet
This commit is contained in:
+4
-4
@@ -18,11 +18,11 @@ public interface TrackedLegOfCompetitor {
|
||||
|
||||
/**
|
||||
* How much time did the {@link #getCompetitor competitor} spend in this {@link #getLeg() leg} at
|
||||
* <code>timePoint</code>? If the competitor hasn't started the leg yet at <code>timePoint</code>, 0 is returned. If the
|
||||
* competitor has finished the leg already at <code>timePoint</code>, the time it took the competitor to
|
||||
* complete the leg is returned.
|
||||
* <code>timePoint</code>? 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 is returned.
|
||||
*/
|
||||
long getTimeInMilliSeconds(TimePoint timePoint);
|
||||
Long getTimeInMilliSeconds(TimePoint timePoint);
|
||||
|
||||
/**
|
||||
* The distance over ground traveled by the competitor in this leg up to <code>timePoint</code>. If
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ public class LegEntryDTO implements IsSerializable {
|
||||
public Double currentSpeedOverGroundInKnots;
|
||||
public Double velocityMadeGoodInKnots;
|
||||
public Double windwardDistanceToGoInMeters;
|
||||
public long timeInMilliseconds;
|
||||
public Long timeInMilliseconds;
|
||||
public boolean started;
|
||||
public boolean finished;
|
||||
public Integer numberOfJibes;
|
||||
|
||||
+2
-1
@@ -76,7 +76,8 @@ public class GPSPerRace extends Action {
|
||||
posGL = legRank - previousLeg.getTrackedLeg(competitor).getRank(time);
|
||||
}
|
||||
final Double gapToLeader = trackedLegOfCompetitor.getGapToLeaderInSeconds(time);
|
||||
final double legTime = 1. / 1000. * trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final Long timeInMilliSeconds = trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final double legTime = 1. / 1000. * (timeInMilliSeconds==null?0:timeInMilliSeconds);
|
||||
final Speed avgSpeed = trackedLegOfCompetitor.getAverageSpeedOverGround(time);
|
||||
final Distance distanceSailed = trackedLegOfCompetitor.getDistanceTraveled(time);
|
||||
|
||||
|
||||
+2
-1
@@ -74,7 +74,8 @@ public class RankPerLeg extends Action {
|
||||
posGL = legRank - previousLeg.getTrackedLeg(competitor).getRank(time);
|
||||
}
|
||||
final Double gapToLeader = trackedLegOfCompetitor.getGapToLeaderInSeconds(time);
|
||||
final double legTime = 1. / 1000. * trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final Long timeInMilliSeconds = trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final double legTime = 1. / 1000. * (timeInMilliSeconds==null?0:timeInMilliSeconds);
|
||||
final Speed avgSpeed = trackedLegOfCompetitor.getAverageSpeedOverGround(time);
|
||||
final Distance distanceSailed = trackedLegOfCompetitor.getDistanceTraveled(time);
|
||||
|
||||
|
||||
+2
-1
@@ -79,7 +79,8 @@ public class RankPerLeg2 extends Action {
|
||||
posGL = legRank - previousLeg.getTrackedLeg(competitor).getRank(time);
|
||||
}
|
||||
final Double gapToLeader = trackedLegOfCompetitor.getGapToLeaderInSeconds(time);
|
||||
final double legTime = 1. / 1000. * trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final Long timeInMilliSeconds = trackedLegOfCompetitor.getTimeInMilliSeconds(time);
|
||||
final double legTime = 1. / 1000. * (timeInMilliSeconds==null?0:timeInMilliSeconds);
|
||||
final Speed avgSpeed = trackedLegOfCompetitor.getAverageSpeedOverGround(time);
|
||||
final Distance distanceSailed = trackedLegOfCompetitor.getDistanceTraveled(time);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user