# A GNSS-Cellular Network Hybridization Strategy for Robust Positioning
## 2 Materials and Methods
### Measurement-Level Hybridization Method
#### 2.2.2 Pseudoranges Between the BS and the UE  
The pseudorange between the BS and the UE is not directly provided by the mobile network. Instead, it is computed using the Euclidean distance between two points: the UE coordinates recorded by the CellTracker App, provided by the mobile network as \((x_{4G/5G},y_{4G/5G},z_{4G/5G})\), and the fixed coordinates of the BS, denoted as \((x_{BS},y_{BS},z_{BS})\). The 4G/5G pseudorange equation can be expressed in a form similar to Equation (14), but in a simplified manner, as it only considers the network clock offset:  
\[R_{r}^{s}=\rho_{r}^{s}+d\rho_{r}^{s}+cdt_{4G/5G} \tag{24}\]  
where  
* \(R_{r}^{BS_{r}}\) represents the Euclidean distance between the \(p\)-th BS and the initial position of the UE, considered the most probable value. * \(\rho_{r_{r}}^{BS_{r}}\) denotes the observed Euclidean distance between the \(p\)-th BS and the \(k\)-th position of the UE at a specific epoch. * \(d\rho_{r}^{s}\) is the linearization of the network BS-receiver UE geometric range. * \(cdt_{4G/5G}\) is the 4G/5G network's clock offset. Equation (24) can be rewritten as follows:  
\[R_{r}^{s}-\rho_{r}^{s}=d\rho_{r}^{s}+cdt_{4G/5G} \tag{25}\]  
The right-hand side of Equation (25) contains the unknown parameters: the receiver's position correction \(d\rho_{r}^{s}\) and the network's clock offset \(cdt_{4G/5G}\). Next, linearizing the network BS-receiver UE geometric range gives the following:  
\[d\rho_{r}^{s}=\left[\frac{x^{BS}-x_{r}}{\rho_{r}^{BS}}\right]dx+\left[\frac{ y^{BS}-y_{r}}{\rho_{r}^{BS}}\right]dy+\left[\frac{z^{s}-z_{r}}{\rho_{r}^{BS}} \right]dz \tag{26}\]where \((x^{BS},y^{BS},z^{BS})\) and \((x_{r},y_{r},z_{r})\) represent the geocentric coordinates of the BS and UE receiver, respectively. In matrix form, assuming that \(p\) BSs are observed, the \(A\) matrix is as follows:  
\[A= \begin{bmatrix}l_{x}^{BS_{1}}&l_{y}^{BS_{1}}&l_{z}^{BS_{1}}&1\\ l_{x}^{BS_{2}}&l_{y}^{BS_{2}}&l_{z}^{BS_{2}}&1\\ &&\vdots\\ l_{x}^{BS_{r}}&l_{y}^{BS_{r}}&l_{z}^{BS_{r}}&1\end{bmatrix} _{kx4} \tag{27}\]  
where the coefficients \(l_{x}^{BS},l_{y}^{BS}\), and \(l_{z}^{BS}\) are derived from Equation (26):  
\[l_{x}^{s}=\frac{x^{BS}-x_{r}}{\rho_{r}^{BS}};\;l_{y}^{s}=\frac{y^{BS}-y_{r}}{ \rho_{r}^{BS}};\;l_{z}^{s}=\frac{z^{BS}-z_{r}}{\rho_{r}^{BS}} \tag{28}\]  
The unknowns in vector x (Equation (1)) are the position corrections and the network's clock offset:  
\[x= \begin{bmatrix}dx\\ dy\\ dz\\ cdt_{4\text{/}5\text{/}5\text{/}5}\end{bmatrix} _{4\text{x}1}\]  
The vector \(b\) of 4G/5G measurements, for \(p\) BS, is represented as follows:  
\[b_{4\text{/}5\text{/}5\text{ }}= \begin{bmatrix}R_{r}^{BS_{1}}-\rho_{r_{1}}^{ BS_{1}}\\ R_{r}^{BS_{1}}-\rho_{r_{2}}^{BS_{1}}\\.\\.\\.\\ R_{r}^{BS_{1}}-\rho_{r_{1}}^{BS_{1}}\\ R_{r}^{BS_{2}}-\rho_{r_{1}}^{BS_{2}}\\ R_{r}^{BS_{2}}-\rho_{r_{2}}^{BS_{2}}\\.\\.\\.\\.\\ R_{r}^{BS_{2}}-\rho_{r_{j}}^{BS_{2}}\\.\\.\\.\\.\\.\\.\\.\\ R_{r}^{BS_{r}}-\rho_{r_{k}}^{BS_{r}}\end{bmatrix} _{kx1} \tag{29}\]  
Equation (29) adopts the same matrix-based formulation used in Equation (21), extending it to include both GNSS and 4G/5G pseudorange observations in a unified hybrid adjustment model. The weight matrix \(P_{4G/5G}\) is as follows:  
\[P_{4G/5G}=\left[ \begin{array}{ccc}\frac{1}{\sigma_{BS_{1}-r1}^{2}}&0&0\\ 0&\frac{1}{\sigma_{BS_{1}-r2}^{2}}&0\\.&.&.\\.&.&.\\.&0&0&\frac{1}{\sigma_{BS_{p}-rj}^{2}}\\ \end{array} \right]_{k\in k} \tag{30}\]  
\[\sigma_{BS_{p}-rk}^{2}=\frac{\sigma_{0}^{2}}{\left(accuracy\ of\ pseudodistance\ BS_{p}-rj \right)^{2}} \tag{31}\]  
where \(\sigma_{0}^{2}\) is a constant value, computed according to the formulation in Equation (7). \(\sigma_{0}^{2}\) and the accuracy of the pseudodistance \(BS_{p}-rj\) are both estimated based on the error associated with the UE coordinates (\(x\), \(y\), \(z\)), as reported by the CellTracker app.