Documente Academic
Documente Profesional
Documente Cultură
I post this question in stackoverflow here and was advised it was best suited for here.
I am trying to understand the maths behind trilateration, we have 3 access points (AP's: 1, 2, 3)
6
and we know the centre coordinates of theses 3 (AP's). Lost device (X ) is the location where all 3
circle intersect.
2 Known Locations: AP 1 = (5, 5), AP2 = (5, 15), AP3 = (20, 10).
Unknown Location: X
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our
Terms of Service.
coordinate-systems
3 Answers
Use the distance equation. If your unknown point is (x, y), your known points are (x i, yi ) which are
distances r from your unknown point, then you get three equations:
i
8 2 2 2
(x − x 1 ) + (y − y1 ) = r
1
2 2 2
(x − x 2 ) + (y − y2 ) = r
2
2 2 2
(x − x 3 ) + (y − y3 ) = r
3
2 2 2 2 2
x − 2x 2 x + x + y − 2y2 y + y = r
2 2 2
2 2 2 2 2
x − 2x 3 x + x + y − 2y3 y + y = r
3 3 3
CE − F B
x =
EA − BD
C D − AF
y =
BD − AE
Thanks john, first bit I got and worked R1= 7.2112, R2 = 5.6568, R3 = 11.045. the next bit I'm not sure about
can you explain to me (−2x1+2x2)x+(−2y1+2y2)y+x21−x22+y21−y22=r21−r22. @John – Gman Aug 1 '14 at
18:00
I expanded out the squares in the first two equations. So (x − x ) became x − 2x x + x , for example.
1
2 2
1
2
1
Since the equations all have x + y on the left hand side, subtracting one from another gets rid of them. This
2 2
leaves the linear terms x and y only, which is a lot nicer to deal with. – John Aug 1 '14 at 18:14
sorry if I sound stupid on this john but I find in order for we to be good at this I need to have a good
understanding of it. so when I punch the numbers in this is how it looks is that correct 9*(-2*5+2*5)+11*
do you think you could show me how its done, the solution worked out. I really appreciate your help on this
and any knowledge gained I will pass on to someone else. – Gman Aug 2 '14 at 13:59
I've got information from 3 cell towers about the exact time when they received a signal, down to
0 the nanosecond. But I don't know when the message was sent. So my problem is to look for 3
intersecting circles, that have a common unknown offset added to their radius.
At light speed, every nanosecond allows a radio wave to advance 0.0003 kilometers. I'm
approximating the map of Holland, where all this is happening, as a flat rectangle where every
degree longitude counts for 66 kilometers, while a degree latitude equals 105 kilometers.
I've got these cell tower coordinates, with the time of signal reception:
The online graphing with desmos.com was an awesome find ! Thanks MatMc. It allows me to
quickly draw this situation as : https://www.desmos.com/calculator/gsrvhwvt6o As (x,y)
coordinates, I used the lat/long degrees, which makes it easy to plug any results into Google Maps.
The drawback is that this makes units of both axis different in size, so every real-life circle on the
By usingmap
our site,
getsyou acknowledge
drawn that you have grid
on the mathematical read as
andan
understand
ellipse. our Cookie Policy, Privacy Policy, and our
Terms of Service.
Now what really bothers me, is the appearance of 2 perfect intersections, upon picking the proper
time offsets. I got a razor-sharp location fix for both d=-12.950967 and d=-12.172546 . Earlier on, I
drew some quick circles by hand, and I concluded that the northernmost intersection was the
location. A triangulation van was dispatched, and thankfully they found the signal at that location.
Now I realize that I just got lucky. I could just as well have bumped into the southernmost
intersection, by choosing a different common offset, and then the guys would have found nothing
there.
I have a solution that works quite well. It involves finding the centroid which will help for scenarios
where the circles don't intersect perfectly.
0 Suppose you have three receivers located at three known points A(0, 0) , B(0, 1) , C (1, 0).
And suppose the the distance from each receiver is known; therefore a circle can be drawn around
each receiver with a radius as follows:
a
2
= (x − 0)
2
+ (y − 0)
2
; (red circle)
b
2
= (x − 0)
2
+ (y − 1)
2
; (blue circle)
c
2
= (x − 1)
2
+ (y − 0)
2
; (green circle)
this problem can be understood as drawing lines between the two points at which each circle
intersects. If these three lines are drawn, then they will all intersect at one point.
circle A and circle B intersect when c^2 = a^2. Note that the 'y' term will cancel out and only leave
an 'x' value as follows, which draws a line between them:
x = (1 − c
2 2
+ a )/2 ;
x = (z + 2y)/2
This will execute trilateration well even if the circles don't intersect perfectly.
Try it out on a website like www.desmos.com, as I did in the picture attached, and play with the
values of a,b,c to see if you make the model better!
438 1 6 17 1
@Mat Mc can you send me your working that you did on www.desmos.com/calculator I'd like to see it. Thanks
for the heads up on that site, just what I was looking for. – Gman Apr 1 '15 at 0:23
GMAN: go and give it a try first. step 1: plug the 6 equations into desmos. step 2: give 'a', b', and 'c' values. If
you get lost at plugging the equations in GMAN, look at the picture posted "trilateration picture HERE." Super
easy, you can do it! – Mat Mc Apr 1 '15 at 14:53
Looks like the two missing equations from the screenshot are: a^2 = x^2 + y^2 and x = (b^2 - c^2 +
2y)/2 . Here's a pre-populated version: desmos.com/calculator/dvkm1rovv9 – Senseful Sep 29 '18 at 19:49
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our
Terms of Service.