I have an array of points, of which(points) I know the coordinates(in my coordinate plane, x/y). Then I have a point of unknown coordinates, but I know the distance to that point from "known" points. I'm looking for "unknown" point coordinates. Should be a sort of triangulation.
I've thought about describing the situation with system of equations.
Let suppose this data:
coord[n] basePoints;
double[n] dist;
coord result;
Let think coord like a:
struct {
double x,y;
};
Now, the circumference equation is:
x^2 + y^2 + ax + bx + c = 0
where:
a = basePoint[i].x
b = basePoint[i].y
c = a^2 + b^2 + r^2
r = dist[i]
In this case, we need 3 points to determine exactly the result point position, so we need a system of three equations. The question is: is there some fast way to find out the result coordinates, and there isn't, is there an algorithm to follow?
edit:
I found the algoritm I was looking for here Trilateration using 3 latitude and longitude points, and 3 distances.
Also a big thanks for @hardmath for the name of method and a wikipedia article.