## 2 Approach of GPS/GALILEO RT PPP with Ionospheric Constraint
### Weight Factors Searching Algorithm with Moving-Window Average Filter  
In order to achieve fast convergence and high-accuracy positioning solutions after convergence, a weighting approach is presented which combines a weight factors searching algorithm and a moving-window average filter. The weight factors searching algorithm is similar to the method of Helmert variance component estimation; it is based on the principle that the post-fit weighted sum residuals of squares is the minimum. A moving-window average filter is applied to improve the precision and reliability of this searching algorithm. When RT ionospheric products are introduced, the variances matrix of measurement errors \(R\) and measurement error vector \(V\) in the Extended Kalman Filter (EKF) can be written as follows [18]:  
\[R=\left[ \begin{array}{cc}R_{\textit{observation}}^{2}&0\\ 0&R_{\textit{constra}}^{2}\end{array} \right] \tag{8}\]  
\[V=\left[ \begin{array}{cc}V_{\textit{observation}}&V_{\textit{constra}}\end{array}  \right]^{T} \tag{9}\]  
Figure 1: Slant TEC of GPS (**a**) and GALILEO (**b**) derived from different agencies at station GMSD. where the subscript \"_observation_\" and \"_constra_\" denote the raw observation (pseudorange and phase measurements) and ionospheric constraints, respectively. The variance matrix of observation errors \(R^{2}_{observation}\) depends on the elevation \(E^{s}\) of satellite \(s\) and can be expressed as follows [19]:  
\[R^{2}_{observation}=\left[ \begin{array}{cccc}\sigma_{0}^{2}/\sin^{2}E^{1}&0&0\\ 0&\ddots&0\\ 0&0&\sigma_{0}^{2}/\sin^{2}E^{s}\end{array} \right] \tag{10}\]  
In the Equation (10), the value of the standard deviation \(\sigma_{0}\) for GPS/GALILEO are set as 1 m and 0.01 m for the pseudorange and phase observations, respectively. Different from the variance matrix of observation, the variance of ionospheric constraints \(R^{2}_{constra}\) would be expressed as a product of a weight factor \(\lambda\) and an initial variance matrix \(\widetilde{R}^{2}_{constra}\), as follows:  
\[R^{2}_{constra}=\lambda\cdot\widetilde{R}^{2}_{constra}=\lambda\cdot\left[ \begin{array}{cccc}\sigma_{constra,1}^{2}&0&0\\ 0&\ddots&0\\ 0&0&\sigma_{constra,s}^{2}\end{array} \right] \tag{11}\]  
The initial ionospheric constraints \(\sigma_{constra}^{2}\) are set as the same as \(\sigma_{0}^{2}\) of pseudorange observations (this value of \(\sigma_{constra}^{2}\) is suggested in PPP-WIZARD ducumentation). The computation procedure of the weight factors searching algorithm comprises the following steps:  
1. Assign an initial weight factor (\(\lambda=1\)) to the variance of ionospheric constraints \(R^{2}_{constra}\). 2. Initialize the variance matrix of measurement errors \(R\) by using Equation (10) and (11). 3. Compute post-fit measurement error vector \(V\) after performing the EKF. 4. Compute the post-fit weighted sum residuals of squares \(V^{T}R^{-1}V\). 5. Update the weight factor \(\lambda=\lambda+1\) (\(\lambda\leq T\)), where \(T\) is a search space, which will be determined through the case studies later in the paper. Repeat steps (2)-(5) to find the optimal weight factor \(\lambda_{optimal}\) that satisfies the following equation:  
\[V^{T}R^{-1}V=\text{min} \tag{12}\]  
After step (6) is fulfilled, the final variance matrix of measurement errors \(R\) can be determined by using the optimal weight factor \(\lambda_{optimal}\). In order to determine a suitable search space \(T\) of the weight factors searching algorithm, different positioning modes are conducted with ionospheric constraints. Figure 2 displays the relationships between the weight factors and the post-fit weighted sum-squared residuals. It is clearly seen that varying trend of post-fit sum-squared residuals are quite consistent in different positioning modes. Due to the imprecise \(\widetilde{R}^{2}_{constra}\) used in RT PPP, the post-fit weighted sum residuals of squares is large when the variance matrix of ionospheric constraints is small.