Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is there a simple way to compute great circle distances?

0
Posted

Is there a simple way to compute great circle distances?

0

Assuming Earth is a perfect sphere of radius 6371.2 km, convert longitude and latitude to radians (multiply by pi/180), then compute as follows: theta = lon2 – lon1 dist = acos(sin(lat1) × sin(lat2) + cos(lat1) × cos(lat2) × cos(theta)) if (dist < 0) dist = dist + pi dist = dist × 6371.2 The resulting distance is in kilometers.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.