I can help you with multithreading in general.
Basically, if you want a solution in 3d - you should have at least 4 points and 4 distances from them (2 - give you a circle in which there is a solution, because this is the intersection between two spheres, 3 points give you two possible solutions (intersection between 3 spheres) - so in order to have one solution, you need 4 spheres). Thus, when you have several points (4+) and the distance between them (there is an easy way to turn TDOA into a set of equations just to have a length length / not time /), you need a way to solve many equations. First, you need a cost function (or a decision error function, as I call it), which would be something like
err(x,y,z) = sum(i=1..n){sqrt[(x-xi)^2 + (y-yi)^2 + (z-zi)^2] - di}
where x , y , z are the coordinates of the current point in the numerical solution, and xi , yi , zi and di are the coordinates and the distance to the ith link point. To solve this problem, my advice is NOT to use Newton / Gauss or Newton methods. You will need the first and second derivatives of the above function - and they have a finite termination at some points in space - therefore, this is not a smooth function, and these methods will not work. A direct family of algorithms will work to optimize functions (search for minima and maxima, in our case, the minimum error / cost function).
This should help anyone who wants to find a solution to a similar problem.
Alexandar of God
source share