Actually estimates the correct distance, instead of just assuming. The better way would be to just directly calculate, instead of my iterative estimation method, but this works.