## 2 Methods
### Hybrid Weight Function  
The positioning accuracy of a PPP model is determined by the observation model and weight function together. Based on the observation mode of the presented mixed-frequency PPP, usually, two classic weight functions can be adopted in data processing. One is the elevation-dependent model [34]:  
\[\sigma_{P,i}^{2}=\sigma_{P}^{2}/\sin^{2}(ele_{i}) \tag{24}\]  
\[\sigma_{L,i}^{2}=\sigma_{L}^{2}/\sin^{2}(ele_{i}) \tag{25}\]  
The other one is the signal-to-noise rate (C/N\({}_{0}\))-based model [2; 35]:  
\[\sigma_{P,i}^{2}=\sigma_{P}^{2}\cdot 10^{\frac{\max(C/N_{0}MAX^{-C/N_{0}},i)}{ 10}} \tag{26}\]  
\[\sigma_{L,i}^{2}=\sigma_{L}^{2}\cdot 10^{\frac{\max(C/N_{0}MAX^{-C/N_{0}},i)}{ 10}} \tag{27}\]  
where \(\sigma_{P,i}^{2}\) and \(\sigma_{L,i}^{2}\) represent the variances of pseudo-range and carrier-phase observations for the \(i\)th satellite, respectively; \(\sigma_{P}^{2}\) and \(\sigma_{L}^{2}\) denote the priori standard deviations of pseudo-range and carrier-phase observations; \(ele_{i}\) is the satellite elevation. \(\max()\) is the function to find the maximum value; \(C/N_{0,MAX}\) indicates the maximum value of the carrier-to-noise ratio (\(C/N_{0,i}\)).  
However, the impacts of two such classic weight functions would be different even for the same GNSS in different applications. Theoretically, the C/N\({}_{0}\)-dependent weight function can reflect a more realistic quality of the observation. However, the satellite observations with the same C/N\({}_{0}\) values could also have different elevation angles. Meanwhile, for a satellite with lower elevation angle, its observation would be more severely affected by the multipath error, which will result in a lower quality. To set a reliable prior variance for a smartphone's GNSS observation, this paper tries to build a novel weight function. The basic logic of such a novel weight function is that the weight function is majorly based on the C/N\(0\) value and it could also present the impact of the satellite elevation angle (i.e., in terms of a coefficient). This is because the C/N\(0\) value is more reliable than the satellite elevation angle in presenting the quality of a GNSS observation. In addition, the enhancement of the satellite elevation angle-dependent model should be within a reasonable range to prevent the C/N\(0\)-dependent model from losing its effectiveness. That is to say, based on the C/N\(0\)-dependent weight function, the variance of each GNSS observation is further adjusted and optimized by such a satellite elevation angle-dependent coefficient, thereby improving the positioning accuracy.  
Therefore, based on the C/N\({}_{0}\)-based model [2] as shown in Equations (26) and (27), we defined a hybrid weight function by considering both the satellite elevation angle and C/N\(0\) ratio value, which can be written as  
\[\sigma_{P,i}^{2}=\alpha\cdot\sigma_{P}^{2}\cdot 10^{\frac{\max(C/N_{0,MAX^{-C/N_{0 }},i)}{10}}} \tag{28}\]\[\sigma_{L,i}^{2}=\alpha\cdot\sigma_{L}^{2}\cdot 10^{\frac{\max(C/N_{0,MAX}X^{-C/N_{0},0} )}{10}} \tag{29}\]  
where \(\alpha\) is a satellite elevation angle-dependent coefficient that can be calculated using Equation (30):  
\[\alpha\ =\ \left\{\begin{array}{ll}1,&ele_{i}\geq ele_{set}\\ \left(2-\frac{ele_{i}-ele_{min}}{el_{set}-el_{min}}\right)^{2},&ele_{min}\leq ele _{i}<ele_{set}\end{array}\right. \tag{30}\]  
where \(ele_{i}\) represents the elevation angle of the \(i\)th satellite; \(ele_{\min}\) is the minimum value of the satellite elevation angle; \(ele_{set}\) is a value a little higher than the minimum satellite elevation angle; \(\alpha\) is a factor related to lower satellite elevation angles; and the corresponding value is between 1 and 4.  
Accordingly, this hybrid weight function is mainly based on the C/N\({}_{0}\)-dependent model. Meanwhile, the impact of GNSS observations with different elevation angles on the PPP accuracy can be restrained by multiplying an elevation-angle-dependent coefficient.