1

On a project where we need to calculate the approximate location of a user based on the following data.

{ '0': 
   { center: { lat: 53.642487, lng: 7.957801 },
     distance: { km: 252.6674927981718, mi: 157 },
     name: 'User1' },
  '1': 
   { center: { lat: 53.585566, lng: 3.95973 },
     distance: { km: 151.2786262613258, mi: 94 },
     name: 'User2' },
  '2': 
   { center: { lat: 50.822884, lng: 3.4 },
     distance: { km: 199.55903889791912, mi: 124 },
     name: 'User3' },
  '3': 
   { center: { lat: 49.868711, lng: 6.078707 },
     distance: { km: 291.2918229074465, mi: 181 },
     name: 'User4' } }

Based on this, we are able to determine the approximate location of the user visually. But we want to be able to tell the software we are working on the coordinates instead of the following visual: User location

The user should be in the midle of the four crossing lines, which i've captured in a zoom from the following radius: Radius

Is there a way (e.g. Triangulation) in which we can calculate the aproximate coordinates of the user?

Thanks in advance

R3H4Bit
  • 11
  • 1
  • See : https://stackoverflow.com/questions/3349125/circle-circle-intersection-points to get the intersections, and then average the coordinates. Also keep in mind that this only work in normal 2D space, you'd have to make adjustments for conditions where you cross 0 latitude/longitude – Brahma Dev Mar 24 '18 at 18:21
  • I've tried the above solution but that function is not at all built around latitute and longtitude sadly so it would be way too much work for our purpose, thanks anyway. We're hoping for some kind of library which is built for this specific purpose. – R3H4Bit Mar 24 '18 at 18:54

0 Answers0