Merge remote-tracking branch 'server/master'

This commit is contained in:
Axel Uhl
2020-10-15 16:07:19 +02:00
28 changed files with 409 additions and 172 deletions
@@ -372,6 +372,7 @@ public enum DetailType implements Serializable {
allowed.add(RACE_IMPLIED_WIND);
allowed.add(RACE_CALCULATED_TIME_AT_ESTIMATED_ARRIVAL_AT_COMPETITOR_FARTHEST_AHEAD);
allowed.add(RACE_CURRENT_SPEED_OVER_GROUND_IN_KNOTS);
allowed.add(RACE_CURRENT_COURSE_OVER_GROUND_IN_TRUE_DEGREES);
allowed.add(RACE_CURRENT_DISTANCE_FOILED_IN_METERS);
allowed.add(RACE_CURRENT_DURATION_FOILED_IN_SECONDS);
allowed.add(RACE_DISTANCE_TO_COMPETITOR_FARTHEST_AHEAD_IN_METERS);
@@ -5,6 +5,7 @@ import java.util.List;
import com.sap.sailing.domain.common.MaxPointsReason;
import com.sap.sailing.domain.common.RaceIdentifier;
import com.sap.sailing.domain.common.SpeedWithBearing;
import com.sap.sailing.domain.common.Tack;
import com.sap.sailing.domain.common.impl.MeterDistance;
import com.sap.sse.common.Bearing;
@@ -141,6 +142,8 @@ public class LeaderboardEntryDTO implements Serializable {
* farthest ahead for all subsequent legs.
*/
public Duration calculatedTimeAtEstimatedArrivalAtCompetitorFarthestAhead;
public SpeedWithBearing currentSpeedAndCourseOverGround;
/**
* If <code>null</code>, no leg details are known yet, the race is not being tracked or the details
@@ -618,6 +621,8 @@ public class LeaderboardEntryDTO implements Serializable {
result = prime * result + ((calculatedTime == null) ? 0 : calculatedTime.hashCode());
result = prime * result + ((calculatedTimeAtEstimatedArrivalAtCompetitorFarthestAhead == null) ? 0
: calculatedTimeAtEstimatedArrivalAtCompetitorFarthestAhead.hashCode());
result = prime * result + ((currentSpeedAndCourseOverGround == null) ? 0
: currentSpeedAndCourseOverGround.hashCode());
result = prime * result + (discarded ? 1231 : 1237);
result = prime * result + ((distanceToStarboardSideOfStartLineInMeters == null) ? 0
: distanceToStarboardSideOfStartLineInMeters.hashCode());
@@ -703,6 +708,12 @@ public class LeaderboardEntryDTO implements Serializable {
} else if (!calculatedTimeAtEstimatedArrivalAtCompetitorFarthestAhead
.equals(other.calculatedTimeAtEstimatedArrivalAtCompetitorFarthestAhead))
return false;
if (currentSpeedAndCourseOverGround == null) {
if (other.currentSpeedAndCourseOverGround != null)
return false;
} else if (!currentSpeedAndCourseOverGround
.equals(other.currentSpeedAndCourseOverGround))
return false;
if (discarded != other.discarded)
return false;
if (distanceToStarboardSideOfStartLineInMeters == null) {