diff --git a/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java b/src/org/openstreetmap/josm/data/gpx/GpxImageCorrelation.java
index 023c495be..1750d76d0 100644
|
a
|
b
|
public final class GpxImageCorrelation {
|
| 269 | 269 | if (nextWp != null && dirpos.isSetImageDirection()) { |
| 270 | 270 | double direction = curWp.bearing(nextWp); |
| 271 | 271 | curTmp.setExifImgDir(computeDirection(direction, dirpos.getImageDirectionAngleOffset())); |
| | 272 | } else if (nextWp == null && isLast && dirpos.isSetImageDirection()) { |
| | 273 | //last image in the sequence without any next waypoint-> get previous direction angle |
| | 274 | double direction = prevWp.bearing(curWp); |
| | 275 | curTmp.setExifImgDir(computeDirection(direction, dirpos.getImageDirectionAngleOffset())); |
| 272 | 276 | } |
| 273 | 277 | curTmp.setGpsTime(curImg.getExifInstant().minusMillis(offset)); |
| 274 | 278 | curTmp.flagNewGpsData(); |