Use a better earth radius

This commit is contained in:
Lucas Verney 2018-11-18 15:22:31 +01:00
parent dcfa5c5897
commit ff1b987463
1 changed files with 4 additions and 1 deletions

View File

@ -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