# Round-Trip Time Ranging to Wi-Fi Access Points Beats GNSS Localization
## 7 Simplified Observation Model for Outdoor Use  
Ideally, the RTT-reported distance would be equal to the true distance, perhaps with a small amount of measurement noise added--and a small offset that may depend on the equipment used [53]. Inside buildings, multi-path and refractive retardation complicate matters in that measured RTT ranges are typically larger than the actual distances. This can be taken into account in the BGU method if statistical information is available relating observed distances to actual distances--i.e., if we have an observation model [20]. In outdoor localization, while paths between APs and UEs may not be line of sight (LOS), typically _most_ of the path is unobstructed. That is, there may very well be one or two walls between the AP and the outside, but there are typically no additional obstacles along the path to the UE--as there would be inside a building. Experiments confirm that the observation model can be much simpler in the outdoor application. In the results reported below (see, e.g., Figure 8), a good model is one where the measured distance is the actual distance plus a measurement noise with standard deviation of about 3 m. This does not take into account outliers contributing to \"long tails\" on the probability distribution. If we ignore these outliers for the moment, the conditional probability can reasonably be modeled as  
\[p(r_{\text{rtt}}|r_{\text{true}})\approx\frac{1}{\sqrt{2\pi\sigma}}\text{exp} \Bigg{(}-\frac{1}{2}\bigg{(}\frac{r_{\text{rtt}}-r_{\text{true}}}{\sigma} \bigg{)}^{2}\Bigg{)} \tag{1}\]  
where \(r_{\text{rtt}}\) is the RTT-measured distance while \(r_{\text{true}}\) is the true distance and \(\sigma\approx 3\) m.  
When an RTT range measurement \(r_{\text{rtt}}\) is reported for an AP, the BGU method steps through the cells of the grid and updates the probabilities stored there using [PERSON] rule [19; 20; 35]. At each cell, it uses the corresponding position of the UE to compute the distance \(r_{\text{true}}\) from the AP (this can be precomputed if desired). Then, it applies [PERSON] rule, which, in the 2D case, comes to  
\[p_{i,j}^{(n+1)}=p_{i,j}^{(n)}\ p(r_{\text{true}}|r_{\text{rtt}})/N \tag{2}\]  
where  
\[N=\sum_{i,j}p_{i,j}^{(n)}\ p(r_{\text{true}}|r_{\text{rtt}}) \tag{3}\]  
Division by \(N\) can be taken care of simply by renormalising after the multiplicative part of the update step. Here, \(p_{i,j}^{(n)}\) is the probability of the UE being in cell \((i,j)\), at step \(n\) (in the 3D case we have instead \(p_{i,j}^{(n)}\)). The BGU method needs an estimate of \(p(r_{\text{true}}|r_{\text{rtt}})\), which, using [PERSON] rule, can be written  
\[p(r_{\text{true}}|r_{\text{rtt}})=p(r_{\text{rtt}}|r_{\text{true}})\ p(r_{\text{ true}})/\,p(r_{\text{rtt}}) \tag{4}\]  
Now, if we assume that the distribution of APs is uniform in the plane out to some radius \(R_{0}\) say, then  
\[p(r_{\text{true}})=2\ r_{\text{true}}/R_{0}^{2} \tag{5}\]  
Further, if the RTT distance is more or less equal to the true distance (modulo some measurement error) then we have  
\[p(r_{\text{rtt}})\approx 2\ r_{\text{rtt}}/R_{0}^{2} \tag{6}\]  
and so  
\[p(r_{\text{true}}|r_{\text{rtt}})\approx p(r_{\text{rtt}}|r_{\text{true}})\ (r_{\text{true}}/r_{\text{rtt}}) \tag{7}\]  
Since the Gaussian (Equation (1)) is small except near \(r_{\text{rtt}}=r_{\text{true}}\) (because the distances are mostly large compared to \(\sigma\)) one may be justified in further simplifying this to  
\[p(r_{\text{true}}|r_{\text{rtt}})\approx p(r_{\text{rtt}}|r_{\text{true}}) \tag{8}\]  
and just use \(p(r_{\text{rtt}}|r_{\text{true}})\) from Equation (1) for \(p(r_{\text{true}}|r_{\text{rtt}})\). In any case, given a measurement \(r_{\text{rtt}}\), values of \(p(r_{\text{true}}|r_{\text{rtt}})\) can be precomputed for a range of values of \(r_{\text{true}}\) in order to speed up the grid update (the saved result of this pre-computation has been called a \"rate vector\" in [20]).