There are all different points $O_1, O_2,$ and $O_3$ with known global coordinates in 3-dimensional space. Let $F, R, U$ be the $x, y, z$ basis vectors of the local coordinate system of point $P$ with unknown position and orientation in the global coordinate system. $(x_k, y_k, z_k)$ are given one set for each $O_k$, and satisfy the following equation.
$$\text{normalize}(P - O_k) = \text{normalize}(F×x_k + R×y_k + U×z_k) \;\text{for}\; O_1 \;\text{to}\; O_3(O_k)$$ Normalize is to set the vector magnitude to 1. I would like to find the global coordinates of $P$ and the orientation of $P$ (quaternion or Euler angle) numerically, what algorithm should I use to find them?
The motivation for solving this problem is to find a way for a motionless particle-like swarm robot filling space to spontaneously acquire global coordinates and perform coordinate mapping as a whole.
Most of the particles initially do not know their global coordinates, but a very small number of particles (in this case, three points) are given their global coordinates from an external source that can observe the whole. In this situation, that reference particle robot emits its own global coordinate data as a one-dimensional digital signal in the form of electromagnetic waves to its surroundings. Other particle robots $P$ can interpret the direction of that transmitted electromagnetic wave and the coordinate data. This transmits the coordinates $O_k$ to particle P, which can then know the direction vector $(x_k, y_k, z_k)$ that the $O_k$ signal has traveled in its own local coordinate system. Since each particle cannot spontaneously align its orientation and particle $P$ itself does not know its orientation in the global coordinate system, particle $P$ can only know the $O_kP$ vector in its local coordinates. What I want to achieve here is to infer P's own global coordinates using only the information $(O_k, (x_k, y_k, z_k)) (k=1,2,3)$ that particle $P$ can know.