3 ms·
https://openflights.org/ https://openflights.org/ uses the Haversine formula (and much more!) to not just compute distance, but plot great circle flight routes
by jpatokal 8y ago
https://openflights.org/ https://openflights.org/ uses the Haversine formula (and much more!) to not just compute distance, but plot great circle flight routes on a world map:
https://github.com/jpatokal/openflights/blob/master/js/greatcircle.js https://github.com/jpatokal/openflights/blob/master/js/great...
There are a lot of interesting edge cases regarding routes that cross the dateline, the North Pole, etc. Most of the code was taken from Movable Type's incredible library of lat/long code:
http://www.movable-type.co.uk/scripts/latlong.html http://www.movable-type.co.uk/scripts/latlong.html
- dankohn1 8y agoOpenflights is one of my very favorite websites. Thank you! How else would I know that I’ve travelled 2.7x to the moon in the last decade. https://openflights.org/user/dankohn1 https://openflights.org/user/dankohn1