calculating distance fixed