## 2 Methodology
### Model of RTK Measurement
Once the optimal integer ambiguity, \(\
abla\Delta\hat{N}\), is determined, it will be employed to update the receiver position, \(\widehat{p}_{r}\), in the following equation:  
\[\overset{\vee}{p}=\overset{\wedge}{p}_{r}-P_{\overset{\wedge}{p}_{r},\
abla \Delta\hat{N}}P_{\
abla\Delta\hat{N}}^{-\overset{\wedge}{\Delta\hat{N}}}\bigg{(} \
abla\Delta\overset{\wedge}{\hat{N}}-\
abla\Delta N\bigg{)} \tag{4}\]  
where \(\overset{\wedge}{p}_{r}\) and \(\overset{\wedge}{\hat{N}}\) are regarded as the float solution, while \(\overset{\vee}{p}\) and \(\
abla\Delta N\) are the fixed solution. Moreover, the ratio test is used to ensure the accuracy of the fixed ambiguities by validating the probability of their correctness [36]. This is essential in RTK positioning, where resolving the integer ambiguities accurately is crucial for precise positioning. After determining the float solution ambiguity and its covariance matrix through the Least-squares AMBiguity Decorrelation Adjustment (LAMBDA) method, the optimal integer ambiguity is identified. The fixed ambiguity solution's accuracy is then validated using the ratio test. The ratio test compares the squared residuals of the second-best-candidate solution to the best-candidate solution. If the ratio of these squared residuals is greater than a predefined threshold, the best candidate is accepted as the correct solution. This helps to ensure that the fixed ambiguities are indeed accurate, reducing the chances of incorrect ambiguity fixing, which can lead to significant positioning errors. According to previous studies, the noise variation in the GNSS observations of a smartphone differs from that measured by geodetic quality equipment. It shows a weak correlation with the elevation but a strong correlation with the C/N0 [10]. To address this, we employed a pseudorange weighting model that considers the C/N0 and sets the weight ratio of the pseudorange to carrier phase as 2.78 \(\times\) 10\({}^{-6}\). This model can be represented as \(\sigma_{i}=\sqrt{a+b.10^{-(C/N0)/10}}\), where \(\sigma_{i}\) denotes the pseudorange noise, and parameters \(a\) and \(b\) must be determined for each piece of equipment at different frequencies and constellations. The calibration details for parameters \(a\) and \(b\) can be referred to in [11; 12]. Of course, if the pseudorange precision is 1 m, setting the carrier phase precision to 2.78 \(\times\) 10\({}^{-6}\) m (or approximately 2.78 \(\upmu\)m) is not realistic. This extremely small ratio is likely chosen to emphasize the relative reliability and precision of carrier-phase measurements over pseudorange measurements, not to imply an exact physical precision of the carrier phase. It is essential to have reliable observations available in order to enhance smartphone RTK positioning performance. Especially in urban environments, pseudorange gross errors, as well as carrier-phase cycle slips, are common, resulting in a decrease in the accuracy and continuity of smartphones with RTK solutions. A data quality control strategy based on [37] is proposed as a solution that combines both prior detection and post-detection methodologies. We performed a data check based on the signal state in order to check the data against the results of our observation characteristic analysis, which was discussed earlier. The following steps are involved in this method:  
\[\left\{ \begin{array}{c}C/N0\ <\ k_{1}\\ ELE.\ <\ k_{2}\\ ADRS==2\ or\ 4\end{array} \right. \tag{5}\]  
In addition to these conditions, the observations deemed unreliable are those in which either the C/N0 is below the threshold (\(k_{1}\) = 20 dB-Hz) or the elevation is below the threshold (\(k_{2}\) = 15 degrees). A carrier phase is also considered unreliable if bit1 of the Accumulated Delta Range State (ADRS) equals 2 or 4. This metric indicates the status of the carrier phase measurements, which is critical for identifying the reliability of the data. Specifically, a carrier phase is considered unreliable if bit1 of the ADRS equals 2 or 4.