e28efc65cadfc9945cc8ccab5ae087fdd955f5f4
java/com.sap.sailing.domain/src/com/sap/sailing/domain/tracking/impl/CourseChangeBasedTrackApproximation.java
| ... | ... | @@ -162,8 +162,9 @@ public class CourseChangeBasedTrackApproximation implements Serializable, GPSTra |
| 162 | 162 | GPSFixMoving add(GPSFixMoving next) { |
| 163 | 163 | assert window.isEmpty() || !next.getTimePoint().before(window.peekFirst().getTimePoint()); |
| 164 | 164 | final GPSFixMoving result; |
| 165 | - final SpeedWithBearing nextSpeed = /* TODO this was the original code that can depend on fixes newer than next: next.isEstimatedSpeedCached() ? next.getCachedEstimatedSpeed() : track.getEstimatedSpeed(next.getTimePoint()); */ |
|
| 166 | - next.getSpeed(); int TODO; // TODO bug6209: try without dependency on newer fixes and see if it helps produce equal results for early/late initialization |
|
| 165 | + final SpeedWithBearing nextSpeed = /* TODO this was the original code that can depend on fixes newer than next: */ next.isEstimatedSpeedCached() ? next.getCachedEstimatedSpeed() : track.getEstimatedSpeed(next.getTimePoint()); |
|
| 166 | +// next.getSpeed(); |
|
| 167 | + int TODO; // TODO bug6209: try without dependency on newer fixes and see if it helps produce equal results for early/late initialization |
|
| 167 | 168 | if (nextSpeed != null) { // TODO bug6209: this gets messy... if we drop a fix because no estimated speed can be determined for it, and later fix additions may change this, where would we get this fix from again? |
| 168 | 169 | numberOfFixesAdded++; |
| 169 | 170 | int insertPosition = window.size(); |
| ... | ... | @@ -240,7 +241,7 @@ public class CourseChangeBasedTrackApproximation implements Serializable, GPSTra |
| 240 | 241 | // analysis window has exceeded the typical maneuver duration for the boat class; |
| 241 | 242 | final Pair<GPSFixMoving, Integer> candidateAndItsIndex = getManeuverCandidate(); |
| 242 | 243 | if (candidateAndItsIndex != null) { |
| 243 | - removeFirst(candidateAndItsIndex.getB()); // remove all including the maneuver fix |
|
| 244 | + removeFirst(candidateAndItsIndex.getB()+1); // remove all including the maneuver fix |
|
| 244 | 245 | } |
| 245 | 246 | return candidateAndItsIndex == null ? null : candidateAndItsIndex.getA(); |
| 246 | 247 | } |