Calculate elapsed distance