00a0d6141cf1448af32c3c8df723f5e4bfd82f9f
java/com.sap.sailing.domain.test/src/com/sap/sailing/domain/test/CourseChangeBasedTrackApproximationTest.java
| ... | ... | @@ -34,6 +34,9 @@ import com.sap.sse.common.impl.MillisecondsTimePoint; |
| 34 | 34 | public class CourseChangeBasedTrackApproximationTest extends OnlineTracTracBasedTest { |
| 35 | 35 | private DynamicGPSFixTrack<Competitor, GPSFixMoving> track; |
| 36 | 36 | private CourseChangeBasedTrackApproximation approximation; |
| 37 | + private Iterable<Competitor> competitors; |
|
| 38 | + private CompetitorWithBoat sampleCompetitor; |
|
| 39 | + private DynamicGPSFixTrack<Competitor, GPSFixMoving> sampleTrack; |
|
| 37 | 40 | |
| 38 | 41 | public CourseChangeBasedTrackApproximationTest() throws MalformedURLException, URISyntaxException { |
| 39 | 42 | super(); |
| ... | ... | @@ -49,14 +52,11 @@ public class CourseChangeBasedTrackApproximationTest extends OnlineTracTracBased |
| 49 | 52 | new ReceiverType[] { ReceiverType.RACECOURSE, ReceiverType.RAWPOSITIONS }); |
| 50 | 53 | getTrackedRace().waitUntilNotLoading(); |
| 51 | 54 | assertFalse(Util.isEmpty(getTrackedRace().getRace().getCompetitors())); |
| 52 | - final Competitor sampleCompetitor = getTrackedRace().getRace().getCompetitors().iterator().next(); |
|
| 53 | - final DynamicGPSFixTrack<Competitor, GPSFixMoving> sampleTrack = getTrackedRace().getTrack(sampleCompetitor); |
|
| 54 | - sampleTrack.lockForRead(); |
|
| 55 | - try { |
|
| 56 | - assertFalse(Util.isEmpty(sampleTrack.getRawFixes()), "Track of competitor "+sampleCompetitor.getName()+" is empty"); |
|
| 57 | - } finally { |
|
| 58 | - sampleTrack.unlockAfterRead(); |
|
| 59 | - } |
|
| 55 | + do { |
|
| 56 | + competitors = getTrackedRace().getRace().getCompetitors(); |
|
| 57 | + sampleCompetitor = (CompetitorWithBoat) Util.get(competitors, new Random().nextInt(Util.size(competitors))); |
|
| 58 | + sampleTrack = getTrackedRace().getTrack(sampleCompetitor); |
|
| 59 | + } while (sampleTrack.isEmpty()); |
|
| 60 | 60 | final CompetitorWithBoat competitor = TrackBasedTest.createCompetitorWithBoat("Someone"); |
| 61 | 61 | track = new DynamicGPSFixMovingTrackImpl<Competitor>(competitor, |
| 62 | 62 | /* millisecondsOverWhichToAverage */5000, /* lossless compaction */true); |
| ... | ... | @@ -79,9 +79,6 @@ public class CourseChangeBasedTrackApproximationTest extends OnlineTracTracBased |
| 79 | 79 | */ |
| 80 | 80 | @Test |
| 81 | 81 | public void testNoDiffBetweenEarlyAndLateInitialization() { |
| 82 | - final Iterable<Competitor> competitors = getTrackedRace().getRace().getCompetitors(); |
|
| 83 | - final CompetitorWithBoat sampleCompetitor = (CompetitorWithBoat) Util.get(competitors, new Random().nextInt(Util.size(competitors))); |
|
| 84 | - final DynamicGPSFixTrack<Competitor, GPSFixMoving> sampleTrack = getTrackedRace().getTrack(sampleCompetitor); |
|
| 85 | 82 | final DynamicGPSFixTrack<Competitor, GPSFixMoving> trackCopy = new DynamicGPSFixMovingTrackImpl<Competitor>(sampleCompetitor, /* millisecondsOverWhichToAverage */ 15000); |
| 86 | 83 | final CourseChangeBasedTrackApproximation earlyInitApproximation = new CourseChangeBasedTrackApproximation(trackCopy, sampleCompetitor.getBoat().getBoatClass()); |
| 87 | 84 | final TimePoint from = sampleTrack.getFirstRawFix().getTimePoint(); |
java/com.sap.sailing.windestimation/src/com/sap/sailing/windestimation/aggregator/hmm/GraphNodeTransitionProbabilitiesCalculator.java
| ... | ... | @@ -52,7 +52,4 @@ public interface GraphNodeTransitionProbabilitiesCalculator<GL extends GraphLeve |
| 52 | 52 | GL currentLevel); |
| 53 | 53 | |
| 54 | 54 | WindCourseRange getWindCourseRangeForManeuverType(ManeuverForEstimation maneuver, ManeuverTypeForClassification maneuverType); |
| 55 | - |
|
| 56 | - boolean isPropagateIntersectedWindRangeOfHeadupAndBearAway(); |
|
| 57 | - |
|
| 58 | 55 | } |
java/com.sap.sailing.windestimation/src/com/sap/sailing/windestimation/aggregator/hmm/IntersectedWindRangeBasedTransitionProbabilitiesCalculator.java
| ... | ... | @@ -177,9 +177,4 @@ public class IntersectedWindRangeBasedTransitionProbabilitiesCalculator<GL exten |
| 177 | 177 | protected Duration getDuration(ManeuverForEstimation fromManeuver, ManeuverForEstimation toManeuver) { |
| 178 | 178 | return fromManeuver.getManeuverTimePoint().until(toManeuver.getManeuverTimePoint()).abs(); |
| 179 | 179 | } |
| 180 | - |
|
| 181 | - public boolean isPropagateIntersectedWindRangeOfHeadupAndBearAway() { |
|
| 182 | - return propagateIntersectedWindRangeOfHeadupAndBearAway; |
|
| 183 | - } |
|
| 184 | - |
|
| 185 | 180 | } |