# Methodology for Simulating 5G and GNSS High-Accuracy Positioning
## 3 Characterization of the Observables
### mmWave
The analysis is carried on for a simplified scenario with only LoS and uniform linear array antennas.The following conclusions can be devised: (i) ranging performance (Equation (A17)) depends on the transmit and beamforming gain, the subcarrier spacing and the allocation to the pilot subcarriers, i.e., higher index, higher ranging information; (ii) angle information (Equations (A18) and (A19)) depends on the beamforming gain as well as on the sensitivity of the beampattern to the angle variations (derivative term) and, (iii) the information on the LoS AoA and AoD are coupled (Equation (A22)). In Figure 7a,b a contour plot of the achievable ranging and AoA estimation error are shown. The curves are drawn as a function of the location of the UE (LoS angle) as well as the SNR computed without the beamforming gain. The achievable estimation errors are investigated with two different codebooks, namely the orthogonal Discrete Fourier Transform (DFT) codebook and the non-orthogonal codebook. Size of the DFT codebook (i.e., number of beams) is \(N=16\) while non-orthogonal codebook uses 32 beams. The simulation uses subcarrier spacing \(\delta_{f}=60\) kHz and number of subcarriers \(N=2048\), which all are used in estimation. Simulations sweeps the range \([-\pi,\pi]\) on angular domain, and \(E_{s}/N_{0}\) range from \(-40\) to \(20\) dB. In Figure 7a, we note that the error bound on distance estimation with DFT codebook does not change within the full angular domain. This is due to the orthogonal property of the codebook and the fact that cumulative beamforming gain is constant once the whole codebook is scanned. Oppositely, with non-orthogonal beams, the performance varies with the angle and a lower error can be achieved on the edges of the angular range. Also, the ranging error with non-orthogonal codebook is lower with respect to that one obtained with DFT-based codebook. The reason is two-fold. First, if the channel-ray is aligned with the direction of maximum gain of a beam, also side-lobes of any other beam in the non-orthogonal codebook can provide a useful gain. Thus, the Fisher Information Matrix (FIM) component corresponding to ranging information is higher and, subsequently, the ranging error is lower. Second, near the fire-end direction, more than one beam in the non-orthogonal codebook provides non-zero gain. Therefore, also in this case, ranging information can benefit of a cumulative higher transmit and receive beamforming gain. Next, we consider the angular error shown in Figure 7b. It can be noticed that not only bearing error is generally better with non-orthogonal codebook, but also a wider range of directions can be estimated more accurately and with similar level of precision. Reasons are similar as above. In light of the above, the error model on the observables shall include multiple factors: (i) beamforming codebook, (ii) SNR without array gain, i.e., \(E_{s}/N_{0}\), (iii) subcarrier spacing and, (iv) number of subcarrier pilots. Hereafter, we shall denote the observables as follows\[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]3 \[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]4 (21) \[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]5 (22) \[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]6 (23) \[\tau_{0}=\|\mathbf{p}-\mathbf{q}\|_{2}/c, \tag{9}\]7  
where noise terms \(n_{d},n_{\theta_{t}},n_{\phi_{t}},n_{\theta_{t}}\) and \(n_{\phi_{t}}\) are error terms computed from the inverse of the FIM.