Advanced Math/Trilateration Formula for more than 3 points
QUESTION: Hi Randy,
Never used this site before, looks interesting as I'm out my depth on this one! hahah :)
I am trying to code a function in Java to find the best fit center point from a number of know points based on signal strength to the points. signal strength can roughly be mapped as a distance and trilateration used. distance is obviously not exact in this model.
I have found this article most useful and the formula used seems to work pretty well, for 3 points;
This is fine for 3 points. But I have no idea how to adapt the Math formula to account for 4+ nodes. I need a formula that can work with more than 3 and arrives at a best solution.
To complicate the maths even more, I would like it to weight the solution more to those circles where the radius is less. This is because the range of error on the weaker signals is far greater. so where the problem has 5 points, and trilateration produces a different results depending on which 3 of the 5 nodes were used, the 3 nodes with lesser radius, were more likely to product the correct result.
I hope this is understandable to you, and even more, I hope your brain in better than mine to figure it out and that it seems a worthwhile challenge!! :)
Thanks in advice, for any help!
ANSWER: Hi Michael, just wanted to let you know I'm working on your problem and am making progress. Will have some results shortly.
Michael, I came up with some formulas that you can use for your problem. The derivations are in the attached file.
This was a really good question. You're correct in seeing that the trilateration approach is fine for 3 points but does not adapt itself to 4 or more points. For this 2-D problem, having 4+ points means it is an overdetermined system and suggests using a least squares approach. This is like having a bunch of points in the x-y planes and fitting a line through them, which requires calculating the optimal values for the 2 parameters defining the line.
I adopted the terminology of calling the points pingers since they could represent an active sonar pinging at a target and getting a distance measurement. The goal of the calculation is to take all the distance measurements and calculate an optimal estimate of the location of the target.
You also bring up the excellent fact that pingers nearer the target (smaller radius) should be more reliable and thus be weighted more heavily. I've included this in my derivation as well.
Hope this makes sense.
---------- FOLLOW-UP ----------
QUESTION: Thanks for the excellent input in solving the problem, I can see you have a much better grasp of what you are doing than I ever have!
Would it be possible to ask you to show how you use the equations in a simple example case of say 4 points, with workings. I am not 100% sure I fully get how to use them, but I think if I had a practical example, I would be ok.
If I get it working, I will send you an example of you work put to use! :)
Apparently, only the 1st page of my notes to you were attached in my latest answer. This is because All Experts requires only image formats to be attached (jpeg, png, etc) and the conversion of my pdf file to jpeg only grabbed the 1st page. The rest of the notes didn't get sent. The complete notes would certainly make more sense of this for you.
I'd like to keep working with you on this. The All Experts format is a little restrictive so I'd like to continue via regular email. I could then send proper pdf files. My email is firstname.lastname@example.org. Please send me a message so I can respond. I assume All Experts will allow us to exchange emails. We'll see!