92380563b25a2b6f43d29e9c8460c53c7c3981fa
java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/data/transformer/CompleteManeuverCurveWithEstimationDataToManeuverForDataAnalysisTransformer.java
| ... | ... | @@ -31,7 +31,7 @@ public class CompleteManeuverCurveWithEstimationDataToManeuverForDataAnalysisTra |
| 31 | 31 | if (maneuver != null) { |
| 32 | 32 | ManeuverForDataAnalysis maneuverForClassification = getManeuverForDataAnalysis(maneuver, |
| 33 | 33 | previousManeuver, nextManeuver, speedScalingDivisor, |
| 34 | - competitorTrackWithElementsToTransform.getBoatClass()); |
|
| 34 | + competitorTrackWithElementsToTransform.getBoatClass(), competitorTrackWithElementsToTransform.getCompetitorName()); |
|
| 35 | 35 | if (maneuverForClassification != null) { |
| 36 | 36 | maneuversForClassification.add(maneuverForClassification); |
| 37 | 37 | } |
| ... | ... | @@ -41,7 +41,7 @@ public class CompleteManeuverCurveWithEstimationDataToManeuverForDataAnalysisTra |
| 41 | 41 | } |
| 42 | 42 | if (maneuver != null) { |
| 43 | 43 | ManeuverForDataAnalysis maneuverForClassification = getManeuverForDataAnalysis(maneuver, previousManeuver, |
| 44 | - null, speedScalingDivisor, competitorTrackWithElementsToTransform.getBoatClass()); |
|
| 44 | + null, speedScalingDivisor, competitorTrackWithElementsToTransform.getBoatClass(), competitorTrackWithElementsToTransform.getCompetitorName()); |
|
| 45 | 45 | if (maneuverForClassification != null) { |
| 46 | 46 | maneuversForClassification.add(maneuverForClassification); |
| 47 | 47 | } |
| ... | ... | @@ -51,7 +51,7 @@ public class CompleteManeuverCurveWithEstimationDataToManeuverForDataAnalysisTra |
| 51 | 51 | |
| 52 | 52 | private ManeuverForDataAnalysis getManeuverForDataAnalysis(CompleteManeuverCurveWithEstimationData maneuver, |
| 53 | 53 | CompleteManeuverCurveWithEstimationData previousManeuver, |
| 54 | - CompleteManeuverCurveWithEstimationData nextManeuver, double speedScalingDivisor, BoatClass boatClass) { |
|
| 54 | + CompleteManeuverCurveWithEstimationData nextManeuver, double speedScalingDivisor, BoatClass boatClass, String competitorName) { |
|
| 55 | 55 | if (maneuver.getWind() == null) { |
| 56 | 56 | return null; |
| 57 | 57 | } |
| ... | ... | @@ -64,7 +64,7 @@ public class CompleteManeuverCurveWithEstimationDataToManeuverForDataAnalysisTra |
| 64 | 64 | new ConvertableManeuverForEstimationAdapterForCompleteManeuverCurveWithEstimationData(maneuver, |
| 65 | 65 | courseChangeInDegreesWithinTurningSectionOfPreviousManeuver, |
| 66 | 66 | courseChangeInDegreesWithinTurningSectionOfNextManeuver), |
| 67 | - speedScalingDivisor, boatClass); |
|
| 67 | + speedScalingDivisor, boatClass, competitorName); |
|
| 68 | 68 | ManeuverTypeForDataAnalysis maneuverType = getManeuverTypeForDataAnalysis(maneuver); |
| 69 | 69 | double absoluteTotalCourseChangeInDegrees = Math.abs(maneuverForEstimation.getCourseChangeInDegrees()); |
| 70 | 70 | double absoluteTotalCourseChangeWithinMainCurveInDegrees = Math |
java/com.sap.sailing.windestimation.lab/src/com/sap/sailing/windestimation/data/transformer/LabeledManeuverForEstimationTransformer.java
| ... | ... | @@ -20,7 +20,7 @@ public class LabeledManeuverForEstimationTransformer implements |
| 20 | 20 | ConvertableToLabeledManeuverForEstimation nextManeuver, double speedScalingDivisor, BoatClass boatClass, |
| 21 | 21 | String regattaName, String competitorName) { |
| 22 | 22 | ManeuverForEstimation maneuverForEstimation = internalTransformer.getManeuverForEstimation(maneuver, |
| 23 | - speedScalingDivisor, boatClass); |
|
| 23 | + speedScalingDivisor, boatClass, competitorName); |
|
| 24 | 24 | ManeuverTypeForClassification maneuverType = getManeuverTypeForClassification(maneuver); |
| 25 | 25 | LabeledManeuverForEstimation labelledManeuverForEstimation = new LabeledManeuverForEstimation( |
| 26 | 26 | maneuverForEstimation.getManeuverTimePoint(), maneuverForEstimation.getManeuverPosition(), |
java/com.sap.sailing.windestimation/src/com/sap/sailing/windestimation/data/transformer/CompleteManeuverCurveWithEstimationDataToManeuverForEstimationTransformer.java
| ... | ... | @@ -24,7 +24,7 @@ public class CompleteManeuverCurveWithEstimationDataToManeuverForEstimationTrans |
| 24 | 24 | List<ConvertableToLabeledManeuverForEstimation> convertableManeuvers = ConvertableManeuverForEstimationAdapterForCompleteManeuverCurveWithEstimationData |
| 25 | 25 | .getConvertableManeuvers(competitorTrackWithElementsToTransform.getElements()); |
| 26 | 26 | return internalTransformer.getManeuversForEstimation(convertableManeuvers, |
| 27 | - competitorTrackWithElementsToTransform.getBoatClass()); |
|
| 27 | + competitorTrackWithElementsToTransform.getBoatClass(), competitorTrackWithElementsToTransform.getCompetitorName()); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | } |
java/com.sap.sailing.windestimation/src/com/sap/sailing/windestimation/data/transformer/ManeuverForEstimationTransformer.java
| ... | ... | @@ -4,7 +4,6 @@ import java.util.ArrayList; |
| 4 | 4 | import java.util.List; |
| 5 | 5 | |
| 6 | 6 | import com.sap.sailing.domain.base.BoatClass; |
| 7 | -import com.sap.sailing.domain.base.Competitor; |
|
| 8 | 7 | import com.sap.sailing.windestimation.data.CompetitorTrackWithEstimationData; |
| 9 | 8 | import com.sap.sailing.windestimation.data.ManeuverCategory; |
| 10 | 9 | import com.sap.sailing.windestimation.data.ManeuverForEstimation; |
| ... | ... | @@ -24,12 +23,12 @@ public class ManeuverForEstimationTransformer |
| 24 | 23 | public static final int MIN_SECONDS_TO_OTHER_MANEUVER = 4; |
| 25 | 24 | |
| 26 | 25 | public List<ManeuverForEstimation> getManeuversForEstimation( |
| 27 | - List<? extends ConvertableToManeuverForEstimation> convertableManeuvers, BoatClass boatClass) { |
|
| 26 | + List<? extends ConvertableToManeuverForEstimation> convertableManeuvers, BoatClass boatClass, String competitorName) { |
|
| 28 | 27 | double speedScalingDivisor = getSpeedScalingDivisor(convertableManeuvers); |
| 29 | 28 | List<ManeuverForEstimation> maneuversForEstimation = new ArrayList<>(); |
| 30 | 29 | for (ConvertableToManeuverForEstimation maneuver : convertableManeuvers) { |
| 31 | 30 | ManeuverForEstimation maneuverForEstimation = getManeuverForEstimation(maneuver, speedScalingDivisor, |
| 32 | - boatClass); |
|
| 31 | + boatClass, competitorName); |
|
| 33 | 32 | maneuversForEstimation.add(maneuverForEstimation); |
| 34 | 33 | } |
| 35 | 34 | return maneuversForEstimation; |
| ... | ... | @@ -150,12 +149,7 @@ public class ManeuverForEstimationTransformer |
| 150 | 149 | } |
| 151 | 150 | |
| 152 | 151 | public ManeuverForEstimation getManeuverForEstimation(ConvertableToManeuverForEstimation maneuver, |
| 153 | - double speedScalingDivisor, BoatClass boatClass) { |
|
| 154 | - return getManeuverForEstimation(maneuver, speedScalingDivisor, boatClass, null); |
|
| 155 | - } |
|
| 156 | - |
|
| 157 | - public ManeuverForEstimation getManeuverForEstimation(ConvertableToManeuverForEstimation maneuver, |
|
| 158 | - double speedScalingDivisor, BoatClass boatClass, Competitor competitor) { |
|
| 152 | + double speedScalingDivisor, BoatClass boatClass, String competitorName) { |
|
| 159 | 153 | ManeuverCategory maneuverCategory = getManeuverCategory(maneuver); |
| 160 | 154 | double speedLossRatio = maneuver.getSpeedWithBearingBefore().getKnots() > 0 |
| 161 | 155 | ? maneuver.getLowestSpeed().getKnots() / maneuver.getSpeedWithBearingBefore().getKnots() |
| ... | ... | @@ -182,7 +176,7 @@ public class ManeuverForEstimationTransformer |
| 182 | 176 | deviationFromOptimalTackAngleInDegrees, deviationFromOptimalJibeAngleInDegrees, speedLossRatio, |
| 183 | 177 | speedGainRatio, lowestSpeedVsExitingSpeedRatio, clean, maneuverCategory, scaledSpeedBeforeInKnots, |
| 184 | 178 | scaledSpeedAfterInKnots, maneuver.isMarkPassing(), boatClass, markPassingDataAvailable, |
| 185 | - competitor==null?null:competitor.getName()); |
|
| 179 | + competitorName); |
|
| 186 | 180 | return maneuverForEstimation; |
| 187 | 181 | } |
| 188 | 182 | |
| ... | ... | @@ -190,7 +184,7 @@ public class ManeuverForEstimationTransformer |
| 190 | 184 | public List<ManeuverForEstimation> transformElements( |
| 191 | 185 | CompetitorTrackWithEstimationData<ConvertableToManeuverForEstimation> competitorTrackWithElementsToTransform) { |
| 192 | 186 | return getManeuversForEstimation(competitorTrackWithElementsToTransform.getElements(), |
| 193 | - competitorTrackWithElementsToTransform.getBoatClass()); |
|
| 187 | + competitorTrackWithElementsToTransform.getBoatClass(), competitorTrackWithElementsToTransform.getCompetitorName()); |
|
| 194 | 188 | } |
| 195 | 189 | |
| 196 | 190 | } |
java/com.sap.sailing.windestimation/src/com/sap/sailing/windestimation/integration/CompleteManeuverCurveToManeuverForEstimationConverter.java
| ... | ... | @@ -111,7 +111,7 @@ public class CompleteManeuverCurveToManeuverForEstimationConverter { |
| 111 | 111 | // TODO compute scaledSpeedDivisor, recompute maneuverForEstimation, reclassify all maneuver instances if |
| 112 | 112 | // scaledSpeedDivisor has significantly changed? |
| 113 | 113 | ManeuverForEstimation maneuverForEstimation = maneuverForEstimationTransformer |
| 114 | - .getManeuverForEstimation(convertableManeuver, 1.0, boatClass, competitor); |
|
| 114 | + .getManeuverForEstimation(convertableManeuver, 1.0, boatClass, competitor.getName()); |
|
| 115 | 115 | return maneuverForEstimation; |
| 116 | 116 | } |
| 117 | 117 |