Permalink
simon.menke on distance
  • vote
    195
    0 starssimon.menke | Shared With: Everyone - Dec 13 2006 | haversine, distance, js, code, good

    var R = 6371; // earth's mean radius in km var dLat = p2.lat - p1.lat; var dLong = p2.lon - p1.lon; var a = Math.sin(dLat/2) * Math.sin(dLat/2) + Math.cos(p1.lat) * Math.cos(p2.lat) * Math.sin(dLong/2) * Math.sin(dLong/2); var c = 2 *

1 - 1 of 1 Faves

Related Content from Around Faves

code

VIEW ALL

good

VIEW ALL