Angles within of the two triangles are fixed. But, even given a solution to the mirror ambiguity, there are two unknowns (e.g. angle 9-3-2 and angle 2-8-7) and only one constraint (distance 5-6). Unless this is at some limiting value, there does not appear to be enough information to constrain the distance between 8 and 9.
I knew I should have posted my musings last night that this wasn’t fully constrained! I had gotten nowhere trying to figure it out by hand, and resolved to give CAD a try this morning. When it came back with an answer, I figured why not
Adding that to the existing measurements should almost do it. You would only need to determine angle 9-5-8 to get distance 9-8. Measuring 5 to 8 would make triangle 5-8-6, fixing those angles and constraining the orientation of segment 8-7. Excepting edge cases, I would expect two solutions, based on alternate mirror-image solutions of the two fixed shapes (9-3-5 and 5-8-7-6).
Edit - or possibly as many as four. I forgot to consider folding the polygon 5-8-7-6 over segment 8-6.
Edit2 - to clarify, by “edge cases” I mean singularity in the system of equations.
Edit3 - Perhaps even more, due to which way the angles at points 2 and 4 bend. Let’s go with this: With the length of 5-8 determined, and excluding singularity cases, there would be a (fairly small) finite number of solutions. This arises from the nonlinear nature of the system of equations. For example, the single-unknown equation x5 - 5x3 + 4x = 0 has exactly five real solutions. This set of equations appears to be second order (to simplify, square all of the measured lengths to eliminate those square roots), but the cross terms among the different unknowns increases the number of possible solutions.
Edit4 - I think I have a way to find the solutions when the length of segment 5-8 is given, for all 16 possibilities of the four remaining ambiguities* in a not-too-complex excel spreadsheet, if you don’t mind looking for crossing points on graphs. This is stretching Jon’s question, but not totally breaking it. I’m going to work this up with a 5-8 distance of 55.17 (to commemorate the date of 5 May 2017), though this will be adjustable if this turns out not to be an interesting value. If I have enough energy left, I will generate all the plots in excel as well**. Ether, if you have a different 5-8 distance in mind for 5-8, please let me know.
At a geometric level, these ambiguities arise from the law of cosines: c2 = a2 + b2 + 2abcosγ. This equation is ambiguous in that while a and b are always positive, γ may be either positive or negative, and cosγ = cos(-γ).
** As it turns out, the graph of the initial set of distances Ether gave is a “double-down” on the classic Bridges of Konigsberg problem - every one of the eight vertices has three measurements! This will make drawing lines using excel scatter plot more interesting.
Letting matlab do the work. Set up a system of equations. x(1) = point2.x, x(2) = point2.y, x(3) = point3.x, etc. This is a set of (xsrc-xdst)^2 + (ysrc-ydst)^2 - distance^2 = 0 equations derived from the list given in the OP.
I have attached a spreadsheet which goes through the calculations to solve this problem. I haven’t verified everything on it yet, but I have fixed a lot of problems along the way; I’m mostly posting to show that the problem IS soluble and as a demo of the sorts of ambiguities and multiple roots that make result in multiple solutions to the system of twelve equations in twelve unknowns.
The cells highlighted in yellow are intended to be set as you investigate different values of distance 8-9, and the different ambiguities, or if you want to zoom in to a particular segment of angle 8-5-9; see the notes in the spreadsheet for details. The top graph is a layout of the eight points based on all of the constraints EXCEPT the distance 2-4, and also based on the four ambiguity states and the initial angle 8-5-9. The second plot spans a range of angles 8-5-9. By default, I have it set for the range from 0 to 2pi.
Essentially, you enter the value for distance 8-9, then try each of the 16 ambiguity states, and look for places where the actual distance between points 2 and 4 (red curve) crosses the constraint distance (green line), then trace up that angle to a value for distance 8-9 (blue curve). Ideally, you would use Newton’s method or similar to determine where a crossing occurs, and zoom in on it to find more precisely where the crossing occurs. With the assumed distance 8-9 of 55.17, I found two solutions for false-false-false-true, (approx 190 and 186), two for false-true-true-false (127, 183), and a near miss on true-true-true-false (109).
I don’t think I’ve used anything more complex than the law of cosines to do any of this. Does this answer your question, Jon Stratis?
This is an overdetermined trilateration problem (3 constraints, 2 unknowns), which happens frequently due to measurement noise in localization systems (like GPS). As such, the solution depends on what properties you want your residual to have. For one such choice of properties, I happen to know a neat trick that solves this problem elegantly for the particular case where (# constraints) = (# unknowns + 1).
This method adds a free parameter to the distance measurements representing measurement error (assuming it is uniform across all measurements), which lets us solve the system of equations efficiently to find the point representing the center of the three circle-circle intersections (obtained by leaving out one constraint at a time). “h” represents the radius^2 of the circle joining those intersections (which can be imaginary, as in this case, depending on whether or not all three circles overlap or not). The fact that “h” is small in magnitude shows that the solution is very close.
It would also be reasonable to want a (perhaps weighted by distance) least squares solution, but this would require whipping out a non-linear least squares solver.
For part B… Is the system actually solvable? You can define each circle with the simple equation (x+a)^2 + (y+b)^2 = r^2. That leaves you with 3 equations but only 2 unknowns, which makes it really easy for there to be no solution. Of course, there’s no guarantee that the circles even intersect, but we should assume they do, right? Two circles can have 2, 1, or no intersections in common, likewise three circles can have 2, 1, or 0 common intersections!
Plotting it out, it initially looks like there’s an intersection point (near -0.409, 0.555) … but zoom in and the circles just miss having a common intersection. Plug the system of equations into Wolfram Alpha, and it comes back with no solution, supporting this finding.
So, lets simplify it down to pairs of circles, see how close we actually get.