## 2 Signal Analysis
### The Weighting Function  
This section searches for the appropriate coefficients \(a_{\phi}\), \(a_{p}\), \(b_{\phi,j}\) and \(b_{p,j}\) in the proposed phase and code weighting functions \(w^{s}_{\phi,j}\) (Equation (16)) and \(w^{s}_{p,j}\) (Equation (17)). As shown in Figures 2 and 3, the DD residuals are correlated with both the elevation angles and the C/N\({}_{0}\). In actual GNSS positioning, however, too much de-weighting of the observations at low elevation angles or with low C/N\({}_{0}\) is nearly equivalent to excluding these observations. In such cases, although their large biases will less influence the positional results, the observation model also becomes weaker, especially in the measurement environment with limited satellite visibility. In this section, the authors directly evaluate the influences of the DD residuals on the positioning results. The first case utilizes the dual-frequency phase residuals \(\delta\phi^{\rm ls}_{DDj}\) and approximates the situation in the ambiguity-fixed case, where the code observations are strongly de-weighted and their weighting coefficients thus do not play much of a role in both the open and suburban scenarios with non-extreme code multipath. The second case utilises the dual-frequency code residuals \(\delta p^{\rm ls}_{DDj}\) and approximates the situation in the ambiguity-float case (at the first epoch of initialisation), where the phase observations are totally reserved for the ambiguities [28] and their weighting coefficients thus do not influence the positioning results. Their influences on the positional results \(\Delta r_{\phi}\) in the first case, and \(\Delta r_{p}\) in the second case, are calculated from the least-squares adjustment as follows:  
\[\Delta r_{\phi} = (A^{T}Q^{-1}_{\phi DD}A)^{-1}A^{T}Q^{-1}_{\phi DD}\delta\phi_{DD} \tag{18}\] \[\Delta r_{p} = (A^{T}Q^{-1}_{PDD}A)^{-1}A^{T}Q^{-1}_{pDD}\delta p_{DD} \tag{19}\]  
where the matrix \(A=e_{2}\otimes(D_{m}^{T}G)\) (Equation (1)), and note that \(G\) contains the satellite-to-receiver unit vectors in the north, east and vertical directions. The phase and code residual vectors \(\delta\phi_{DD}\) and \(\delta p_{DD}\) consist of the phase and code residuals \(\delta\phi^{\rm ls}_{DDj}\) (Equation (7)) and \(\delta p^{\rm ls}_{DDj}\) (Equation (8)) for \(j=1,2\). The zenith-referenced undifferenced signal standard deviations are first assumed as 0.003 m and 0.3 m for the phase and code observations, and the between-receiver phase and code standard deviations \(\sigma_{\phi,j}\) (Equation (3)) and \(\sigma_{p,j}\) (Equation (4)) are obtained by multiplying them by a factor of \(\sqrt{2}\) due to the between-receiver differencing. An outlier detection procedure is performed using the \(\chi^{2}\)-test. The test statistics \(T_{\phi}\) and \(T_{p}\) for the phase and code processing are expressed as [13]:  
\[T_{\phi} = \delta\phi^{\rm T}_{DD}(Q^{-1}_{\phi DD}-Q^{-1}_{\phi DD}A(A^{T}Q^ {-1}_{\phi DD}A)^{-1}A^{T}Q^{-1}_{\phi DD})\delta\phi_{DD} \tag{20}\] \[T_{p} = \delta p^{\rm T}_{DD}(Q^{-1}_{PDD}-Q^{-1}_{PDD}A(A^{T}Q^{-1}_{PDD }A)^{-1}A^{T}Q^{-1}_{PDD})\delta\phi_{DD} \tag{21}\]  
Figure 3: RMS of the DD residuals with respect to the C/N\({}_{0}\) (\(S^{\rm ls}_{j}\)) in: (**a**) the open-sky scenario and (**b**) the suburban scenario. Note that the RMS of the code residuals is divided by a factor of 100. In the bottom panels, the blue and the red lines are almost overwritten by the green and the magenta lines. The \(T_{\phi}\) and \(T_{p}\) are compared with the inverse cumulative distribution function (CDF) of the central \(\chi^{2}\) distribution \(Q_{\chi_{j}^{2}}^{-1}(1-P_{FA,\chi^{2}})\), where \(f\) denotes the degrees of freedom, and \(P_{FA,\chi^{2}}\) is the probability of false alert allocated to the \(\chi^{2}\)-test, which is set to \(10^{-6}\) in this study. Data with the PDOP higher than 10 is not considered. The PDOP for RTK is generated using the design matrix and the weighting matrix for observations on L1 [28].