2d trilateration

此生再无相见时 提交于 2019-11-28 07:05:31

As the Wikipedia trilateriation article describes, you compute (x,y) coordinates by successively calculating: ex, i, ey, d, j, x, y. You have to be familiar with vector notation, so, for example, ex = (P2 - P1) / ‖P2 - P1‖ means:

  • ex,x = (P2x - P1x) / sqrt((P2x - P1x)2 + (P2y - P1y)2)
  • ex,y = (P2y - P1y) / sqrt((P2x - P1x)2 + (P2y - P1y)2)

Your data is:

  • P1 = (39, 28); r1 = 8
  • P2 = (13, 39); r2 = 11
  • P3 = (16, 40); r3 = 8

The calculation steps are:

  1. ex = (P2 - P1) / ‖P2 - P1‖
  2. i = ex(P3 - P1)
  3. ey = (P3 - P1 - i · ex) / ‖P3 - P1 - i · ex
  4. d = ‖P2 - P1‖
  5. j = ey(P3 - P1)
  6. x = (r12 - r22 + d2) / 2d
  7. y = (r12 - r32 + i2 + j2) / 2j - ix / j
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!