Shouldn't you be calculating tdelay as (total time for the move)/(number of movements required to get there)?
Steve