From ff1b987463848fdce46e6615b6c35fbad282e08a Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sun, 18 Nov 2018 15:22:31 +0100 Subject: [PATCH] Use a better earth radius --- src/constants.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/constants.js b/src/constants.js index 0d131fa..5e373a0 100644 --- a/src/constants.js +++ b/src/constants.js @@ -31,7 +31,10 @@ export const UPDATE_REPORTS_DISTANCE_THRESHOLD = 500; // in meters // Minimal number of downvotes needed for a report to be masked export const REPORT_DOWNVOTES_THRESHOLD = 1; -export const EARTH_RADIUS = 6378137; // in meters +// Earth radius as recommended by the International Union of Geodesy and +// Geophysics +// https://rosettacode.org/wiki/Haversine_formula +export const EARTH_RADIUS = 6371000; // in meters // Keep reports only in a given radius around map center. export const KEEP_REPORTS_METERS_AROUND = 10000; // in meters