@Override
public long calculateDuration(INavigableVessel vessel, PathInterpolator interpolator, double fraction) {
double speedKmPerH = vessel.getCurrentSpeed();
double distanceInPixels = interpolator.getTotalLength() * fraction;
double distanceInKm = mapService.convertToDistenceInKm(distanceInPixels);
double tickUpdateInHours = date.getTickUpdate()/60.0;
double inGameAnimationDurationInHours = distanceInKm/speedKmPerH;
long nbTicks = Math.round(Math.ceil(inGameAnimationDurationInHours / tickUpdateInHours));
logger.debug("Distance of {}km can be traveled in {}h at {}km/h, which results in {} clock ticks or {}ms, fraction to travel={}",distanceInKm, inGameAnimationDurationInHours, speedKmPerH, nbTicks, EngineConfiguration.CLOCK_TICK_INTERVALL_MS * nbTicks, fraction);
return EngineConfiguration.CLOCK_TICK_INTERVALL_MS * nbTicks;
}