title: BLE (iBeacons) Trilateration
body: <p>I'm a student at the University of Furtwangen in Germany.</p>
  
  <p>I am in my final term and I am writing my thesis now. I'm very interested in iBeacons and the technology behind them. My current project is to compare the beacon technology with other technologies like GPS, Wireless-location, GSM, and NFC. For my thesis, I will create different use-cases and compare the results.</p>
  
  <p>Over the last few days I've tried to determine my position in a room. I use the relative distance (accuracy) from three beacons and gave every beacon a fixed position in my room.
  I get three circles and calculate 6 intersections.
  When a radian (accuracy) is too low I increase this value artificially. Then I look which of the 6 points (intersections) are the nearest. (The three nearest points)
  With those points I get an triangle, and with this I calculate the middle point.</p>
  
  <p>My problem is that the result is not really the best. </p>
  
  <p>I found a better solution here:</p>
  
  <p><a href="https://gis.stackexchange.com/questions/40660/trilateration-algorithm-for-n-amount-of-points">https://gis.stackexchange.com/questions/40660/trilateration-algorithm-for-n-amount-of-points</a></p>
  
  <p>but I have am having trouble implementing this in Objective C. 
  But I understand the solution. How can I import or get this in Objective C.
  I found some libs (C, C++) but I'm not really sure which of these libs is the best.</p>
  
  <p>The best solution for me will be a Objectice C math library which can calculate with these points (x1,x2,x3,  --  ,y1,y2,y3, --- ,r1,r2,r3).</p>
  
  <p><a href="https://i.stack.imgur.com/jFIzi.png" rel="nofollow noreferrer">Graphic of my calculation now</a></p>