# Ambiguity-Resolved Model Tests for Carrier-Phase GNSS
## 2 The Mixed-Integer GNSS Model
### The AF and AK Residual Vectors  
Residual vectors are generally instrumental in formulating proper test statistics for the testing of a null hypothesis against an alternative hypothesis. In our case of the mixed-integer models of (1), different such residual vectors need to be considered. These are the ambiguity-float (AF) and ambiguity-known (AK) residual vectors of both \(\mathcal{H}_{0}\) and \(\mathcal{H}_{a}\). They are defined as  
\[\text{AF}:\;\left\{ \begin{array}{rcl}\underline{\xi}_{0}&=&P_{[A,B]}^{ \perp}\underline{y}\\ \underline{\xi}_{a}&=&P_{[A,B,C]}^{\perp}\underline{y}\end{array} \right. \tag{2}\]  
and  
\[\text{AK}:\;\left\{ \begin{array}{rcl}\underline{\xi}_{0}(a)&=&P_{B}^{\perp} \underline{(y-Aa)}\\ \underline{\xi}_{a}(a)&=&P_{[B,C]}^{\perp}\underline{(y-Aa)}\end{array} \right. \tag{3}\]The least-squares residual vectors \(\underline{\hat{\varrho}}_{0}\) and \(\underline{\hat{\varrho}}_{a}\) capture the data-model inconsistency of \(\mathcal{H}_{0}\) and \(\mathcal{H}_{a}\) in case the ambiguity vector is estimated as an unknown real-valued vector, under \(\mathcal{H}_{0}\) and \(\mathcal{H}_{a}\), respectively. Their counterparts, \(\underline{\hat{\varrho}}_{0}(a)\) and \(\underline{\hat{\varrho}}_{a}(a)\), do the same; but now, for the case, the ambiguity vectors are assumed known. Note that the AK residuals reduce to their AF counterparts if the ambiguity vector is taken as ambiguity-BLUE. Thus, \(\underline{\hat{\varrho}}_{0}=\underline{\hat{\varrho}}_{0}(\underline{\hat{ \varrho}}_{0})\) and \(\underline{\hat{\varrho}}_{a}=\underline{\hat{\varrho}}_{a}(\underline{\hat{ \varrho}})\), with \(\underline{\hat{\varrho}}_{0}=\bar{A}^{+}\underline{y}\) and \(\underline{\hat{\varrho}}=\bar{\hat{A}}^{+}\underline{y}\) being the BLUEs of \(a\) under \(\mathcal{H}_{0}\) and \(\mathcal{H}_{a}\), respectively, where \(\bar{A}=P_{B}^{\perp}A\) and \(\bar{A}=P_{[\underline{B},\mathbb{C}]}^{\perp}A\). Various important relations can be established between these residuals. The ones directly relevant for our mixed-integer test statistic are summarized in the following Lemma. **Lemma 1** (**Differences normed residuals**). : _Let \(\underline{\hat{\varrho}}\) and \(\underline{\hat{\varrho}}(a)\) denote the AF-BLUE and AK-BLUE of the bias vector \(c\) under \(\mathcal{H}_{a}\), and let \(\underline{\hat{\varrho}}_{0}\) and \(\underline{\hat{\varrho}}\) be the BLUEs of a under \(\mathcal{H}_{0}\) and \(\mathcal{H}_{a}\), respectively. Then, we can express the differences of the \(Q_{yy}\)-weighted squared norms of the residual vectors in \(\underline{\hat{\varrho}}\), \(\underline{\hat{\varrho}}(a)\), \(\underline{\hat{\varrho}}_{0}\), and \(\underline{\hat{\varrho}}\) as_  
\[ \begin{array}{llll}(i)&||\hat{\varrho}_{0}||_{Q_{yy}}^{2}\ -||\hat{\varrho}_{a}||_{Q_{yy}}^{2}&=&||\hat{\varrho}||_{Q_{xx}}^{2}\\ (ii)&||\hat{\varrho}_{0}(a)||_{Q_{yy}}^{2}-||\hat{\varrho}_{a}(a)||_{Q_{yy}}^{ 2}&=&||\hat{\varrho}(a)||_{Q_{xx}(a)}^{2}\\ (iii)&||\hat{\varrho}_{0}(a)||_{Q_{yy}}^{2}-||\hat{\varrho}_{0}||_{Q_{yy}}^{ 2}&=&||\hat{\varrho}_{0}(a)||_{Q_{xx}0_{0}}^{2}\\ (iv)&||\hat{\varrho}_{a}(a)||_{Q_{yy}}^{2}-||\hat{\varrho}_{a}||_{Q_{yy}}^{2}& =&||\hat{\varrho}_{a}(a)||_{Q_{xx}}^{2}\end{array} \]  
_with ambiguity residuals \(\underline{\hat{\varrho}}_{0}(a)=\underline{\hat{\varrho}}_{0}-a\) and \(\underline{\hat{\varrho}}_{a}(a)=\underline{\hat{\varrho}}-a\)._  
Proof. : See Appendix A. Note that the first two relations of the Lemma, \((i)\) and \((ii)\), establish the link between the \(\mathcal{H}_{0}\)-\(\mathcal{H}_{a}\)_change_ in normed residuals, on the one hand, and the estimated bias vector, either in AF form or AK form, on the other hand. Therefore, the significance of the estimated bias vectors can be considered a measure of the discrepancy between the two hypotheses.