After estimating the AoAs of the LoS paths at each \(i\) th R-RIS subarray (i.e., \(\theta _{i,1}\)  and \(\phi _{i,1}\)  \(\forall i = 1,2,\ldots ,I\) ), we apply the LS principle for mapping those estimates to the 3D position of MS, \({\mathbf {p}}_{\text{MS}}\) , as follows [1]}:
\(\hat{{\mathbf {p}}}_{\text{MS}} = \left(\sum _{i = 1}^I {\mathbf {B}}_i\right)^{-1} \left(\sum _{i = 1}^I {\mathbf {B}}_i {\mathbf {p}}_{\text{RIS},i} \right),\) 
