title: Trilateration using 3 latitude and longitude points, and 3 distances
body: <p>There exists an unknown target location (latitude and longitude co-ordinates). I have 3 latitude and longitude co-ordinate pairs and for each pair a distance in kilometers to the target location. How can I calculate the co-ordinates of the target location?</p>
  
  <p>For example, say I have the following data points</p>
  
  <pre><code>37.418436,-121.963477   0.265710701754km
  37.417243,-121.961889   0.234592423446km
  37.418692,-121.960194   0.0548954278262km
  </code></pre>
  
  <p>What I'd like is what would the guts of the function that takes that as input and returns <code>37.417959,-121.961954</code> as output look like?</p>
  
  <p>I understand how to calculate the distance between two points, from <a href="http://www.movable-type.co.uk/scripts/latlong.html" rel="noreferrer">http://www.movable-type.co.uk/scripts/latlong.html</a> I understand the general principle that with three circles you get exactly one point of overlap. What I'm hazy on is the math needed to calculate that point with this input.</p>