calculate net distance travelled
calculated the smoothened distace