modified the fix-recording replication operations such that they write the fixes in all cases;

regardless of the tracking times interval; for this, added corresponding overloaded methods of
DynamicTrackedRace.record... that can be parameterized to force writing the fix; we had that
already for recordWind

Change-Id: Ib6b125d2683e90abb2220a52bf74732dc8c627bc
This commit is contained in:
Axel Uhl committed 2016-04-08 16:02:41 +02:00
1 parent f2a903a7cd
commit 18725c81ae
7 files changed
+42 -12

No files matched your search

@@ -33,7 +33,7 @@ public class RecordCompetitorGPSFix extends AbstractRaceOperation<Void> {
public Void internalApplyTo(RacingEventService toState) throws Exception {
DynamicTrackedRace trackedRace = (DynamicTrackedRace) toState.getTrackedRace(getRaceIdentifier());
Competitor competitor = trackedRace.getRace().getCompetitorById(competitorID);
trackedRace.recordFix(competitor, gpsFix);
trackedRace.recordFix(competitor, gpsFix, /* onlyWhenInTrackingTimeInterval */ false); // record the fix in any case
return null;
}
@@ -32,7 +32,7 @@ public class RecordMarkGPSFixForExistingTrack extends RecordMarkGPSFix {
public Void internalApplyTo(RacingEventService toState) throws Exception {
DynamicTrackedRace trackedRace = getTrackedRace(toState);
Mark mark = getMarkById(trackedRace);
trackedRace.recordFix(mark, getFix());
trackedRace.recordFix(mark, getFix(), /* onlyWhenInTrackingTimeInterval */ false); // record the fix in any case
return null;
}
@@ -25,7 +25,7 @@ public class RecordMarkGPSFixForNewMarkTrack extends RecordMarkGPSFix {
@Override
public Void internalApplyTo(RacingEventService toState) throws Exception {
DynamicTrackedRace trackedRace = getTrackedRace(toState);
trackedRace.recordFix(mark, getFix());
trackedRace.recordFix(mark, getFix(), /* onlyWhenInTrackingTimeInterval */ false); // record the fix in any case
return null;
}
}
@@ -17,7 +17,7 @@ public class RecordWindFix extends AbstractWindOperation {
@Override
public Void internalApplyTo(RacingEventService toState) throws Exception {
DynamicTrackedRace trackedRace = (DynamicTrackedRace) toState.getTrackedRace(getRaceIdentifier());
trackedRace.recordWind(getWind(), getWindSource());
trackedRace.recordWind(getWind(), getWindSource(), /* applyFilter */ false);
return null;
}