Distance Test 1

Looking for the FASTEST way to calculate the distance between two WSG-84 lat,lon points. Here using geodesic.js, which is based on formulai from here, using the 'haversine' to calculate great-circle distance. But it uses 7 trig + 2 sqrts. That page also gives an 'equirectangular approximation' using only 1 trig & 1 sqrt, which may be accurate enough for this search for nearby navaids. In tests this getDistRect() took 1/3 to less than 1/4 of the time, so it FASTER, and have not seen any 'big' difference in the lists. EVEN with array of array sorting by distance, still remained 1/3 or less time.

Latitude: Longitude: Distance:
ICAO:
Scanned:
Results:
Scanned2:
Results2:

top