mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-01 18:03:59 +00:00
fixed test case so it won't consider null fixes for cache additions
This commit is contained in:
1 parent
2a9687ac14
commit
820aceccc1
2 files changed
+5
-2
No files matched your search
+3
-1
@@ -105,7 +105,9 @@ public class WindEstimationOnConstructedTracksTest extends StoredTrackBasedTest
|
||||
@Override
|
||||
protected void cache(TimePoint timePoint, Wind fix) {
|
||||
super.cache(timePoint, fix);
|
||||
cachedFixes.put(timePoint, fix);
|
||||
if (fix != null) {
|
||||
cachedFixes.put(timePoint, fix);
|
||||
}
|
||||
}
|
||||
};
|
||||
Wind estimatedWindDirection = track.getEstimatedWind(/* position */ null, now);
|
||||
|
||||
+2
-1
@@ -232,7 +232,8 @@ public class DynamicTrackedRaceImpl extends TrackedRaceImpl implements
|
||||
|
||||
@Override
|
||||
public void gpsFixReceived(GPSFix fix, Competitor competitor) {
|
||||
if (getStart() == null || getStart().compareTo(fix.getTimePoint())>0) {
|
||||
TimePoint start = getStart();
|
||||
if (start == null || start.compareTo(fix.getTimePoint())>0) {
|
||||
// infer race start time from fix; earliest fix received defines start if earlier than assumed start so far
|
||||
setStartTimeReceived(fix.getTimePoint());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user