Check that the maxvel is obtainable in a half trapezoidal velocity profile.

Calculate the maximum velocity obtained during the half trapezoidal profile to calculate the correct timing. Prior to this change, the assert in path_composite.cpp that checks the path distance, s, failed if the max velocity was not reached.