# A GNSS/5G Integrated Three-Dimensional Positioning Scheme Based on D2D Communication
## 2 Methods
### Positioning Model in 5g
#### 2.2.3 RSS-Based Distance Estimation  
In general, if the signal propagation model is determined, and the transmitted signal at one node and the received signal at the other node are known, the distance between these two nodes can be obtained. In the following, we firstly illustrate the three-dimensional signal propagation model based on our system model, and then, the distance estimation based on the RSS measurements is given.  
Figure 2: Two-dimensional positioning based on trilateration: (**a**) the positioning procedure when the positions of three reference nodes are accurate, and (**b**) the comparison between the positioning procedure with accurate and inaccurate reference nodes.  
* Signal Propagation between the BS and the MU  
We apply the typical urban macro cell three-dimensional channel model proposed in the 3 rd Generation Partnership Project (3 GPP) for the signal propagation between the BS and the MU [31]. Generally, a small-scale fading effect mainly originates from the multipath effect, which can be ignored due to our requirements of the received signals. In this regard, we focus on the large-scale fading parameters. If the requesting node is denoted as node \(i\), then the BS as \(j\). The path loss of the signal between node \(i\) and \(j\) is represented as:  
\[PL_{ij}^{b}[\mathrm{dB}]=A\log\bigl{(}d_{ij}[\mathrm{m}]\bigr{)}+B+C\log(f_{c }[\mathrm{GHz}]) \tag{6}\]  
where \(f_{c}\) is the carrier frequency of the transmitted signal. Specifically, only the signal with line-of-signal (LoS) reception is considered to guarantee the quality of service (QoS), which means that the distance between the nodes capable of positioning is within a threshold.  
In addition to the large-scale fading, shadow fading also needs to be taken into account. It is a random process drawn in dB from a normal distribution with zero mean and a variance of \(\sigma_{SF}^{2}\)[19], expressed as:  
\[SF_{ij}^{b}[\mathrm{dB}]=\mathcal{N}\Bigl{(}0,\sigma_{SF}^{2}\Bigr{)} \tag{7}\]  
According to the above analysis, the large-scale fading and shadow fading can be integrated into the flat fading coefficient \(\alpha_{ij}^{b}\), reflecting the overall path loss of the signal:  
\[\alpha_{ij}^{b}=10^{-\frac{p_{ij}^{b}+sF_{ij}^{b}}{20}} \tag{8}\]
* Signal Propagation between the MUs  
Contrary to the signal propagation between the BS and the MU, the free space path loss without shadow fading is considered for the propagation between the MUs. Then, we would have [19]  
\[PL_{ij}^{m}[\mathrm{dB}]=20\log\bigl{(}d_{ij}[\mathrm{m}]\bigr{)}+32.4+20\log(f _{c}[\mathrm{GHz}]) \tag{9}\]  
for the free space path loss between node \(i\) and \(j\). Accordingly, the flat fading coefficient is shown as:  
\[\alpha_{ij}^{m}=10^{-\frac{p_{ij}^{m}}{20}} \tag{10}\]
* Distance Estimation If node \(j\) transmits a signal \(st_{ji}\) to node \(i\), the received signal at node \(i\) is as follows:  
\[sr_{ij}=\alpha_{ij}st_{ji}+n_{ij} \tag{11}\]  
where \(\alpha_{ij}=\alpha_{ij}^{b}\) or \(\alpha_{ij}=\alpha_{ij}^{m}\) is the flat fading coefficient when node \(j\) is a BS or an MU, respectively. \(n_{ij}\) is the additive white Gaussian noise, which can be expressed as:  
\[n_{ij}\sim\mathcal{N}\Bigl{(}0,\sigma_{r}^{2}\Bigr{)} \tag{12}\]  
where \(\sigma_{r}^{2}\) is the variance of