distance= duration*0.034/2;
Both distance and duration are integers, so this just sets distance to zero.