Stochastic Modeling of Smartphones GNSS Observations Using LS-VCE and Application to Samsung S20

In recent years, numerous smartphones have been equipped with global navigation satellite system (GNSS) technology, enabling individuals to utilize their own devices for positioning and navigation purposes. In 2016, with the launch of a mobile app by Google, namely GnssLogger, smartphone users with Android version 7 or higher were able to record raw GNSS measurements (i.e., pseudorange, carrier phase, Doppler, and carrier-to-noise density ratio (C/N0)). Since then, enhancing the accuracy and efficiency of smartphone positioning has become an interesting area of research. Precise point positioning (PPP) is a powerful method providing precise real-time positioning of a single receiver, and it can be applied to smartphone observations as well. Achieving high-precision PPP requires selecting appropriate functional and stochastic models. In this study, we investigate the development of more reliable stochastic models for smartphone GNSS observations. The least-square variance component estimation (LS-VCE) method is applied to double-difference (DD) pseudorange and carrier phase observations from two Samsung S20s to obtain appropriate variances for GPS and GLONASS. According to the results, there is no significant correlation between the pseudorange and carrier phase observations of GPS and GLONASS on the L1 frequency. Furthermore, the quality of GLONASS carrier phase observations is comparable to that of GPS. The model’s performance is then assessed with respect to single-frequency precise point positioning (SF-PPP) using a dataset collected in kinematic mode from a Samsung S20 smartphone. A significant improvement of 25.1% and 32.7% on the root-mean-square (RMS) of horizontal positioning and the 50th percentile error, respectively, was achieved when employing the obtained stochastic model.


Introduction
The widespread demand for precise position information in mass-market applications has led to a significant increase in the use of low-cost and ultra-low-cost receivers. In recent years, many smartphones have also been equipped with advanced carrier phase tracking measurement technology to support precise position determination. During the "Google I/O" conference in May 2016, Google announced that the raw GNSS measurements, such as pseudorange, carrier phase, Doppler shift, and carrier-to-noise density ratio (C/N0) observations, would be available on Android Nougat (version 7) or higher operating systems. With the availability of several hundred smartphone models in the market that can provide raw GNSS observations, there is an increasing demand for research on improving smartphone positioning performance [1,2].
While the GNSS signals can be effectively used for outdoor localization purposes, signal attenuation or blockage prevents their employment in indoor settings. As a result, various alternative technologies, including Frequency modulation (FM), Ultra-wideband (UWB), Radio Frequency Identification (RFID), Wi-Fi, Bluetooth, and cellular networks as well as inertial sensors, are being utilized to meet the growing demand for indoor positioning [3][4][5][6][7][8]. In this contribution, however, we focus on the application of the GNSS technique for outdoor positioning.
The precise point positioning (PPP) method is a single-receiver global navigation satellite system (GNSS)-based precise positioning technique. It is different from the realtime kinematic (RTK) technique, which typically requires a base station [9,10]. Currently, there is a high demand for improving PPP accuracy with smartphones, especially in kinematic mode. Since the quality of smartphone observations is not as good as that of high-end geodetic receivers, there are several issues that must be addressed. Choosing appropriate stochastic models is crucial for achieving high-precision positioning where the stochastic model describes the statistical properties of observables. The elevationdependent weighting functions are generally employed to build a weighting model for the high-end geodetic receivers' observations. However, the elevation angle is not the only parameter that can be used to create a stochastic model for smartphone observations. The C/N0 value can also be effectively used to assign proper weights to the smartphone GNSS observations based on signal strength. The C/N0 refers to the ratio of the carrier power and the noise power per unit bandwidth [11]. It can therefore be considered a powerful indicator of the GNSS signal strength in the sense that a larger C/N0 indicates a stronger signal while a lower C/N0 shows a weaker signal. Recent studies have shown that the C/N0-dependent weighting method is superior to the elevation-dependent weighting method when using the GNSS observations obtained from Android smartphones. We will mention a few of these studies in the following.
Liu et al. [12] investigated the quality of raw GNSS observations of smartphones in terms of the C/N0, noise, tracking capability of the carrier phase, and velocity estimation. They found that there is a stronger correlation between the pseudorange accuracy and C/N0 rather than the satellite elevation angle. Therefore, using an elevation-dependent weighting model is not suitable for low-cost receivers, and a C/N0 weighting model is a better choice. Banville et al. [13] also proposed a C/N0 weighting model as an alternative to an elevation-dependent weighting model based on factors such as multipath noise, chipping length, or wavelength and C/N0. This weighting model was later utilized by Shinghal and Bisnath [14]. Employing the C/N0 weighting model instead of an elevationdependent weighting model has been also suggested in other studies [15][16][17]. Wang et al. [18] developed the Smart-PPP software application for smartphones, which achieved sub-meter float positioning accuracy in horizontal directions by utilizing a C/N0-based weighting model. The weighting model was based on an exponential function that took into account various factors such as the instantaneous C/N0 of the observations, a maximum C/N0 value for cutoff, and the corresponding pseudorange noise at maximum C/N0. Further details on this weighting model are available in their study [18]. Li et al. [19] also proposed a combined elevation angle and C/N0 weighting method for smartphone-based GNSS PPP by normalizing the C/N0-derived variances to the scale of the elevation-anglederived variances. Their findings showed that this method improved the three-dimensional positioning accuracy by 22.7% and 24.2% in an open-sky area, and by 52.0% and 26.0% in a constrained visibility area, compared with the elevation-angle-only and C/N0-only weighting methods, respectively. Miao et al. [20] also proposed a new weighting model that considers the variation range of C/N0, providing a better weighting model than the traditional weighting model, thus improving the positioning accuracy. The results indicated that the L5/E5a/B2a signals could generally obtain higher IAR fix-rate and positioning accuracies than the L1/E1/B1 signals.
To date, the existing stochastic models are mainly either elevation-dependent or C/N0based weighting models. Our contribution proposes a more reliable stochastic model that combines both elevation-dependent and C/N0 weighting methods. This approach takes into account the impact of both elevation angles and C/N0 records on different GNSS constellations and observation types (i.e., pseudorange and carrier phase observations) to adjust the stochastic model accordingly. The parameters in such a stochastic model can be estimated by using the least-squares variance component estimation (LS-VCE) method. The LS-VCE method is a well-established method for the estimation of unknown (co)variance components [21][22][23][24]. The method has been successfully employed to assess the noise characteristics of the high-end geodetic receivers [25][26][27]. In Zangenehnejad and Gao [28], the LS-VCE method was also applied to stochastic modeling of noisy smartphone GNSS observations but the effect of the elevation angle and C/N0 on different GNSS constellations and different observation types was not investigated. In this study, the weighting coefficients will be estimated separately for each constellation and each observation type. We will also estimate any possible correlation between the GNSS pseudorange and carrier phase observables. This paper is organized as follows: The LS-VCE method is briefly reviewed in Section 2. How to apply the LS-VCE method to noise assessment of GNSS smartphone observations is also explained in this section. The reliable stochastic model will then be applied to the single-frequency PPP (SF-PPP) model in Section 3. In Section 4, the performance of the SF-PPP model applying the obtained reliable stochastic model is investigated using the GNSS observations from the Samsung S20 device in a kinematic mode. Finally, some conclusions are made in Section 5.

Least-Squares Variance Component Estimation (LS-VCE)
Let us assume the linear(ized) model of observation equations as where E and D are the expectation and dispersion operators, respectively, y is the m-vector of observations, x is the n-vector of the unknown parameters, A is the m × n design matrix, and Q y is the m × m covariance matrix of the observables. The structure of the covariance matrix Q y is expressed as an unknown linear combination of some known cofactor matrices. The estimation of these unknown (co)variance parameters σ k ; k = 1, 2, . . . , p is referred to as variance component estimation (VCE). There exist many VCE methods and among them we will make use of the least-square variance component estimation (LS-VCE). The unknown (co)variance components are estimated asσ = σ 1 . . .σ p T = N −1 l, in which the component of the matrix N p×p and vector l p×1 are as follows [24]: and where trace is the sum of the diagonal elements of a matrix, is an orthogonal projector, I m is an m-by-m identity matrix, andê = P ⊥ A y denotes the mvector of residuals. For more details about the LS-VCE method, the reader may refer to [21][22][23][24].

Application of LS-VCE Method to the Noise Assessment of the Smartphone Observations
To assess the noise characteristics of the GNSS smartphone observables, the LS-VCE method can be applied to the double-differenced (DD) observations of two smartphones. For zero and short baselines (up to 10 m as used in this contribution), the DD atmospheric where ∆∇ represent the DD operator, a and b represent the base and rover stations, respectively; s and k denote the satellites, P and Φ stands for the pseudorange (code) and carrier phase observations in meter, respectively; ∆∇ρ s,k a,b is the DD receiver-satellite range, λ j is the corresponding carrier phase wavelength (m) on the jth frequency and ∆∇N s,k a,b,j is the DD ambiguity. The unknowns are the baseline components between the reference and rover receivers as well as the ambiguous term ∆∇N s,k a,b,j . In this contribution, we focus on the noise assessment of GNSS observations from the Samsung S20 device. Samsung S20 is a dual-frequency smartphone supporting L5/E5a frequencies for GPS and Galileo, respectively. To collect data for this study, we placed two Samsung S20 devices on top of a geodetic pillar with known coordinates, resulting in a very short baseline of approximately 5 cm. However, for some reason, they could not log Galileo observations as well as E1 and E5a frequencies. In addition, the number of GPS satellites with L5 observations is only one or two during the whole time of data collection. Therefore, in this contribution, we will employ the single-frequency GPS and GLONASS observations (j = 1). In this case, the unknowns are ∆∇N s,k,GPS a,b,1 and ∆∇N s,k,GLO a,b,1 (considering the known coordinates of the geodetic pillar).
Following [25,26], when dealing with DD observation types of one epoch, the structure of the stochastic model is as follows: in which blkdiag constructs a block diagonal matrix from input arguments and Q DD GPS and Q DD GLO are the two covariance matrices of the DD GPS and GLONASS observations, respectively. Assuming n 1 and n 2 visible satellites for GPS and GLONASS, respectively, Q DD GPS and Q DD GLO can be expressed as follows: and in which ⊗ denotes the Kronecker product, the satellite number [1] G and [1] R are assumed to be the reference satellites for GPS (G) and GLONASS (R) constellations, respectively; ρ GPS and ρ GLO are the correlation between the GPS code and carrier phase observations and the GLONASS code and carrier phase observations, respectively. The components of Q DD GPS and Q DD GLO matrices (σ 2 [i] sys ) can be defined as a function of the satellite elevation angle. However, smartphones are equipped with linearly polarized antennas due to the low cost and limited space, resulting in degraded GNSS measurement quality compared with the high-end geodetic GNSS receivers. Therefore, the traditional elevation-dependent weighting method is not appropriate when employing the GNSS observations obtained from Android smartphones. Instead, the C/N0-dependent weighting method is a better option. In this contribution, we will use a combination of C/N0 and elevation-dependent weighting methods. The C/N0/elevation-based stochastic model of GNSS observations (σ 2 [i] ) is of the form in which C/N0 i is the carrier-to-noise ratio value and E i is the satellite elevation angle. In Equations (6) and (7), a sys type is a constant needed to be determined for each device, each constellation (sys: GPS and GLONASS), and each observation type (type: code and phase). We aim to estimate these unknown values using the LS-VCE method for the Samsung S20 device. We use the following values as the primary values denoted as "nominal stochastic model":

•
For GPS: a GPS code = 10 5 , a GPS phase = 10 3 indicating that code observables are 10 times noisier than the carrier phase observables, and ρ GPS = 0 indicating there is no correlation between the GPS code and phase observables; • For GLONASS: a GLO type = 2 × a GPS type = 2 × 10 5 indicating that GLONASS observables are √ 2 times nosier than the GPS observables and ρ GLO = 0 indicating there is no correlation between the GLONASS code and carrier phase observables.
We will also estimate these values for the two systems and two observation types as well as possible correlations (i.e., a GPS code , a GPS phase , ρ GPS for GPS and a GLO code , a GLO phase , ρ GLO for GLONASS). The unknown vector of the stochastic model is then σ = a GPS code a GPS phase ρ GPS a GLO code a GLO phase ρ GLO T and their corresponding cofactor matrices are provided in Table 1

PPP Mathematical Model
After estimating the stochastic model using the LS-VEC method, we aim to investigate how introducing a more reliable stochastic model affects the performance of PPP using Android smartphones. PPP is an efficient technique to provide real-time precise positioning using precise satellite orbits and satellite clocks provided, e.g., by the International GNSS Service (IGS). Additional correction terms must also be considered in PPP processing. They include satellite and receiver antenna offsets, carrier phase wind-up, and site displacement effects, including solid Earth tides, ocean tide loading, and polar motion [30]. PPP can also be implemented in smartphone observations. Early smartphones only provided single-frequency and mostly GPS-only observations. In recent years, dual-frequency GNSS smartphones have also been launched. In this contribution, we focus on the noise assessment of GNSS observations from the Samsung S20 device, which is a dual-frequency smartphone supporting L5/E5a frequencies for GPS and Galileo. However, we mainly focus on the single-frequency PPP using the GPS and GLONASS observations as there are no Galileo observations as well as no E1 and E5a frequencies in our collected dataset. This approach can be extended to the dual-frequency multi-GNSS case in the future.
This section consists of two subsections. Section 3.1 provides some explanations about the functional model (SF-PPP) used in the contribution while in Section 3.2, the PPP stochastic model used here is described.

Functional Model
The PPP functional model used in this contribution is the single-frequency uncombined PPP model (SF-PPP) (L1 only). One can further generalize the model to the dualfrequency case (DF-PPP). The undifferenced GNSS code and carrier phase observations for the satellite s and the receiver r on frequency j are as follows [29]: where P j and Φ j denote the pseudorange and carrier phase observations on the frequency j in meters; ρ is the geometric range between satellite and receiver as a function of the satellite and the receiver coordinates; T is the tropospheric delay (m) which can be split into dry and wet parts; c is the vacuum speed of light (m/s); dt r and dt s are the receiver and satellite clock errors (s), respectively; I s r,1 is the first-order slant ionospheric delay on frequency L1 (m); γ j = f 2 1 /f 2 j is the frequency-dependent multiplier factor (in the case of L1 frequency γ j = 1); f j is the corresponding frequency; λ j is the corresponding carrier phase wavelength (m); N s r,j denotes the integer carrier phase ambiguity term in the cycle; b r,j and B r,j denote the frequency-dependent receiver pseudorange and carrier phase hardware delays (biases), respectively; and b s ,j and B s ,j are the frequency-dependent satellite pseudorange and carrier phase hardware delays (biases), respectively.
The satellite clock errors, which are available from the IGS through the precise clock products, are provided based on the ionosphere-free linear combination of code observations on L1 and L2 frequencies, i.e., P1 and P2 [10]. Employing the satellite clock errors provided by the IGS for the original code and carrier phase observations in the PPP model introduces an additional bias in the observations. To compensate for this bias, one must consider the satellite differential code biases (DCB), which are available from the IGS as well. Let us consider the precise satellite clock errors cdt s,IF provided by the IGS as The observation minus calculation (OMC) terms of the uncombined code measurement on frequency j can be written as follows: where which is known (from the IGS products); g s r is the line-of-sight vector between the satellite and receiver; and ∆x r is the receiver position increment error. Similarly, for the carrier phase observation equation, we have where λ j (1,2) . In the case of L1-only observations (j = 1), the linearized observation equations given in Equations (10) and (11) can be written as follows: where γ j = 1, is the satellite DCBs between the first and second frequency bands [31,32].

Stochastic Model
This section outlines the stochastic model of the undifferenced and uncombined GNSS observations. When utilizing the GNSS observations from smartphones, it is more favorable to use the C/N0-dependent weighting method instead of the elevation-dependent weighting approach. In this study, we instead use a combination of both the C/N0 and elevation-dependent weighting models. The C/N0/elevation-based variance of GNSS observations (σ 2,sys type,i ) is given as in which sys denotes the constellation type (GPS or GLONASS); type defines the observation type (code or phase); and σ 2,sys type,i is the variance of observation in m 2 as a function of its signalto-noise ratio value C/N0 i and its elevation angle E i . In this formula, a sys type is a constant that has been estimated for each constellation (GPS and GLONASS) and each observation type (code and phase) uses the LS-VCE method explained in the previous section.
Considering GPS and GLONASS observations, the covariance matrix of the undifferenced observations is of the form: in which Q GPS and Q GLO are the two covariance matrices for the GPS and GLONASS systems, respectively. Assuming n 1 and n 2 visible satellites for GPS and GLONASS, respectively, Q GPS and Q GLO can be expressed as follows: where Q GPS code and Q GPS phase are the two n 1 × n 1 matrices related to the GPS code and carrier phase observations, Q GLO code and Q GLO phase are the two n 2 × n 2 matrices related to the GLONASS code and carrier phase observations and sym is the notation of a symmetric matrix. Q sys type for each system and each observation type can also be obtained as follows: where diag is the diagonal operator, sys could be "GPS" or "GLO", type could be "code" or "phase" and n i ; i = 1, 2 is the number of visible satellites for GPS and GLO, respectively. In Equation (15) where ρ sys is the possible correlation among the code and phase observations estimated by using the LS-VCE method.

Experimental Results
In this section, the noise characteristics of GPS, the GLONASS code, and carrier phase observations from the two Samsung S20 devices are first investigated. The positioning performance of the SF-PPP model while employing the reliable stochastic model is then evaluated.

Noise Assessment of Samsung S20
In this section, two Samsung S20 devices, namely Samsung S20 Black (S20B) and Samsung S20 White (S20W), were placed close to each other on a pillar with the true coordinates making a very short baseline (about 5 cm). The data were collected on 4 February 2023 for 3 h from 00:30:00 to 03:30:00 UTC with a sampling interval of 1 s (10,800 epochs). Figure 1 shows the location of the two Samsung S20 smartphones which are on top of a geodetic pillar with known coordinates on the rooftop of the civil engineering building (pillar N2), University of Calgary, Calgary, Canada. Table 2 provides the coordinates of  pillar N2 and Table 3 gives a brief summary of the experiment.
ordinates making a very short baseline (about 5 cm). The data were collected on 4 February 2023 for 3 hours from 00:30:00 to 03:30:00 UTC with a sampling interval of 1 s (10,800 epochs). Figure 1 shows the location of the two Samsung S20 smartphones which are on top of a geodetic pillar with known coordinates on the rooftop of the civil engineering building (pillar N2), University of Calgary, Calgary, Canada. Table 2 provides the coordinates  of pillar N2 and Table 3 gives a brief summary of the experiment.     Table 3. GNSS data information.

Device
Samsung S20 Black (S20B) and Samsung S20 White (S20W) The Samsung S20 is a smartphone that supports both L5 and E5a frequencies for GPS and Galileo, respectively. However, the Galileo observations, including E1 and E5a frequencies, were not logged in the collected dataset for some unknown reason. Furthermore, there were only a few GPS satellites with L5 signals observed throughout the entire data collection period. Hence, our attention will be directed toward the single-frequency GPS and GLONASS observations. As the proposed smartphone stochastic modeling approach relies on employing the DD observations, we need to first analyze the availability and continuity of GNSS observations from both devices, as well as the common satellites between the two devices. Figure 2  According to the figures, GPS and GLONASS are common constellations betw two devices with an adequate number of tracked satellites, while the BeiDou doe provide enough observations in the S20B dataset. To continue, we will therefore focu the noise assessment of GPS and GLONASS observations on the L1 frequency. Show Figure 3 are the C/N0 values for GPS and GLONASS on the first frequency for both vices. The plot reveals that the performance of the two Samsung S20 devices is al similar in terms of the recorded C/N0 values. Figure 4 also illustrates the total numb common GPS/GLONASS satellites between Samsung S20 Black and Samsung S20 W on the L1 frequency. The geometry of GPS and GLONASS satellites in view is also sented in the Sky plot in Figure 5. According to the figures, GPS and GLONASS are common constellations between two devices with an adequate number of tracked satellites, while the BeiDou does not provide enough observations in the S20B dataset. To continue, we will therefore focus on the noise assessment of GPS and GLONASS observations on the L1 frequency. Shown in Figure 3 are the C/N0 values for GPS and GLONASS on the first frequency for both devices. The plot reveals that the performance of the two Samsung S20 devices is almost similar in terms of the recorded C/N0 values. Figure 4 also illustrates the total number of common GPS/GLONASS satellites between Samsung S20 Black and Samsung S20 White on the L1 frequency. The geometry of GPS and GLONASS satellites in view is also presented in the Sky plot in Figure 5.       Following the assessment of the consistency of the C/N0 and the number of common satellites between the devices, we obtained the DD code and carrier phase observations for GPS and GLONASS. PRN 06 and PRN 20 were selected as the reference satellites fo GPS and GLONASS, respectively. The DD code and phase observations for all visible sat ellites on the L1 frequency for both constellations are presented in Figure 6. Table 4 pro vides the mean and RMS of the DD code observations for GPS and GLONASS on the L1 frequency. Based on the results, the quality of the GLONASS code observations on the L1 frequency is worse than the other two systems.  We now employ the LS-VCE method on the DD code and phase observations on the Following the assessment of the consistency of the C/N0 and the number of common satellites between the devices, we obtained the DD code and carrier phase observations for GPS and GLONASS. PRN 06 and PRN 20 were selected as the reference satellites for GPS and GLONASS, respectively. The DD code and phase observations for all visible satellites on the L1 frequency for both constellations are presented in Figure 6. Table 4 provides the mean and RMS of the DD code observations for GPS and GLONASS on the L1 frequency. Based on the results, the quality of the GLONASS code observations on the L1 frequency is worse than the other two systems.  Following the assessment of the consistency of the C/N0 and the number of common satellites between the devices, we obtained the DD code and carrier phase observations for GPS and GLONASS. PRN 06 and PRN 20 were selected as the reference satellites for GPS and GLONASS, respectively. The DD code and phase observations for all visible satellites on the L1 frequency for both constellations are presented in Figure 6. Table 4 provides the mean and RMS of the DD code observations for GPS and GLONASS on the L1 frequency. Based on the results, the quality of the GLONASS code observations on the L1 frequency is worse than the other two systems.  We now employ the LS-VCE method on the DD code and phase observations on the L1 frequency. First, the entire time span of the smartphone observations (10,800 epochs)  We now employ the LS-VCE method on the DD code and phase observations on the L1 frequency. First, the entire time span of the smartphone observations (10,800 epochs) is divided into 45 groups, each consisting of 240 consecutive epochs (4 min). The unknown (co)variance parameters σ = a GPS code a GPS phase ρ GPS a GLO code a GLO phase ρ GLO T can then be separately estimated for each group. The final solution will be the average over all groups. Figure 7 shows the groupwise estimates of a sys type for the code/phase observations of GPS and GLONASS on the first frequency as well as estimated correlations among the code and phase observations of each constellation (i.e., ρ GPS and ρ GLO ). The final estimates are just the arithmetic mean of the individual estimates over the 45 groups. Table 5 presents the mean value of the estimated coefficients (a sys type where sys refers to GPS and GLONASS and type denotes the observation type, i.e., code and phase) on L1 frequency as well as the correlation between code and carrier phase observations. The results indicate that there is no significant correlation between the code and carrier phase observations of GPS and GLONASS. is divided into 45 groups, each consisting of 240 consecutive epochs (4 min). The unknown (co)variance parameters = can then be separately estimated for each group. The final solution will be the average over all groups Figure 7 shows the groupwise estimates of for the code/phase observations of GPS and GLONASS on the first frequency as well as estimated correlations among the code and phase observations of each constellation (i.e., and ). The final estimates are just the arithmetic mean of the individual estimates over the 45 groups. Table 5 presents the mean value of the estimated coefficients ( where refers to GPS and GLONASS and denotes the observation type, i.e., code and phase) on L1 frequency as well as the correlation between code and carrier phase observations. The results indi cate that there is no significant correlation between the code and carrier phase observa tions of GPS and GLONASS.   Consideringâ GPS code = 0.35 × 10 5 andâ GLO code = 1.08 × 10 5 , the standard deviation (STD) of the code observations for GPS and GLONASS on the first frequency can be observed in Figure 8 as a function of the C/N0 value and elevation angle.

Constellations
Yong et al. [34] also investigated the noise characteristics of the Samsung S20 and Google Pixel 4 smartphones by fitting empirical 95% confidence ellipses/levels to the formal counterparts, as derived from the corresponding variance-covariance (VCV) matrices of the positions. The empirical VCV-matrix was obtained by comparing estimated positions to precise benchmark coordinates, while the formal VCV-matrix was obtained from the means of all single-epoch formal VCV-matrices over the observation span. The study obtained the undifferenced and zenith-referenced STDs in three different setup configurations: zerobaseline external antennas, short-baseline external antennas, and short-baseline internal antennas. The authors assumed the same code and phase STDs for all frequencies (L1, L5, E1, E5a, and B1) and constellations. In the case of the Samsung S20 with short-baseline internal antennas, the corresponding STD values for code and carrier phase observations were 0.003 m and 2.327 m, respectively. In the current research, we utilized the LS-VCE method, which allowed us to estimate frequency/observation type/system-dependent precision (i.e., code vs. carrier phase, L1 vs. L5, and GPS vs. other constellations) as well as any covariances between different observation types (e.g., between code and carrier phase). However, it is important to note some limitations associated with the proposed method. First, the proposed method relies on constructing the DD observations between two smartphones, which necessitates a sufficient number of common satellites between the devices. However, due to the low-cost linearly polarized antennas used in smartphones, they may not be able to track all the same satellites. Second, implementing the LS-VCE method can be time-consuming for two reasons: (1) it is an iterative method and (2) creating matrices with large sizes may surpass the maximum array size allowed. Third, the dataset used in the contribution did not include the measurements on the L5 frequency, thereby limiting the ability to evaluate the noise of observations on the L5 frequency.

SF-PPP Performance Employing Reliable Stochastic Model
The performance of the SF-PPP model when using the reliable stochastic model is investigated in kinematic mode using a dataset from the same dual-frequency Samsung S20 device as the previous Section 4.1. A kinematic test was carried out on 22 November 2022 with a duration of nearly 1 h in a mostly open-sky environment with overpasses, in Calgary, Alberta, Canada. Figure 9 displays the kinematic test configuration and the reference vehicle's path in this experiment. Yong et al. [34] also investigated the noise characteristics of the Samsung S20 and Google Pixel 4 smartphones by fitting empirical 95% confidence ellipses/levels to the formal counterparts, as derived from the corresponding variance-covariance (VCV) matrices of the positions. The empirical VCV-matrix was obtained by comparing estimated positions to precise benchmark coordinates, while the formal VCV-matrix was obtained from the means of all single-epoch formal VCV-matrices over the observation span. The study obtained the undifferenced and zenith-referenced STDs in three different setup configurations: zero-baseline external antennas, short-baseline external antennas, and short-baseline internal antennas. The authors assumed the same code and phase STDs for all frequencies (L1, L5, E1, E5a, and B1) and constellations. In the case of the Samsung S20 with short-baseline internal antennas, the corresponding STD values for code and carrier phase observations were 0.003 m and 2.327 m, respectively. In the current research, we utilized the LS-VCE method, which allowed us to estimate frequency/observation type/systemdependent precision (i.e., code vs. carrier phase, L1 vs. L5, and GPS vs. other constellations) as well as any covariances between different observation types (e.g., between code and carrier phase). However, it is important to note some limitations associated with the proposed method. First, the proposed method relies on constructing the DD observations between two smartphones, which necessitates a sufficient number of common satellites between the devices. However, due to the low-cost linearly polarized antennas used in smartphones, they may not be able to track all the same satellites. Second, implementing the LS-VCE method can be time-consuming for two reasons: (1) it is an iterative method and (2) creating matrices with large sizes may surpass the maximum array size allowed. Third, the dataset used in the contribution did not include the measurements on the L5 frequency, thereby limiting the ability to evaluate the noise of observations on the L5 frequency.

SF-PPP Performance Employing Reliable Stochastic Model
The performance of the SF-PPP model when using the reliable stochastic model is investigated in kinematic mode using a dataset from the same dual-frequency Samsung S20 device as the previous Section 4.1. A kinematic test was carried out on 22 November 2022 with a duration of nearly 1 hour in a mostly open-sky environment with overpasses, in Calgary, Alberta, Canada. Figure 9 displays the kinematic test configuration and the reference vehicle's path in this experiment. For the kinematic experiment, we used three geodetic receivers, two U-blox F9Ps, and one Septentrio AsteRx-m2, as indicated by the three pick arrows in Figure 9. Additionally, we placed six smartphones on the vehicle roof to be used for future research. For the kinematic experiment, we used three geodetic receivers, two U-blox F9Ps, and one Septentrio AsteRx-m2, as indicated by the three pick arrows in Figure 9. Additionally, we placed six smartphones on the vehicle roof to be used for future research. However, for this particular study, we only utilized the dataset from the Samsung S20 Black. The reference trajectory of the vehicle during the kinematic experiment was obtained by the RTK fixed solutions from the three geodetic receivers (shown by the three pick arrows in Figure 9) as the rover receivers and a geodetic receiver on a geodetic pillar (with true position) on the rooftop of the civil engineering building at the University of Calgary as the base receiver. The offsets between all units were measured and applied prior to comparison. Table 6 provides GNSS data information and processing setting. Table 6. GNSS data information and processing setting.

Device
Samsung S20 Black

RINEX converter
UofC CSV2RINEX tool [32] Measurements used GPS (L1), GLONASS (L1) The horizontal positioning error in the cases of the SF-PPP model using the nominal stochastic model (i.e., a GPS code = 10 5 , a GPS phase = 10 3 and a GLO type = 2×a GPS type = 2 × 10 5 ) and the reliable stochastic model (considering the estimated scale factorsâ sys type ) are provided in Figure 10. Please note that the values displayed in Figure 10 were calculated using all positioning solutions, including the convergence period. Figure 11   Several studies have focused on investigating the performance of PPP smartphone positioning using different weighting models. Some examples include [19,33,[35][36][37][38]. Li et al. [19] utilized a weighting approach that combined the elevation angle and C/N0 for smartphone-based GNSS PPP. The proposed method was then assessed through GNSS kinematic experiments using the Xiaomi MI8 device. The RMS values of the PPP errors in the east, north, and up components were 1.00 m, 0.62 m, and 2.22 m, respectively, when utilizing the combined weighting scenario. This represents an improvement compared to using either the elevation-angle-only weighting or the C/N0-only weighting scenarios. Zangenehnejad et al. developed their own CSV to RINEX converter in [33] and applied PPP to GNSS observations collected from a Xiaomi Mi8 smartphone based on a C/N0dependent stochastic model. They found that the 50th percentile horizontal error was 0.330 m in a kinematic test conducted in an open-sky environment. In [35], Liu et al. used GNSS observations from the Xiaomi Mi8 and Samsung S20 smartphones and achieved sub-meter PPP accuracy at the 50th percentile horizontal error. However, no details were provided regarding the employed stochastic model. Wu et al. [36] used dual-frequency GPS (L1/L5) and Galileo (E1/E5a) observations from a Xiaomi Mi8 smartphone. By utilizing an elevation-dependent stochastic model, they demonstrated that the PPP algorithm's positioning accuracy was at the meter level in kinematic mode, which is comparable to the accuracy of our solution. Chen et al. [37] proposed a modified single-frequency PPP  Several studies have focused on investigating the performance of PPP smartphone positioning using different weighting models. Some examples include [19,33,[35][36][37][38]. Li et al. [19] utilized a weighting approach that combined the elevation angle and C/N0 for smartphone-based GNSS PPP. The proposed method was then assessed through GNSS kinematic experiments using the Xiaomi MI8 device. The RMS values of the PPP errors in the east, north, and up components were 1.00 m, 0.62 m, and 2.22 m, respectively, when utilizing the combined weighting scenario. This represents an improvement compared to using either the elevation-angle-only weighting or the C/N0-only weighting scenarios. Zangenehnejad et al. developed their own CSV to RINEX converter in [33] and applied PPP to GNSS observations collected from a Xiaomi Mi8 smartphone based on a C/N0dependent stochastic model. They found that the 50th percentile horizontal error was 0.330 m in a kinematic test conducted in an open-sky environment. In [35], Liu et al. used GNSS observations from the Xiaomi Mi8 and Samsung S20 smartphones and achieved sub-meter PPP accuracy at the 50th percentile horizontal error. However, no details were provided regarding the employed stochastic model. Wu et al. [36] used dual-frequency GPS (L1/L5) and Galileo (E1/E5a) observations from a Xiaomi Mi8 smartphone. By utilizing an elevation-dependent stochastic model, they demonstrated that the PPP algorithm's positioning accuracy was at the meter level in kinematic mode, which is comparable to the accuracy of our solution. Chen et al. [37] proposed a modified single-frequency PPP Several studies have focused on investigating the performance of PPP smartphone positioning using different weighting models. Some examples include [19,33,[35][36][37][38]. Li et al. [19] utilized a weighting approach that combined the elevation angle and C/N0 for smartphone-based GNSS PPP. The proposed method was then assessed through GNSS kinematic experiments using the Xiaomi MI8 device. The RMS values of the PPP errors in the east, north, and up components were 1.00 m, 0.62 m, and 2.22 m, respectively, when utilizing the combined weighting scenario. This represents an improvement compared to using either the elevation-angle-only weighting or the C/N0-only weighting scenarios. Zangenehnejad et al. developed their own CSV to RINEX converter in [33] and applied PPP to GNSS observations collected from a Xiaomi Mi8 smartphone based on a C/N0dependent stochastic model. They found that the 50th percentile horizontal error was 0.330 m in a kinematic test conducted in an open-sky environment. In [35], Liu et al. used GNSS observations from the Xiaomi Mi8 and Samsung S20 smartphones and achieved sub-meter PPP accuracy at the 50th percentile horizontal error. However, no details were provided regarding the employed stochastic model. Wu et al. [36] used dual-frequency GPS (L1/L5) and Galileo (E1/E5a) observations from a Xiaomi Mi8 smartphone. By utilizing an elevation-dependent stochastic model, they demonstrated that the PPP algorithm's positioning accuracy was at the meter level in kinematic mode, which is comparable to the accuracy of our solution. Chen et al. [37] proposed a modified single-frequency PPP algorithm that estimates separate clock biases for pseudorange and carrier phase observations. They used a Xiaomi Mi8 smartphone and found that the average horizontal and vertical RMS errors based on an elevation-dependent stochastic model were 0.81 m and 1.65 m, respectively. Zhu et al. [38] also utilized a Huawei Mate 30 smartphone to carry out PPP testing in a kinematic mode, employing the C/N0-dependent stochastic model. They could achieve a positioning accuracy of 0.93 m, 0.62 m, and 2.17 m in the east, north, and up directions, respectively. The findings showed that the accuracy was improved by approximately 26.2%, 20.5%, and 20.4% in comparison to the elevation-dependent stochastic model results. Although differences in the measurement environment and employed mathematical models could explain variations in the obtained accuracy, the overall performance of PPP remains consistent across different studies.

Summary and Conclusions
Thanks to the new API implemented on Android 7 and later versions, the utilization of smartphones for various applications such as cadastral surveying, mapping surveying applications, and navigation has been significantly increasing due to cost-effective GNSS smartphones. However, there are still various challenges that prevent users from obtaining highly accurate results using smartphone observations.
In this study, we have investigated reliable stochastic modeling of smartphone GNSS observations and developed a C/N0 and elevation-dependent weighting method. We obtained a reliable stochastic model using the LS-VCE method and employing the DD code and phase observations from a very short baseline (two Samsung S20 devices placed close to each other on a pillar). The model performance has been evaluated by single-frequency PPP with a Samsung S20 smartphone. The following conclusions can be drawn from our study on reliable stochastic modeling using LS-VCE and application to Samsung S20 smartphones:
There is no significant correlation between the GPS code and carrier phase observations on the L1 frequency. The same conclusions hold for the GLONASS constellation; 3.
The results of the study confirmed an improvement of 25.1% and 32.7% on the RMS of horizontal positioning and the 50th percentile error, respectively, when employing the obtained stochastic model. This research provides insights into the potential of high-precision smartphone positioning and highlights the importance of the proper choice of functional and stochastic models in achieving this goal.
Our future research will focus on developing a more reliable stochastic model for other constellations as well as the second frequency (L5/E5a).
Author Contributions: All the authors have contributed to the presented work. The first author, F.Z., analyzed the static and kinematic datasets, prepared the plots, and wrote the draft of the manuscript. The second author, Y.G., supervised manuscript development and the direction of the research, revised the paper, and provided further analysis. All authors participated in formulating the idea and in discussing the proposed approach and results. All authors have read and agreed to the published version of the manuscript.

Funding:
The financial support from the Natural Sciences and Engineering Research Council of Canada (NSERC) is greatly acknowledged. The first author greatly acknowledges the funding support provided by the Izaak Walton Killam Memorial Scholarship.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data that support the findings of this study are available upon request from the corresponding author, via farzaneh.zangenehnej@ucalgary.ca.