Triangulate coordinates on a sphere, given several reference coordinates and distances. Problem
I have a point on a sphere at unknown coordinates. I know the coordinates of the center of the sphere, and its radius.  I also have 6 reference points (4 along the equatorial plane, and 1 at each pole), with known coordinates and distances to my unknown point.  How can I solve, in a 3D space, for the coordinates of my unknown point?
Reference
In this image, I know all variables except for A (x, y, z), which I'm trying to solve for.  All reference points (P1-4) are equidistant to their adjacent neighbors.  Reference points P5 and 6 exist directly above and below the sphere, with the same rules applying.

 A: You know that point $A$ lies at the intersection of the seven spheres having points $P_k$ as centers and distances $D_k$ as radii. To locate $A$ one needs just four spheres, whose centers don't lie on the same plane: you can thus choose for instance $P_0$, $P_1$, $P_2$, $P_5$ and find the equations of the corresponding four spheres:
$$
(x-x_k)^2+(y-y_k)^2+(z-z_k)^2=D_k^2.
$$
The intersection between two spheres is a circle, lying in a plane whose equation can be found by subtracting the equation of one sphere from that of the other one. This plane is perpendicular to the line joining the centers of the spheres.
A practical way to find the intersection point of the four spheres (assuming it exists) could be as follows:


*

*subtract the equation of the first sphere from the equation of the second one, to get the equation of plane $\alpha$;

*subtract the equation of the second sphere from the equation of the third one, to get the equation of plane $\beta$;

*subtract the equation of the third sphere from the equation of the fourth one, to get the equation of plane $\gamma$;

*those three planes should have a single point in common, which is the one you are seeking. To find its coordinates, just solve the linear system formed with the equations of $\alpha$, $\beta$ and $\gamma$.
