src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java b/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java
index 1750d76d0..d9591aa12 100644
|
a
|
b
|
public final class GpxImageCorrelation {
|
| 286 | 286 | // This code gives a simple linear interpolation of the coordinates between current and |
| 287 | 287 | // previous track point assuming a constant speed in between |
| 288 | 288 | @SuppressWarnings("null") |
| 289 | | LatLon nextCoorForDirection = nextWp.getCoor(); |
| | 289 | LatLon nextCoorForDirection = curWp.getCoor(); |
| 290 | 290 | while (i >= 0) { |
| 291 | 291 | final GpxImageEntry curImg = images.get(i); |
| 292 | 292 | final long imgTime = curImg.getExifInstant().toEpochMilli(); |
| … |
… |
public final class GpxImageCorrelation {
|
| 302 | 302 | final LatLon curCoor = curWp.getCoor(); |
| 303 | 303 | LatLon position = prevCoor.interpolate(curCoor, timeDiff); |
| 304 | 304 | if (nextCoorForDirection != null && (shiftXY || dirpos.isSetImageDirection())) { |
| | 305 | if (nextCoorForDirection.equals(curCoor)) { |
| | 306 | nextCoorForDirection = nextWp.getCoor(); |
| | 307 | } |
| 305 | 308 | double direction = position.bearing((ILatLon) nextCoorForDirection); |
| 306 | 309 | if (dirpos.isSetImageDirection()) { |
| 307 | 310 | curTmp.setExifImgDir(computeDirection(direction, dirpos.getImageDirectionAngleOffset())); |