I'm trying to write a function that solves the three point resection problem using Tienstra method. I gathered a lot of papers and books about this problem, and each one of them states:
If the unknown point P lies on a circle defined by the three known control points then the solution is indeterminate or not uniquely possible. There are, theoretically, an infinite number of solutions for the observed angles. If the geometry is close to this, then the solution is weak.
Currently my function solves all of the examples found in these books, but I don't know how to check if 4 points are concyclic at the beginning of the function (in order to throw exception).
I hope that you can understand the problem. At the beginning I only have 3 known points and I need to determine fourth point. So I cannot check if 4 points are on the same circle because there are no 4 known points to begin with. I would also like to mention that solution in this special case is sometimes NaN but mostly it is some "random" number.
Are there any methods to catch this kind of an error?
Example:
Let's use a square with these points:
A (0,0)
B (0,1)
C (1,1)
D (1,0)
Imagine that I measured angles from "unknown" point A.
If I put those angles and points B, C, D into my function, than I should expect my result to be (0,0). But because these points are concycllic I am bound to get wrong result, something like (1.615,1.615).
I need to tell the end-user that this answer is wrong because points are concyclic. I just don't see any way to tell if result is correct or not.