diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/DetailType.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/DetailType.java index ca3f9cea993..62c2c35a37f 100755 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/DetailType.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/DetailType.java @@ -117,77 +117,89 @@ public enum DetailType implements Serializable { CHART_BEAT_ANGLE(0, ASCENDING, "BEAT_ANGLE"), CHART_COURSE_OVER_GROUND_TRUE_DEGREES(0, ASCENDING, "COURSE_OVER_GROUND_TRUE_DEGREES"), OVERALL_TOTAL_SCORED_RACE_COUNT(0, ASCENDING, "TOTAL_SCORED_RACE_COUNT"), - EXPEDITION_RACE_AWA(0, ASCENDING), - EXPEDITION_RACE_AWS(0, ASCENDING), - EXPEDITION_RACE_TWA(0, ASCENDING), - EXPEDITION_RACE_TWS(0, ASCENDING), - EXPEDITION_RACE_TWD(0, ASCENDING), - EXPEDITION_RACE_TARG_TWA(0, ASCENDING), - EXPEDITION_RACE_BOAT_SPEED(0, ASCENDING), - EXPEDITION_RACE_TARG_BOAT_SPEED(0, ASCENDING), - EXPEDITION_RACE_SOG(0, ASCENDING), - EXPEDITION_RACE_COG(0, ASCENDING), - EXPEDITION_RACE_FORESTAY_LOAD(0, ASCENDING), - EXPEDITION_RACE_RAKE(0, ASCENDING), - EXPEDITION_RACE_COURSE(0, ASCENDING), - EXPEDITION_RACE_HEADING(0, ASCENDING), - EXPEDITION_RACE_VMG(0, ASCENDING), - EXPEDITION_RACE_VMG_TARG_VMG_DELTA(0, ASCENDING), - EXPEDITION_RACE_RATE_OF_TURN(0, ASCENDING), - EXPEDITION_RACE_RUDDER_ANGLE(0, ASCENDING), - EXPEDITION_RACE_HEEL(0, ASCENDING), - EXPEDITION_RACE_TARGET_HEEL(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_PORT_LAYLINE(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_STB_LAYLINE(0, ASCENDING), - EXPEDITION_RACE_DIST_TO_PORT_LAYLINE(0, ASCENDING), - EXPEDITION_RACE_DIST_TO_STB_LAYLINE(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_GUN(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_PIN(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_BURN_TO_LINE(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_BURN_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_RACE_TIME_TO_BURN_TO_PIN(0, ASCENDING), - EXPEDITION_RACE_DISTANCE_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_RACE_DISTANCE_TO_PIN(0, ASCENDING), - EXPEDITION_RACE_DISTANCE_BELOW_LINE(0, ASCENDING), - EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION(0, ASCENDING), - EXPEDITION_LEG_AWA(0, ASCENDING), - EXPEDITION_LEG_AWS(0, ASCENDING), - EXPEDITION_LEG_TWA(0, ASCENDING), - EXPEDITION_LEG_TWS(0, ASCENDING), - EXPEDITION_LEG_TWD(0, ASCENDING), - EXPEDITION_LEG_TARG_TWA(0, ASCENDING), - EXPEDITION_LEG_BOAT_SPEED(0, ASCENDING), - EXPEDITION_LEG_TARG_BOAT_SPEED(0, ASCENDING), - EXPEDITION_LEG_SOG(0, ASCENDING), - EXPEDITION_LEG_COG(0, ASCENDING), - EXPEDITION_LEG_FORESTAY_LOAD(0, ASCENDING), - EXPEDITION_LEG_RAKE(0, ASCENDING), - EXPEDITION_LEG_COURSE(0, ASCENDING), - EXPEDITION_LEG_HEADING(0, ASCENDING), - EXPEDITION_LEG_VMG(0, ASCENDING), - EXPEDITION_LEG_VMG_TARG_VMG_DELTA(0, ASCENDING), - EXPEDITION_LEG_RATE_OF_TURN(0, ASCENDING), - EXPEDITION_LEG_RUDDER_ANGLE(0, ASCENDING), - EXPEDITION_LEG_HEEL(0, ASCENDING), - EXPEDITION_LEG_TARGET_HEEL(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_PORT_LAYLINE(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_STB_LAYLINE(0, ASCENDING), - EXPEDITION_LEG_DIST_TO_PORT_LAYLINE(0, ASCENDING), - EXPEDITION_LEG_DIST_TO_STB_LAYLINE(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_GUN(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_PIN(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_BURN_TO_LINE(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_BURN_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_LEG_TIME_TO_BURN_TO_PIN(0, ASCENDING), - EXPEDITION_LEG_DISTANCE_TO_COMMITTEE_BOAT(0, ASCENDING), - EXPEDITION_LEG_DISTANCE_TO_PIN(0, ASCENDING), - EXPEDITION_LEG_DISTANCE_BELOW_LINE(0, ASCENDING), - EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION(0, ASCENDING), + EXPEDITION_RACE_AWA(2, ASCENDING), + EXPEDITION_RACE_AWS(2, ASCENDING), + EXPEDITION_RACE_TWA(2, ASCENDING), + EXPEDITION_RACE_TWS(2, ASCENDING), + EXPEDITION_RACE_TWD(2, ASCENDING), + EXPEDITION_RACE_TARG_TWA(2, ASCENDING), + EXPEDITION_RACE_BOAT_SPEED(2, ASCENDING), + EXPEDITION_RACE_TARG_BOAT_SPEED(2, ASCENDING), + EXPEDITION_RACE_SOG(2, ASCENDING), + EXPEDITION_RACE_COG(2, ASCENDING), + EXPEDITION_RACE_FORESTAY_LOAD(2, ASCENDING), + EXPEDITION_RACE_RAKE(2, ASCENDING), + EXPEDITION_RACE_COURSE(2, ASCENDING), + EXPEDITION_RACE_HEADING(2, ASCENDING), + EXPEDITION_RACE_VMG(2, ASCENDING), + EXPEDITION_RACE_VMG_TARG_VMG_DELTA(2, ASCENDING), + EXPEDITION_RACE_RATE_OF_TURN(2, ASCENDING), + EXPEDITION_RACE_RUDDER_ANGLE(2, ASCENDING), + EXPEDITION_RACE_HEEL(2, ASCENDING), + EXPEDITION_RACE_TARGET_HEEL(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_PORT_LAYLINE(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_STB_LAYLINE(2, ASCENDING), + EXPEDITION_RACE_DIST_TO_PORT_LAYLINE(2, ASCENDING), + EXPEDITION_RACE_DIST_TO_STB_LAYLINE(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_GUN(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_PIN(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_BURN_TO_LINE(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_BURN_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_RACE_TIME_TO_BURN_TO_PIN(2, ASCENDING), + EXPEDITION_RACE_DISTANCE_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_RACE_DISTANCE_TO_PIN(2, ASCENDING), + EXPEDITION_RACE_DISTANCE_BELOW_LINE(2, ASCENDING), + EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION(2, ASCENDING), + EXPEDITION_LEG_AWA(2, ASCENDING), + EXPEDITION_LEG_AWS(2, ASCENDING), + EXPEDITION_LEG_TWA(2, ASCENDING), + EXPEDITION_LEG_TWS(2, ASCENDING), + EXPEDITION_LEG_TWD(2, ASCENDING), + EXPEDITION_LEG_TARG_TWA(2, ASCENDING), + EXPEDITION_LEG_BOAT_SPEED(2, ASCENDING), + EXPEDITION_LEG_TARG_BOAT_SPEED(2, ASCENDING), + EXPEDITION_LEG_SOG(2, ASCENDING), + EXPEDITION_LEG_COG(2, ASCENDING), + EXPEDITION_LEG_FORESTAY_LOAD(2, ASCENDING), + EXPEDITION_LEG_RAKE(2, ASCENDING), + EXPEDITION_LEG_COURSE(2, ASCENDING), + EXPEDITION_LEG_HEADING(2, ASCENDING), + EXPEDITION_LEG_VMG(2, ASCENDING), + EXPEDITION_LEG_VMG_TARG_VMG_DELTA(2, ASCENDING), + EXPEDITION_LEG_RATE_OF_TURN(2, ASCENDING), + EXPEDITION_LEG_RUDDER_ANGLE(2, ASCENDING), + EXPEDITION_LEG_HEEL(2, ASCENDING), + EXPEDITION_LEG_TARGET_HEEL(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_PORT_LAYLINE(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_STB_LAYLINE(2, ASCENDING), + EXPEDITION_LEG_DIST_TO_PORT_LAYLINE(2, ASCENDING), + EXPEDITION_LEG_DIST_TO_STB_LAYLINE(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_GUN(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_PIN(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_BURN_TO_LINE(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_BURN_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_LEG_TIME_TO_BURN_TO_PIN(2, ASCENDING), + EXPEDITION_LEG_DISTANCE_TO_COMMITTEE_BOAT(2, ASCENDING), + EXPEDITION_LEG_DISTANCE_TO_PIN(2, ASCENDING), + EXPEDITION_LEG_DISTANCE_BELOW_LINE(2, ASCENDING), + EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION(2, ASCENDING), + EXPEDITION_RACE_BARO(2, ASCENDING), + EXPEDITION_RACE_LOAD_S(2, ASCENDING), + EXPEDITION_RACE_LOAD_P(2, ASCENDING), + EXPEDITION_RACE_JIB_CAR_PORT(2, ASCENDING), + EXPEDITION_RACE_JIB_CAR_STBD(2, ASCENDING), + EXPEDITION_RACE_MAST_BUTT(2, ASCENDING), + EXPEDITION_LEG_BARO(2, ASCENDING), + EXPEDITION_LEG_LOAD_S(2, ASCENDING), + EXPEDITION_LEG_LOAD_P(2, ASCENDING), + EXPEDITION_LEG_JIB_CAR_PORT(2, ASCENDING), + EXPEDITION_LEG_JIB_CAR_STBD(2, ASCENDING), + EXPEDITION_LEG_MAST_BUTT(2, ASCENDING), BRAVO_RACE_HEEL_IN_DEGREES(2, DESCENDING), BRAVO_RACE_PITCH_IN_DEGREES(2, DESCENDING); - + private int precision; private SortingOrder defaultSortingOrder; @@ -267,6 +279,12 @@ public enum DetailType implements Serializable { allowed.add(EXPEDITION_RACE_DISTANCE_TO_PIN); allowed.add(EXPEDITION_RACE_DISTANCE_BELOW_LINE); allowed.add(EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION); + allowed.add(EXPEDITION_RACE_BARO); + allowed.add(EXPEDITION_RACE_LOAD_S); + allowed.add(EXPEDITION_RACE_LOAD_P); + allowed.add(EXPEDITION_RACE_JIB_CAR_PORT); + allowed.add(EXPEDITION_RACE_JIB_CAR_STBD); + allowed.add(EXPEDITION_RACE_MAST_BUTT); return allowed; } @@ -405,7 +423,9 @@ public enum DetailType implements Serializable { EXPEDITION_LEG_TIME_TO_PIN, EXPEDITION_LEG_TIME_TO_BURN_TO_LINE, EXPEDITION_LEG_TIME_TO_BURN_TO_COMMITTEE_BOAT, EXPEDITION_LEG_TIME_TO_BURN_TO_PIN, EXPEDITION_LEG_DISTANCE_TO_COMMITTEE_BOAT, EXPEDITION_LEG_DISTANCE_TO_PIN, - EXPEDITION_LEG_DISTANCE_BELOW_LINE, EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION }); + EXPEDITION_LEG_DISTANCE_BELOW_LINE, EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION, EXPEDITION_LEG_BARO, + EXPEDITION_LEG_LOAD_S, EXPEDITION_LEG_LOAD_P, EXPEDITION_LEG_JIB_CAR_PORT, EXPEDITION_LEG_JIB_CAR_STBD, + EXPEDITION_LEG_MAST_BUTT }); } /** @@ -437,11 +457,12 @@ public enum DetailType implements Serializable { all.addAll(getLegExpeditionDetailColumnTypes()); return all; } - + /** - * This method allows callers to also restore legacy names of older settings that do not match the renamed detailtypes anymore. - * It matches {@code value} primarily to the literals; if no match is found, all {@link #oldNames old names} are checked, - * and the first match, if any, is returned. If no match is found, an {@link IllegalArgumentException} is thrown. + * This method allows callers to also restore legacy names of older settings that do not match the renamed + * detailtypes anymore. It matches {@code value} primarily to the literals; if no match is found, all + * {@link #oldNames old names} are checked, and the first match, if any, is returned. If no match is found, an + * {@link IllegalArgumentException} is thrown. */ public static DetailType valueOfString(String value) { // fastpath for directly mappable values diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LeaderboardEntryDTO.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LeaderboardEntryDTO.java index cc86d1b4789..5b3a9390821 100755 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LeaderboardEntryDTO.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LeaderboardEntryDTO.java @@ -569,6 +569,49 @@ public class LeaderboardEntryDTO implements Serializable { } } + public void setExpeditionBaro(Double expeditionBARO) { + if (expeditionBARO != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionBARO = expeditionBARO; + } + } + + public void setExpeditionLoadP(Double expeditionLoadP) { + if (expeditionLoadP != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionLoadP = expeditionLoadP; + } + } + + public void setExpeditionLoadS(Double expeditionLoadS) { + if (expeditionLoadS != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionLoadS = expeditionLoadS; + } + } + + public void setExpeditionJibCarPort(Double expeditionJibCarPort) { + if (expeditionJibCarPort != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionJibCarPort = expeditionJibCarPort; + } + } + + public void setExpeditionJibCarStbd(Double expeditionJibCarStbd) { + if (expeditionJibCarStbd != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionJibCarStbd = expeditionJibCarStbd; + } + } + + + public void setExpeditionMastButt(Double expeditionMastButt) { + if (expeditionMastButt != null) { + ensureExpeditionHolder(); + expeditionDataHolder.expeditionMastButt = expeditionMastButt; + } + } + public Double getExpeditionAWA() { return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionAWA; } @@ -670,12 +713,36 @@ public class LeaderboardEntryDTO implements Serializable { } public Double getExpeditionVMGTargVMGDelta() { return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionVMGTargVMGDelta; + } + public Double getExpeditionBaro() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionBARO; + } + public Double getExpeditionLoadP() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionLoadP; + } + public Double getExpeditionLoadS() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionLoadS; + } + public Double getExpeditionJibCarPort() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionJibCarPort; + } + public Double getExpeditionJibCarStbd() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionJibCarStbd; + } + public Double getExpeditionMastButt() { + return expeditionDataHolder == null ? null : expeditionDataHolder.expeditionMastButt; } /** * Used to ensure that only one null value needs to be transmitted, if no expedition data exists */ public static class ExpeditionDataHolder implements Serializable{ + public Double expeditionMastButt; + public Double expeditionJibCarStbd; + public Double expeditionJibCarPort; + public Double expeditionLoadS; + public Double expeditionLoadP; + public Double expeditionBARO; private static final long serialVersionUID = 1L; public Double expeditionAWA; public Double expeditionAWS; @@ -717,6 +784,7 @@ public class LeaderboardEntryDTO implements Serializable { int result = 1; result = prime * result + ((expeditionAWA == null) ? 0 : expeditionAWA.hashCode()); result = prime * result + ((expeditionAWS == null) ? 0 : expeditionAWS.hashCode()); + result = prime * result + ((expeditionBARO == null) ? 0 : expeditionBARO.hashCode()); result = prime * result + ((expeditionBoatSpeed == null) ? 0 : expeditionBoatSpeed.hashCode()); result = prime * result + ((expeditionCOG == null) ? 0 : expeditionCOG.hashCode()); result = prime * result + ((expeditionCourseDetail == null) ? 0 : expeditionCourseDetail.hashCode()); @@ -733,8 +801,13 @@ public class LeaderboardEntryDTO implements Serializable { result = prime * result + ((expeditionForestayLoad == null) ? 0 : expeditionForestayLoad.hashCode()); result = prime * result + ((expeditionHeading == null) ? 0 : expeditionHeading.hashCode()); result = prime * result + ((expeditionHeel == null) ? 0 : expeditionHeel.hashCode()); + result = prime * result + ((expeditionJibCarPort == null) ? 0 : expeditionJibCarPort.hashCode()); + result = prime * result + ((expeditionJibCarStbd == null) ? 0 : expeditionJibCarStbd.hashCode()); result = prime * result + ((expeditionLineSquareForWindDirection == null) ? 0 : expeditionLineSquareForWindDirection.hashCode()); + result = prime * result + ((expeditionLoadP == null) ? 0 : expeditionLoadP.hashCode()); + result = prime * result + ((expeditionLoadS == null) ? 0 : expeditionLoadS.hashCode()); + result = prime * result + ((expeditionMastButt == null) ? 0 : expeditionMastButt.hashCode()); result = prime * result + ((expeditionRake == null) ? 0 : expeditionRake.hashCode()); result = prime * result + ((expeditionRateOfTurn == null) ? 0 : expeditionRateOfTurn.hashCode()); result = prime * result + ((expeditionRudderAngle == null) ? 0 : expeditionRudderAngle.hashCode()); @@ -781,6 +854,11 @@ public class LeaderboardEntryDTO implements Serializable { return false; } else if (!expeditionAWS.equals(other.expeditionAWS)) return false; + if (expeditionBARO == null) { + if (other.expeditionBARO != null) + return false; + } else if (!expeditionBARO.equals(other.expeditionBARO)) + return false; if (expeditionBoatSpeed == null) { if (other.expeditionBoatSpeed != null) return false; @@ -836,11 +914,36 @@ public class LeaderboardEntryDTO implements Serializable { return false; } else if (!expeditionHeel.equals(other.expeditionHeel)) return false; + if (expeditionJibCarPort == null) { + if (other.expeditionJibCarPort != null) + return false; + } else if (!expeditionJibCarPort.equals(other.expeditionJibCarPort)) + return false; + if (expeditionJibCarStbd == null) { + if (other.expeditionJibCarStbd != null) + return false; + } else if (!expeditionJibCarStbd.equals(other.expeditionJibCarStbd)) + return false; if (expeditionLineSquareForWindDirection == null) { if (other.expeditionLineSquareForWindDirection != null) return false; } else if (!expeditionLineSquareForWindDirection.equals(other.expeditionLineSquareForWindDirection)) return false; + if (expeditionLoadP == null) { + if (other.expeditionLoadP != null) + return false; + } else if (!expeditionLoadP.equals(other.expeditionLoadP)) + return false; + if (expeditionLoadS == null) { + if (other.expeditionLoadS != null) + return false; + } else if (!expeditionLoadS.equals(other.expeditionLoadS)) + return false; + if (expeditionMastButt == null) { + if (other.expeditionMastButt != null) + return false; + } else if (!expeditionMastButt.equals(other.expeditionMastButt)) + return false; if (expeditionRake == null) { if (other.expeditionRake != null) return false; diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LegEntryDTO.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LegEntryDTO.java index 9626fead781..b7b5edc6745 100644 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LegEntryDTO.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/dto/LegEntryDTO.java @@ -485,6 +485,48 @@ public class LegEntryDTO implements Serializable { expeditionHolder.expeditionLineSquareForWindDirection = expeditionLineSquareForWindDirection; } } + + public void setExpeditionBaroIfAvailable(Double expeditionBaro) { + if (expeditionBaro != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionBaro = expeditionBaro; + } + } + + public void setExpeditionLoadSIfAvailable(Double expeditionLoadS) { + if (expeditionLoadS != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionLoadS = expeditionLoadS; + } + } + + public void setExpeditionLoadPIfAvailable(Double expeditionLoadP) { + if (expeditionLoadP != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionLoadP = expeditionLoadP; + } + } + + public void setExpeditionJibCarPortIfAvailable(Double expeditionJibCarPort) { + if (expeditionJibCarPort != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionJibCarPort = expeditionJibCarPort; + } + } + + public void setExpeditionJibCarStbdIfAvailable(Double expeditionJibCarStbd) { + if (expeditionJibCarStbd != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionJibCarStbd = expeditionJibCarStbd; + } + } + + public void setExpeditionMastButtIfAvailable(Double expeditionMastButt) { + if (expeditionMastButt != null) { + ensureExpeditionHolder(); + expeditionHolder.expeditionMastButt = expeditionMastButt; + } + } public Double getExpeditionAWA() { return expeditionHolder == null ? null : expeditionHolder.expeditionAWA; @@ -588,10 +630,33 @@ public class LegEntryDTO implements Serializable { public Double getExpeditionVMGTargVMGDelta() { return expeditionHolder == null ? null : expeditionHolder.expeditionVMGTargVMGDelta; } + public Double getExpeditionBaro() { + return expeditionHolder == null ? null : expeditionHolder.expeditionBaro; + } + public Double getExpeditionLoadS() { + return expeditionHolder == null ? null : expeditionHolder.expeditionLoadS; + } + public Double getExpeditionLoadP() { + return expeditionHolder == null ? null : expeditionHolder.expeditionLoadP; + } + public Double getExpeditionJibCarPort() { + return expeditionHolder == null ? null : expeditionHolder.expeditionJibCarPort; + } + public Double getExpeditionJibCarStbd() { + return expeditionHolder == null ? null : expeditionHolder.expeditionJibCarStbd; + } + public Double getExpeditionMastButt() { + return expeditionHolder == null ? null : expeditionHolder.expeditionMastButt; + } public static class ExpeditionLegHolder implements Serializable { private static final long serialVersionUID = -2507536984016949734L; - + public Double expeditionMastButt; + public Double expeditionJibCarStbd; + public Double expeditionJibCarPort; + public Double expeditionLoadP; + public Double expeditionLoadS; + public Double expeditionBaro; public Double expeditionAWA; public Double expeditionAWS; public Double expeditionBoatSpeed; @@ -632,6 +697,7 @@ public class LegEntryDTO implements Serializable { int result = 1; result = prime * result + ((expeditionAWA == null) ? 0 : expeditionAWA.hashCode()); result = prime * result + ((expeditionAWS == null) ? 0 : expeditionAWS.hashCode()); + result = prime * result + ((expeditionBaro == null) ? 0 : expeditionBaro.hashCode()); result = prime * result + ((expeditionBoatSpeed == null) ? 0 : expeditionBoatSpeed.hashCode()); result = prime * result + ((expeditionCOG == null) ? 0 : expeditionCOG.hashCode()); result = prime * result + ((expeditionCourseDetail == null) ? 0 : expeditionCourseDetail.hashCode()); @@ -648,8 +714,13 @@ public class LegEntryDTO implements Serializable { result = prime * result + ((expeditionForestayLoad == null) ? 0 : expeditionForestayLoad.hashCode()); result = prime * result + ((expeditionHeading == null) ? 0 : expeditionHeading.hashCode()); result = prime * result + ((expeditionHeel == null) ? 0 : expeditionHeel.hashCode()); + result = prime * result + ((expeditionJibCarPort == null) ? 0 : expeditionJibCarPort.hashCode()); + result = prime * result + ((expeditionJibCarStbd == null) ? 0 : expeditionJibCarStbd.hashCode()); result = prime * result + ((expeditionLineSquareForWindDirection == null) ? 0 : expeditionLineSquareForWindDirection.hashCode()); + result = prime * result + ((expeditionLoadP == null) ? 0 : expeditionLoadP.hashCode()); + result = prime * result + ((expeditionLoadS == null) ? 0 : expeditionLoadS.hashCode()); + result = prime * result + ((expeditionMastButt == null) ? 0 : expeditionMastButt.hashCode()); result = prime * result + ((expeditionRake == null) ? 0 : expeditionRake.hashCode()); result = prime * result + ((expeditionRateOfTurn == null) ? 0 : expeditionRateOfTurn.hashCode()); result = prime * result + ((expeditionRudderAngle == null) ? 0 : expeditionRudderAngle.hashCode()); @@ -696,6 +767,11 @@ public class LegEntryDTO implements Serializable { return false; } else if (!expeditionAWS.equals(other.expeditionAWS)) return false; + if (expeditionBaro == null) { + if (other.expeditionBaro != null) + return false; + } else if (!expeditionBaro.equals(other.expeditionBaro)) + return false; if (expeditionBoatSpeed == null) { if (other.expeditionBoatSpeed != null) return false; @@ -751,11 +827,36 @@ public class LegEntryDTO implements Serializable { return false; } else if (!expeditionHeel.equals(other.expeditionHeel)) return false; + if (expeditionJibCarPort == null) { + if (other.expeditionJibCarPort != null) + return false; + } else if (!expeditionJibCarPort.equals(other.expeditionJibCarPort)) + return false; + if (expeditionJibCarStbd == null) { + if (other.expeditionJibCarStbd != null) + return false; + } else if (!expeditionJibCarStbd.equals(other.expeditionJibCarStbd)) + return false; if (expeditionLineSquareForWindDirection == null) { if (other.expeditionLineSquareForWindDirection != null) return false; } else if (!expeditionLineSquareForWindDirection.equals(other.expeditionLineSquareForWindDirection)) return false; + if (expeditionLoadP == null) { + if (other.expeditionLoadP != null) + return false; + } else if (!expeditionLoadP.equals(other.expeditionLoadP)) + return false; + if (expeditionLoadS == null) { + if (other.expeditionLoadS != null) + return false; + } else if (!expeditionLoadS.equals(other.expeditionLoadS)) + return false; + if (expeditionMastButt == null) { + if (other.expeditionMastButt != null) + return false; + } else if (!expeditionMastButt.equals(other.expeditionMastButt)) + return false; if (expeditionRake == null) { if (other.expeditionRake != null) return false; @@ -859,6 +960,4 @@ public class LegEntryDTO implements Serializable { return true; } } - - } diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java index c59ee2bf6f5..5ae08da9a67 100755 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/sensordata/ExpeditionExtendedSensorDataMetadata.java @@ -49,8 +49,8 @@ public enum ExpeditionExtendedSensorDataMetadata { EXPEDITION_BELOWLN("BelowLn", BravoExtendedSensorDataMetadata.EXPEDITION_TMTOBURN), // EXPEDITION_RATE_OF_TURN("ROT", BravoExtendedSensorDataMetadata.EXPEDITION_TMTOBURN), // EXPEDITION_BARO("Baro", BravoExtendedSensorDataMetadata.EXPEDITION_BARO), // - EXPEDITION_LOAD_P("LoadP", BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_P), // - EXPEDITION_LOAD_S("LoadS", BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_S), // + EXPEDITION_LOAD_P("Load P", BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_P), // + EXPEDITION_LOAD_S("Load S", BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_S), // EXPEDITION_JIB_CAR_PORT("JibCarPort", BravoExtendedSensorDataMetadata.EXPEDITION_JIB_CAR_PORT), // EXPEDITION_JIB_CAR_STBD("JibCarStbd", BravoExtendedSensorDataMetadata.EXPEDITION_JIB_CAR_STBD), // EXPEDITION_MAST_BUTT("MastButt", BravoExtendedSensorDataMetadata.EXPEDITION_MAST_BUTT), // diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoExtendedFix.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoExtendedFix.java index c4362e9b3ff..b7120d4a295 100644 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoExtendedFix.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/BravoExtendedFix.java @@ -44,4 +44,10 @@ public interface BravoExtendedFix extends BravoFix { Duration getExpeditionTmToBurn(); Double getExpeditionBelowLn(); Double getExpeditionCourse(); + Double getExpeditionJibCarStbd(); + Double getExpeditionJibCarPort(); + Double getExpeditionLoadS(); + Double getExpeditionLoadP(); + Double getExpeditionBARO(); + Double getExpeditionMastButt(); } diff --git a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/impl/BravoExtendedFixImpl.java b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/impl/BravoExtendedFixImpl.java index 9ccdd65cd87..e49dc07e4bc 100644 --- a/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/impl/BravoExtendedFixImpl.java +++ b/java/com.sap.sailing.domain.common/src/com/sap/sailing/domain/common/tracking/impl/BravoExtendedFixImpl.java @@ -193,6 +193,36 @@ public class BravoExtendedFixImpl extends BravoFixImpl implements BravoExtendedF public Double getExpeditionTG_Heell() { return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_TGHEEL.getColumnIndex()); } + + @Override + public Double getExpeditionBARO() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_BARO.getColumnIndex()); + } + + @Override + public Double getExpeditionLoadP() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_P.getColumnIndex()); + } + + @Override + public Double getExpeditionLoadS() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_LOAD_S.getColumnIndex()); + } + + @Override + public Double getExpeditionJibCarPort() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_JIB_CAR_PORT.getColumnIndex()); + } + + @Override + public Double getExpeditionJibCarStbd() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_JIB_CAR_STBD.getColumnIndex()); + } + + @Override + public Double getExpeditionMastButt() { + return fix.get(BravoExtendedSensorDataMetadata.EXPEDITION_MAST_BUTT.getColumnIndex()); + } @Override public Duration getExpeditionTmToGun() { diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractLeaderboardWithCache.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractLeaderboardWithCache.java index 983797aaa1b..046eb6b615b 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractLeaderboardWithCache.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/leaderboard/impl/AbstractLeaderboardWithCache.java @@ -625,6 +625,13 @@ public abstract class AbstractLeaderboardWithCache implements Leaderboard { entryDTO.setExpeditionTimeToBurnToLine(fix.getExpeditionTmToBurn()); entryDTO.setExpeditionDistanceBelowLine(fix.getExpeditionBelowLn()); entryDTO.setExpeditionCourseDetail(fix.getExpeditionCourse()); + entryDTO.setExpeditionBaro(fix.getExpeditionBARO()); + entryDTO.setExpeditionLoadP(fix.getExpeditionLoadP()); + entryDTO.setExpeditionLoadS(fix.getExpeditionLoadS()); + entryDTO.setExpeditionJibCarPort(fix.getExpeditionJibCarPort()); + entryDTO.setExpeditionJibCarStbd(fix.getExpeditionJibCarStbd()); + entryDTO.setExpeditionMastButt(fix.getExpeditionMastButt()); + entryDTO.heel = fix.getHeel(); entryDTO.pitch = fix.getPitch(); } @@ -1048,6 +1055,12 @@ public abstract class AbstractLeaderboardWithCache implements Leaderboard { result.setExpeditionDistanceToPinDetail(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionDistanceToPinDetail, TrackedLegOfCompetitor::getAverageExpeditionDistanceToPinDetail)); result.setExpeditionDistanceBelowLine(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionDistanceBelowLine, TrackedLegOfCompetitor::getAverageExpeditionDistanceBelowLine)); result.setExpeditionLineSquareForWindDirection(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionLineSquareForWindDirection, TrackedLegOfCompetitor::getAverageExpeditionLineSquareForWindDirection)); + result.setExpeditionBaroIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionBaroIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionBaroIfAvailable)); + result.setExpeditionLoadSIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionLoadSIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionLoadSIfAvailable)); + result.setExpeditionLoadPIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionLoadPIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionLoadPIfAvailable)); + result.setExpeditionJibCarPortIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionJibCarPortIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionJibCarPortIfAvailable)); + result.setExpeditionJibCarStbdIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionJibCarStbdIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionJibCarStbdIfAvailable)); + result.setExpeditionMastButtIfAvailable(extractDoubleValue.apply(TrackedLegOfCompetitor::getExpeditionMastButtIfAvailable, TrackedLegOfCompetitor::getAverageExpeditionMastButtIfAvailable)); } return result; } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/BravoFixTrack.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/BravoFixTrack.java index 4a11b0455b4..6d334eea75b 100644 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/BravoFixTrack.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/BravoFixTrack.java @@ -133,6 +133,12 @@ public interface BravoFixTrack extends S Double getExpeditionDistanceToPinDetailIfAvailable(TimePoint at); Double getExpeditionDistanceBelowLineIfAvailable(TimePoint at); Double getExpeditionLineSquareForWindIfAvailable(TimePoint at); + Double getExpeditionBaroIfAvailable(TimePoint at); + Double getExpeditionLoadSIfAvailable(TimePoint at); + Double getExpeditionLoadPIfAvailable(TimePoint at); + Double getExpeditionJibCarPortIfAvailable(TimePoint at); + Double getExpeditionJibCarStbdIfAvailable(TimePoint at); + Double getExpeditionMastButtIfAvailable(TimePoint at); Double getAverageExpeditionAWAIfAvailable(TimePoint start, TimePoint endTimePoint); Double getAverageExpeditionAWSIfAvailable(TimePoint start, TimePoint endTimePoint); Double getAverageExpeditionTWAIfAvailable(TimePoint start, TimePoint endTimePoint); @@ -167,4 +173,10 @@ public interface BravoFixTrack extends S Double getAverageExpeditionDistanceToPinDetailIfAvailable(TimePoint start, TimePoint endTimePoint); Double getAverageExpeditionDistanceBelowLineIfAvailable(TimePoint start, TimePoint endTimePoint); Double getAverageExpeditionLineSquareForWindIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionBaroIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionLoadSIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionLoadPIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionJibCarPortIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionJibCarStbdIfAvailable(TimePoint start, TimePoint endTimePoint); + Double getAverageExpeditionMastButtIfAvailable(TimePoint start, TimePoint endTimePoint); } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedLegOfCompetitor.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedLegOfCompetitor.java index 816a662a6ed..7def03adcf5 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedLegOfCompetitor.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/TrackedLegOfCompetitor.java @@ -336,6 +336,12 @@ public interface TrackedLegOfCompetitor extends Serializable { Double getExpeditionDistanceToPinDetail(TimePoint at); Double getExpeditionDistanceBelowLine(TimePoint at); Double getExpeditionLineSquareForWindDirection(TimePoint at); + Double getExpeditionBaroIfAvailable(TimePoint at); + Double getExpeditionLoadSIfAvailable(TimePoint at); + Double getExpeditionLoadPIfAvailable(TimePoint at); + Double getExpeditionJibCarPortIfAvailable(TimePoint at); + Double getExpeditionJibCarStbdIfAvailable(TimePoint at); + Double getExpeditionMastButtIfAvailable(TimePoint at); Double getAverageExpeditionAWA(TimePoint at); Double getAverageExpeditionAWS(TimePoint at); Double getAverageExpeditionTWA(TimePoint at); @@ -370,5 +376,10 @@ public interface TrackedLegOfCompetitor extends Serializable { Double getAverageExpeditionDistanceToPinDetail(TimePoint at); Double getAverageExpeditionDistanceBelowLine(TimePoint at); Double getAverageExpeditionLineSquareForWindDirection(TimePoint at); - + Double getAverageExpeditionBaroIfAvailable(TimePoint at); + Double getAverageExpeditionLoadSIfAvailable(TimePoint at); + Double getAverageExpeditionLoadPIfAvailable(TimePoint at); + Double getAverageExpeditionJibCarPortIfAvailable(TimePoint at); + Double getAverageExpeditionJibCarStbdIfAvailable(TimePoint at); + Double getAverageExpeditionMastButtIfAvailable(TimePoint at); } diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/BravoFixTrackImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/BravoFixTrackImpl.java index dcc84da1af3..903c4c16a3a 100644 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/BravoFixTrackImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/BravoFixTrackImpl.java @@ -58,6 +58,12 @@ public class BravoFixTrackImpl extends S private transient TimeRangeCache> expeditionForestayLoadCache; private transient TimeRangeCache> expeditionRakeCache; private transient TimeRangeCache> expeditionCourseDetailCache; + private transient TimeRangeCache> expeditionBaroCache; + private transient TimeRangeCache> expeditionLoadSCache; + private transient TimeRangeCache> expeditionLoadPCache; + private transient TimeRangeCache> expeditionJibCarPortCache; + private transient TimeRangeCache> expeditionJibCarStbdCache; + private transient TimeRangeCache> expeditionMastButtCache; /** * If a GPS track was provided at construction time, remember it non-transiently. It is needed when restoring @@ -124,6 +130,12 @@ public class BravoFixTrackImpl extends S this.expeditionForestayLoadCache= createTimeRangeCache(trackedItem, "expeditionForestayLoadCache"); this.expeditionRakeCache= createTimeRangeCache(trackedItem, "expeditionRakeCache"); this.expeditionCourseDetailCache= createTimeRangeCache(trackedItem, "expeditionCourseDetailCache"); + this.expeditionBaroCache= createTimeRangeCache(trackedItem, "expeditionBaroCache"); + this.expeditionLoadSCache= createTimeRangeCache(trackedItem, "expeditionLoadSCache"); + this.expeditionLoadPCache= createTimeRangeCache(trackedItem, "expeditionLoadPCache"); + this.expeditionJibCarPortCache= createTimeRangeCache(trackedItem, "expeditionJibCarPortCache"); + this.expeditionJibCarStbdCache= createTimeRangeCache(trackedItem, "expeditionJibCarStbdCache"); + this.expeditionMastButtCache= createTimeRangeCache(trackedItem, "expeditionMastButtCache"); } public GPSFixTrack getGpsTrack() { @@ -191,7 +203,9 @@ public class BravoFixTrackImpl extends S invalidateAllAtOrLaterThanForCaches(fixTimePoint, averageRideHeightCache, foilingDistanceCache, foilingTimeCache, expeditionAWACache, expeditionAWSCache, expeditionTWACache, expeditionTWSCache, expeditionTWDCache, expeditionBoatSpeedCache, expeditionTargBoatSpeedCache, expeditionSOGCache, - expeditionCOGCache, expeditionForestayLoadCache, expeditionRakeCache, expeditionCourseDetailCache); + expeditionCOGCache, expeditionForestayLoadCache, expeditionRakeCache, expeditionCourseDetailCache, + expeditionBaroCache, expeditionJibCarPortCache, expeditionJibCarStbdCache, expeditionLoadPCache, + expeditionLoadSCache, expeditionMastButtCache); } return added; } @@ -493,6 +507,36 @@ public class BravoFixTrackImpl extends S public Double getAverageExpeditionCourseDetailIfAvailable(TimePoint start, TimePoint endTimePoint){ return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionCourse, expeditionCourseDetailCache); } + + @Override + public Double getAverageExpeditionBaroIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionBARO, expeditionBaroCache); + } + + @Override + public Double getAverageExpeditionLoadSIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionLoadS, expeditionLoadSCache); + } + + @Override + public Double getAverageExpeditionLoadPIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionLoadP, expeditionLoadPCache); + } + + @Override + public Double getAverageExpeditionJibCarPortIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionJibCarPort, expeditionJibCarPortCache); + } + + @Override + public Double getAverageExpeditionJibCarStbdIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionJibCarStbd, expeditionJibCarStbdCache); + } + + @Override + public Double getAverageExpeditionMastButtIfAvailable(TimePoint start, TimePoint endTimePoint){ + return getAverageOfBravoExtenededFixValueWithCachingForDouble(start, endTimePoint, BravoExtendedFix::getExpeditionMastButt, expeditionMastButtCache); + } @Override public Double getAverageExpeditionHeadingIfAvailable(TimePoint start, TimePoint endTimePoint){ @@ -692,6 +736,36 @@ public class BravoFixTrackImpl extends S return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionCourse); } + @Override + public Double getExpeditionBaroIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionBARO); + } + + @Override + public Double getExpeditionLoadSIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionLoadS); + } + + @Override + public Double getExpeditionLoadPIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionLoadP); + } + + @Override + public Double getExpeditionJibCarPortIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionJibCarPort); + } + + @Override + public Double getExpeditionJibCarStbdIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionJibCarStbd); + } + + @Override + public Double getExpeditionMastButtIfAvailable(TimePoint at) { + return getExpeditionValueForDouble(at, BravoExtendedFix::getExpeditionMastButt); + } + @Override public Double getExpeditionHeadingIfAvailable(TimePoint at){ // TODO Auto-generated method stub diff --git a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedLegOfCompetitorImpl.java b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedLegOfCompetitorImpl.java index fa71dc8b70f..df04be4c242 100755 --- a/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedLegOfCompetitorImpl.java +++ b/java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/TrackedLegOfCompetitorImpl.java @@ -908,6 +908,36 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor { return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionLineSquareForWindIfAvailable); } + @Override + public Double getExpeditionBaroIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionBaroIfAvailable); + } + + @Override + public Double getExpeditionLoadSIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionLoadSIfAvailable); + } + + @Override + public Double getExpeditionLoadPIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionLoadPIfAvailable); + } + + @Override + public Double getExpeditionJibCarPortIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionJibCarPortIfAvailable); + } + + @Override + public Double getExpeditionJibCarStbdIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionJibCarStbdIfAvailable); + } + + @Override + public Double getExpeditionMastButtIfAvailable(TimePoint at) { + return getExpeditionValueFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getExpeditionMastButtIfAvailable); + } + @Override public Double getAverageExpeditionAWA(TimePoint at) { return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionAWAIfAvailable); @@ -1078,6 +1108,36 @@ public class TrackedLegOfCompetitorImpl implements TrackedLegOfCompetitor { return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionLineSquareForWindIfAvailable); } + @Override + public Double getAverageExpeditionBaroIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionBaroIfAvailable); + } + + @Override + public Double getAverageExpeditionLoadSIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionLoadSIfAvailable); + } + + @Override + public Double getAverageExpeditionLoadPIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionLoadPIfAvailable); + } + + @Override + public Double getAverageExpeditionJibCarPortIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionJibCarPortIfAvailable); + } + + @Override + public Double getAverageExpeditionJibCarStbdIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionJibCarStbdIfAvailable); + } + + @Override + public Double getAverageExpeditionMastButtIfAvailable(TimePoint at) { + return getAverageExpeditionValueWithTimeRangeFromBravoFixTrackIfLegIsStarted(at, BravoFixTrack::getAverageExpeditionMastButtIfAvailable); + } + private R getExpeditionValueFromBravoFixTrackIfLegIsStarted(TimePoint at, BiFunction, TimePoint, R> valueExtractor) { final R result; if (hasStartedLeg(at)) { diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/DetailTypeFormatter.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/DetailTypeFormatter.java index e5f29e30cad..b366db18e17 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/DetailTypeFormatter.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/DetailTypeFormatter.java @@ -270,6 +270,18 @@ public class DetailTypeFormatter { return stringMessages.expeditionDistanceBelowLine(); case EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION: return stringMessages.expeditionLineSquareForWindDirection(); + case EXPEDITION_RACE_BARO: + return stringMessages.expeditionBaro(); + case EXPEDITION_RACE_LOAD_S: + return stringMessages.expeditionRaceLoadS(); + case EXPEDITION_RACE_LOAD_P: + return stringMessages.expeditionRaceLoadP(); + case EXPEDITION_RACE_JIB_CAR_PORT: + return stringMessages.expeditionRaceJibCarPort(); + case EXPEDITION_RACE_JIB_CAR_STBD: + return stringMessages.expeditionRaceJibCarStbd(); + case EXPEDITION_RACE_MAST_BUTT: + return stringMessages.expeditionRaceMastButt(); case EXPEDITION_LEG_AWA: return "\u2205 " + stringMessages.expeditionAwa(); case EXPEDITION_LEG_AWS: @@ -338,6 +350,18 @@ public class DetailTypeFormatter { return "\u2205 " + stringMessages.expeditionVmg(); case EXPEDITION_LEG_VMG_TARG_VMG_DELTA: return "\u2205 " + stringMessages.expeditionVmgTargVmgDelta(); + case EXPEDITION_LEG_BARO: + return "\u2205 " + stringMessages.expeditionBaro(); + case EXPEDITION_LEG_LOAD_S: + return "\u2205 " + stringMessages.expeditionRaceLoadS(); + case EXPEDITION_LEG_LOAD_P: + return "\u2205 " + stringMessages.expeditionRaceLoadP(); + case EXPEDITION_LEG_JIB_CAR_PORT: + return "\u2205 " + stringMessages.expeditionRaceJibCarPort(); + case EXPEDITION_LEG_JIB_CAR_STBD: + return "\u2205 " + stringMessages.expeditionRaceJibCarStbd(); + case EXPEDITION_LEG_MAST_BUTT: + return "\u2205 " + stringMessages.expeditionRaceMastButt(); case BRAVO_RACE_HEEL_IN_DEGREES: return stringMessages.currentHeelInDegree(); case BRAVO_RACE_PITCH_IN_DEGREES: @@ -459,7 +483,14 @@ public class DetailTypeFormatter { case RACE_CURRENT_DURATION_FOILED_IN_SECONDS: case OVERALL_TOTAL_DURATION_FOILED_IN_SECONDS: return stringMessages.hhmmssUnit(); - + case EXPEDITION_RACE_BARO: + return stringMessages.milliBarUnits(); + case EXPEDITION_RACE_JIB_CAR_PORT: + return stringMessages.degreesUnit(); + case EXPEDITION_RACE_JIB_CAR_STBD: + return stringMessages.degreesUnit(); + case EXPEDITION_RACE_MAST_BUTT: + return stringMessages.millimetersUnit(); // Cases for detail types without unit, so that an empty string is returned. case RACE_RANK: case REGATTA_RANK: @@ -547,6 +578,8 @@ public class DetailTypeFormatter { case EXPEDITION_LEG_DISTANCE_TO_PIN: case EXPEDITION_LEG_DISTANCE_BELOW_LINE: case EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION: + case EXPEDITION_RACE_LOAD_S: + case EXPEDITION_RACE_LOAD_P: return ""; default: break; diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java index e98652ffd1c..876761a723e 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.java @@ -2102,4 +2102,11 @@ public interface StringMessages extends com.sap.sse.gwt.client.StringMessages, String expeditionDistanceToPin(); String expeditionDistanceBelowLine(); String expeditionLineSquareForWindDirection(); + String expeditionBaro(); + String expeditionRaceLoadS(); + String expeditionRaceLoadP(); + String expeditionRaceJibCarPort(); + String expeditionRaceJibCarStbd(); + String expeditionRaceMastButt(); + String milliBarUnits(); } diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties index 13b25aaf57b..e1472f4488b 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/client/StringMessages.properties @@ -2090,4 +2090,11 @@ expeditionTimeToBurnToPin=eTime to burn to pin expeditionDistanceToCommitteeBoat=eDistance to committee boat expeditionDistanceToPin=eDistance to pin expeditionDistanceBelowLine=eDistance below line -expeditionLineSquareForWindDirection=eLine square for wind direction \ No newline at end of file +expeditionLineSquareForWindDirection=eLine square for wind direction +expeditionBaro=pAtmosphere +expeditionRaceLoadS=FShroudS +expeditionRaceLoadP=FShroudP +expeditionRaceJibCarPort=aJibCarPFromBow +expeditionRaceJibCarStbd=aJibCarSFromBow +expeditionRaceMastButt=xMastButt +milliBarUnits=mbar \ No newline at end of file diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java index 3f0c7400bff..558f996926d 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java @@ -1315,6 +1315,18 @@ public abstract class LeaderboardPanel extends A LEG_COLUMN_STYLE, LeaderboardPanel.this)); result.put(DetailType.EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_LINE_SQUARE_FOR_WIND_DIRECTION, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionLineSquareForWindDirection), LEG_COLUMN_HEADER_STYLE, LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_BARO, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_BARO, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionBaro), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_LOAD_S, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_LOAD_S, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionLoadS), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_LOAD_P, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_LOAD_P, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionLoadP), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_JIB_CAR_PORT, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_JIB_CAR_PORT, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionJibCarPort), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_JIB_CAR_STBD, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_JIB_CAR_STBD, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionJibCarStbd), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); + result.put(DetailType.EXPEDITION_RACE_MAST_BUTT, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_RACE_MAST_BUTT, new DoubleTextRaceDetailTypeExtractor(LeaderboardEntryDTO::getExpeditionJibCarStbd), LEG_COLUMN_HEADER_STYLE, + LEG_COLUMN_STYLE, LeaderboardPanel.this)); result.put(DetailType.BRAVO_RACE_HEEL_IN_DEGREES, new FormattedDoubleDetailTypeColumn(DetailType.BRAVO_RACE_HEEL_IN_DEGREES, new BearingAsDegreeDetailTypeExtractor(e -> e.heel), LEG_COLUMN_HEADER_STYLE, LEG_COLUMN_STYLE, LeaderboardPanel.this)); result.put(DetailType.BRAVO_RACE_PITCH_IN_DEGREES, new FormattedDoubleDetailTypeColumn(DetailType.BRAVO_RACE_PITCH_IN_DEGREES, new BearingAsDegreeDetailTypeExtractor(e -> e.pitch), LEG_COLUMN_HEADER_STYLE, diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LegColumn.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LegColumn.java index f4ceea1f191..c17ec026607 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LegColumn.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LegColumn.java @@ -301,6 +301,18 @@ public class LegColumn extends ExpandableSortableColumn { new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_DISTANCE_BELOW_LINE, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionDistanceBelowLine), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); result.put(DetailType.EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION, new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_LINE_SQUARE_FOR_WIND_DIRECTION, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionLineSquareForWindDirection), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_BARO, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_BARO, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionBaro), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_LOAD_S, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_LOAD_S, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionLoadS), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_LOAD_P, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_LOAD_P, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionLoadP), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_JIB_CAR_PORT, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_JIB_CAR_PORT, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionJibCarPort), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_JIB_CAR_STBD, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_JIB_CAR_STBD, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionJibCarStbd), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); + result.put(DetailType.EXPEDITION_LEG_MAST_BUTT, + new FormattedDoubleDetailTypeColumn(DetailType.EXPEDITION_LEG_MAST_BUTT, new DoubleDetailTypeExtractor(LegEntryDTO::getExpeditionMastButt), detailHeaderStyle, detailColumnStyle, leaderboardPanel)); return result; }