How to calculate distance and elevation of toe point