calculate KM for route