# Ambiguity-Resolved Model Tests for Carrier-Phase GNSS
## 4 The Ambiguity-Resolved Tests
### AR Detection  
If \(\mathcal{R}(A,B,C)=\mathbb{R}^{m}\), then \(\underline{\varepsilon}_{a}(a)\equiv 0\), from which it follows that the statistic (4) becomes dependent only on the \(\mathcal{H}_{0}\)-estimators. The AR detector reads, therefore, with \(\underline{\varepsilon}_{0}=\underline{\varepsilon}_{0}(\underline{\delta}_{ 0})=\underline{\delta}_{0}-\underline{\delta}_{0}\),  
\[ \begin{array}{rcl}\underline{T}(\underline{\delta}_{0},\bullet)&=&|| \underline{\varepsilon}_{0}(\underline{\delta}_{0})||^{2}_{Q_{yy}}\\ &=&||\underline{\varepsilon}_{0}||^{2}_{Q_{yy}}+||\underline{\varepsilon}_{0 }||^{2}_{Q_{yy}b}\\ &=&||\underline{\varepsilon}_{0}||^{2}_{Q_{0}b^{\prime}_{0}}+||\underline{ \varepsilon}_{0}||^{2}_{Q_{0}b^{\prime}_{0}}\end{array}  \tag{13}\]  
Thus, for detection, only integer ambiguity estimation under \(\mathcal{H}_{0}\) is required. Also, note that \(\underline{t}_{0}\) and \(\underline{\varepsilon}_{0}\), being the input to \(\underline{T}(\underline{\delta}_{0},\bullet)\), are independent. The PDF of the mixed-integer misclosure vector \([\underline{t}_{0}^{T},\underline{\varepsilon}_{0}^{T}]^{T}\) follows then as  
\[f_{t_{0},\underline{\varepsilon}_{0}}(t,\epsilon)=f_{t_{0}}(t)f_{t_{0}}(\epsilon) \tag{14}\]  
with, under \(\mathcal{H}_{a}\),  
\[ \begin{array}{rcl}\underline{t}_{0}&\sim&\mathcal{N}_{m-n-p}(C_{t_{0}}c,Q_{t _{0}}c_{t_{0}}),C_{t_{0}}=D^{T}C\\ \underline{\delta}_{0}&\sim&\mathcal{N}_{n}(a+C_{a_{0}}c,Q_{\underline{\delta }_{0}\underline{\delta}_{0}}),C_{a_{0}}=\bar{A}^{+}C\\ \underline{\varepsilon}_{0}&\sim&\sum_{z\in\mathbb{Z}^{z}}f_{t_{0}}(\epsilon+ z)s_{0}(\epsilon)\end{array}  \tag{15}\]  
in which \(f_{\underline{a}_{0}}(x)\) is the PDF of \(\underline{\delta}_{0}\) and \(s_{0}(\epsilon)\) is the indicator function of the pull-in region of the integer estimator \(\underline{\delta}_{0}\). The PDF of the integer ambiguity residual \(\underline{\varepsilon}_{0}\) was already given in [18], Equation (19). Figure 2 (Left) illustrates stepwise (in blue) how it is obtained from \(f_{\underline{a}_{0}}(x)\) in the one-dimensional case. The PDF of \(\underline{\delta}_{0}\) (top left) is shown along the \(x\)-axis, the PMF of \(\underline{\delta}_{0}\) (top right) along the \(z\)-axis, and the joint PDF \(f_{\underline{a},\underline{\varepsilon}}(x,z)\) (top middle) is shown in the \(xz\)-plane. This joint PDF consists of slices of \(f_{\underline{a}_{0}}(x)\) translated along the \(z\)-axis to the corresponding integers \(z\). The joint PDF of \(\underline{\varepsilon}_{0}=\underline{\delta}_{0}-\underline{\delta}_{0}\) and \(\underline{\delta}_{0}\) (bottom left) follows from translating the slices along the \(x\)-axis so that they are all centered at the mean value: \(x=0\) in this case. The PDF of \(\underline{\varepsilon}_{0}\) (bottom right) is then finally obtained by summing over \(z\), i.e., all slices are again translated along the \(z\)-axis to the origin. Figure 2 (Right) shows how the shape of the PDF of the ambiguity residual \(f_{\underline{a}_{0}}(x)\) changes with the ambiguity standard deviation and how, under these changes, it compares with the ambiguity-float PDF \(f_{\underline{a}_{0}}(x)\). It shows that the difference between the two distributions becomes lower the smaller the standard deviation gets. We remark that under \(\mathcal{H}_{0}\) (cf. (1)), we have \(\mathsf{E}(\underline{t}_{0})=0\) and \(\mathsf{E}(\underline{\varepsilon})=0\). When this _derived_ simple null hypothesis is used as the starting point, one can directly make use of (14) to formulate the highest-density (HD) test as an alternative: reject \(\mathcal{H}_{0}\) if \(f_{t_{0},\underline{\varepsilon}_{0}}(t,e|\mathcal{H}_{0})<\lambda_{a}\). It is also an LR-ratio test for testing \(\mathcal{H}_{0}^{\prime}:\mathsf{E}(\underline{t}_{0})=0,\mathsf{E}( \underline{\varepsilon})=0\) against \(\mathcal{H}_{a}^{\prime}:\mathsf{E}(\underline{t}_{0})\
eq 0,\mathsf{E}( \underline{\varepsilon})\
eq 0\).