# Optimal Particle Filter Weight for Bayesian Direct Position Estimation in a GNSS Receiver
## 7 Delay Bias as Gaussian Nuisance Parameter
In this work, we choose a range of \(\pm 3\sigma_{\Delta\tau}\) with a resolution of 0.01 m. Under the assumption that the introduced code delay bias follows the same distribution for both signals, Equation (41) can be rewritten to  
\[p(\mathbf{s}|\tau_{1},\omega_{1},\tau_{2},\omega_{2}) = \frac{1}{(2\pi)^{L}}\exp\left\{-\frac{1}{2}\sum_{\mu=1}^{L}|s_{ \mu}|^{2}\right\}\] \[\sum_{k=1}^{K}p(\Delta\tau_{k})\sqrt{\frac{\pi}{2L}}\exp\left\{ \frac{|P_{1}(\tau_{1}+\Delta\tau_{k},\omega_{1})|^{2}}{4}\right\}I_{0}\left( \frac{|P_{1}(\tau_{1}+\Delta\tau_{k},\omega_{1})|^{2}}{4}\right)\] \[\sum_{k=1}^{K}p(\Delta\tau_{k})\sqrt{\frac{\pi}{2L}}\exp\left\{ \frac{|P_{2}(\tau_{2}+\Delta\tau_{k},\omega_{2})|^{2}}{4}\right\}I_{0}\left( \frac{|P_{2}(\tau_{2}+\Delta\tau_{k},\omega_{2})|^{2}}{4}\right).\]  
Applying the same simplification steps as was done to obtain Equations (27) and (30) leads to a weight update Equation similar to Equation (31) with  
\[w_{k}^{i}\propto w_{k-1}^{i}\prod_{n=1}^{N}\left\{\sum_{k=1}^{K}\underbrace{ p(\Delta\tau_{k})\frac{\exp\left\{\frac{|P_{n}(\tau_{k}+\Delta\tau_{k},\omega_{n})|^{2} }{2}\right\}}{\sqrt{2\pi\frac{|P_{n}(\tau_{k}+\Delta\tau_{k},\omega_{n})|^{2} }{4}}}_{\hat{C}_{k}}}_{\hat{C}_{k}}}\right\}. \tag{43}\]  
Equation (43) is also numerically difficult to evaluate due to the large exponential. The sum over the grid points does not allow directly shifting the Equation to the logarithmic domain in order to get rid of the exponential, thus some reformulation is necessary. Let us define  
\[a_{k} = \frac{p(\Delta\tau_{k})}{\sqrt{2\pi\frac{|P_{n}(\tau_{k}+\Delta \tau_{k},\omega_{n})|^{2}}{4}}}, \tag{44}\] \[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]0Then, the inner term of the sum can be rewritten for \(K=2\) to  
\[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]1  
which can be written in a general form as  
\[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]2  
When selecting \(b_{1}\) to be the maximum, the exponential term in the sum of Equation (47) remains \(<1\). Applying the logarithm now leads to  
\[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]3  
which can be well evaluated numerically. Using this in Equation (43) and applying the logarithm leads to the new logarithmic weight update equation  
\[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]4 \[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]5 \[\Delta\tau \sim N(0,\sigma_{\Delta\tau}^{2}), \tag{38}\]6  
Equation (50) can now be used instead of Equation (35) within the weight update sequence Equation (33) to Equation (37) to include the Gaussian delay bias. An additional sum over \(K\) grid points and a maximum search over \(b_{k}\) needs to be evaluated for each signal \(N\), which increases the computational complexity. It should, however, be noted that the computation needs to be performed only for each set of multicorrelator values for each satellite signal and then an interpolation can be performed to obtain the weight update for the individual particles. This avoids computation of Equation (50) for each particle.