Calculate Moving Length