IITC-CE / ingress-intel-total-conversion

intel.ingress.com total conversion user script with some new features. Should allow easier extension of the intel map.
https://iitc.app
ISC License
290 stars 109 forks source link

Earth radius #122

Closed johnd0e closed 4 years ago

johnd0e commented 5 years ago
commit 522ef34f77c86c54cc7586a298d5a6f74f75aef4
Author: Jon Atkins <github@jonatkins.com>
Date:   Thu Mar 12 20:47:05 2015 +0000

    earth radius: change leaflet and leaflet-draw to use the radius value used by the s2 geometry library

diff --git a/external/L.Geodesic.js b/external/L.Geodesic.js
diff --git a/external/leaflet-src.js b/external/leaflet-src.js
diff --git a/external/leaflet.draw.js b/external/leaflet.draw.js

We need to investigate if this change was necessary.

Originally posted by @johnd0e in https://github.com/IITC-CE/ingress-intel-total-conversion/pull/78#issuecomment-462323839

johnd0e commented 5 years ago

More related links:

johnd0e commented 5 years ago

diff --git a/external/L.Geodesic.js b/external/L.Geodesic.js

Radius value here does not have to be precise, so that change had no sense.

McBen commented 4 years ago

S2-Earth-Radius is used in distance calculation. You'll see the difference in draw-tools (or other plugins when they use LatLng.distanceTo)

Current used radius result im more accurate distances but Ingress uses the S2 value for link-distance calculation - which is sometimes a important value.