[Math] How to find the intersection of four spheres

3deuclidean-geometrygeometry

I need to program a GPS system.

So, I get: (The distances are the distance between the target and the points)
\begin{align}
d_1 &= 8.246211, \\
d_2 &= 7.483315, \\
d_3 &= 3.3166249, \\
d_4 &= 9.110434.
\end{align}
and I know the coordinates of each point:
\begin{align}
p_1 &= (-2580 ,61 ,-2290), \\
p_2 &= (-2574 ,61 ,-2290), \\
p_3 &= (-2577 ,59 ,-2287), \\
p_4 &= (-2577 ,58 ,-2293).
\end{align}
How can I get the target coordinates?

Best Answer

Two spheres intersecate (if they do) in a circle that lies on a plane that is normal to the line joining the centers, and that crosses that line at a distance $d_{1,2}$ from point $C1$, that can be found by solving the triangle with the given sides, as shown

4SpheresGPS

that is $$ d_{\,1,2} = {{r_{\,1} ^{\,2} - r_{\,2} ^{\,2} + \left| {{\bf v}_{\,12} } \right|^{\,2} } \over {2\left| {{\bf v}_{\,12} } \right|}} $$ which can be either positive or negative.

The equation of the plane will then be: $$ \left( {{\bf x} - {\bf c}_{\,1} } \right) \cdot {{{\bf v}_{\,12} } \over {\left| {{\bf v}_{\,12} } \right|}} = d_{\,1,2} $$ which is the same as to write $$ \eqalign{ & \left( {x - C_{\,1,\,x} } \right) \cdot \left( {C_{\,2,\,x} - C_{\,1,\,x} } \right) + \left( {y - C_{\,1,\,y} } \right) \cdot \left( {C_{\,2,\,y} - C_{\,1,\,y} } \right) + \left( {z - C_{\,1,\,z} } \right) \cdot \left( {C_{\,2,\,z} - C_{\,1,\,z} } \right) = \cr & = {{r_{\,1} ^{\,2} - r_{\,2} ^{\,2} + \left| {{\bf v}_{\,12} } \right|^{\,2} } \over 2} \cr} $$

Do the same for other two couples of points, choosen in such a way that the three vectors $ {{\bf v}_{\,jk} }$ be oriented as much differently as possible.

Then find the point where the three planes cross, i.e. the solution to the system of the three linear equations they define.
If the 4 spheres define a unique point, then it must be that, apart of course from measurement errors/approximations. Check the distances of the cross point from the four references.

In case of big discrepances, find some other planes and find a common solution by the method of least squares, again checking vs. the known distances.

Note

If you are writing a "real applicable" program, the error checking and handling is fundamental. Then you need to know probability theory, statistics etc. (and GPS engineering, of course) to decide which method strategy to adopt.

Related Question