Go Back  FlyerTalk Forums > Travel&Dining > TravelBuzz
Reload this Page >

Calculating distance between two airports?

Community
Wiki Posts
Search

Calculating distance between two airports?

Thread Tools
 
Search this Thread
 
Old Sep 26, 2005, 2:48 pm
  #1  
Original Poster
 
Join Date: Sep 2004
Location: SFO
Programs: UA & SPG
Posts: 257
Calculating distance between two airports?

Given the latitude, longitude, and elevation of two airports, what is the formula for calculating the distance between the two? I tried searching the web but couldn't find anything.
mshafrir is offline  
Old Sep 26, 2005, 2:50 pm
  #2  
Moderator, Hilton Honors
 
Join Date: Nov 2003
Location: on a short leash
Programs: some
Posts: 71,422
check out Great Circle Mapper
Kiwi Flyer is offline  
Old Sep 26, 2005, 3:49 pm
  #3  
KVS
FlyerTalk Evangelist
 
Join Date: Jan 2004
Location: Worldwide
Posts: 12,949
Originally Posted by mshafrir
Given the latitude, longitude, and elevation of two airports, what is the formula for calculating the distance between the two? I tried searching the web but couldn't find anything.
From the Great Circle Mapper FAQ (http://gc.kls2.com/faq.html#$gc-calc):
Is there a simple way to compute great circle distances?

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.
KVS is offline  


Contact Us - Manage Preferences - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.