refactering calculating delta v min
refactering calculating delta h min