Introduction

In 2016, Google made raw GNSS (Global Navigation Satellite System) observations of Android devices accessible (Banville and Diggelen 2016). Since this date, the GNSS community has seen a growing interest in navigation, positioning, and timing applications with Android devices, particularly smartphones. The growing attention is mainly because the GNSS mass market is quantitatively dominated by low-cost receivers, taking the sensors in mobile devices and smartphones into account (EUSPA EO and GNSS Market Report 2022). However, achieving high positioning accuracy with smartphones is quite difficult because of their specific limitations, such as low protection against multipath, noisy code and phase observations, and disrupted carrier phases (Wanninger and Heßelbarth 2020; Darugna et al. 2021; Paziewski et al. 2021; Vazquez-Ontiveros et al. 2024). In the last few years, researchers have conducted numerous attempts to assess and improve the performance of smartphone positioning applications based on mostly the Real-time Kinematic (RTK) (Odolinski and Teunissen 2019; Dabove and Di Pietra 2019; Yong et al. 2021; Darugna 2021; Gao et al. 2021; Tao et al. 2023) and Precise Point Positioning (PPP) methods (Wu et al. 2019; Aggrey et al. 2020; Wang et al. 2021, 2023; Li et al. 2021).

Recent literature includes several studies that focus on the quality analysis of observations collected from Android smartphones. Studies have reported that observations from smartphones are more susceptible to multipath effects as they typically utilize low-cost antennas that are linearly polarized, unlike circularly polarized geodetic-grade antennas (Paziewski 2020; Zangenehnejad and Gao 2021). Compared to those from geodetic-grade receivers, smartphone observations have significantly lower C/N0 (carrier-to-noise ratio) values, which indicates lower signal strength (Zhang et al. 2018; Paziewski et al. 2021). As a result, GNSS observations of smartphones are substantially noisier than those of geodetic-grade receivers, and rather than the satellite elevation angle, their observation noise is strongly correlated with C/N0 values (Håkansson 2019; Paziewski et al. 2019; Zangenehnejad and Gao 2021; Liu et al. 2019). On the other hand, smartphone phase observations suffer from frequent interruptions because of abrupt phase drifts, missing phase observations, and duty cycling mode for some smartphone models (Li and Geng 2019; Geng and Li 2019; Paziewski et al. 2021).

Due to considerable discontinuities in carrier phase observations, code pseudorange observations still play a crucial role in smartphone-based positioning applications: They are commonly used in RTK and PPP methods, especially to compensate for inconsistencies in phase observations (Wang et al. 2023; Cheng et al. 2023; Tao et al. 2023; Li et al. 2023). Very recently, Yi et al. (2024) have used an enhanced PPP method that also includes the satellites that have pseudorange-only observations in addition to the ones with pseudorange and carrier phase observations for smartphone positioning and demonstrated an improvement of the overall RMS (root mean square) statistics by 46% compared to the traditional PPP method. On the other hand, studies concentrating on stochastic models have suggested that it is more convenient to use C/N0-dependent weighting schemes due to the low correlation between smartphone observation noise and satellite elevation angle (Liu et al. 2019; Wanninger and Heßelbarth 2020; Gao et al. 2021; Yuan et al. 2022; Bahadur 2022). These studies are mainly limited to the most common models used for comparing the C/N0-dependent and elevation-dependent weighting schemes, not proposing any special approach for smartphone observations. Sui et al. (2022) have proposed a stochastic model optimized for smartphone observations and showed that the positioning performance of SPP (single point positioning) and RTK methods can be improved between 10% and 40%, considering three-dimensional RMS errors. Zangenehnejad and Gao (2023) have presented the C/N0/elevation-based model for smartphone observations depending on the LS-VCE (least-square variance component estimation) method and showed an improvement of 25.1% in PPP solution, considering horizontal RMS errors. Still, these studies do not consider all GNSS constellations in their proposed stochastic models and the impact of outlier and incorrectly weighted observations.

A proper stochastic model that can represent the stochastic properties of their observations is mandatory to obtain the utmost positioning performance with smartphones. Therefore, this study proposes a sound stochastic approach for code pseudorange observations from Android smartphones. The corresponding approach adopts a weighting scheme that depends on C/N0 values with different coefficients estimated for GPS, GLONASS, Galileo, BeiDou-2, and BeiDou-3 constellations, separately. Also, a robust Kalman filter method based on the IGG III (Institute of Geodesy and Geophysics) function is employed in this approach to compensate for the effects of outliers and mis-weighted observations. Finally, the real-time standalone positioning method with smartphone observations collected in the static and kinematic environments is applied in this study to evaluate the positioning performance of the proposed approach.

The remainder of the paper is divided into the following sections: the methodology applied in this study to build a realistic stochastic approach for smartphone code observations, the observation noise assessment including evaluation of variance functions, the positioning performance evaluation for the proposed stochastic model in static and kinematic environments, and the summary and conclusions of this study.

Methodology

This section provides the detailed methodology applied in this study to build a sound stochastic approach for smartphone code observations. The section first introduces code-minus-phase (CMP) observations used to analyze the stochastic properties of smartphone code observations. Afterward, it explains three variance models utilized to represent characteristics of smartphone observations based on satellite elevation angle and signal C/N0 value. Finally, the section provides a robust Kalman filter method adopted in this study to compensate for the impact of outlier and incorrectly weighted observations.

Code-minus-phase (CMP) observation

The code pseudorange (\(P\)) and carrier phase (\(L\)) observations are given in meters by the following equations:

$$\begin{aligned}{P}_{i,r}^{s,j}&={\rho }_{r}^{s,j}+c\left({dt}_{r}^{s}-{dt}^{s,j}\right)+{T}_{r}^{s,j}+{I}_{i,r}^{s,j}\\ &+c\left({b}_{i,r}^{s}-{b}_{i}^{s,j}\right)+\varepsilon \left({P}_{i,r}^{s,j}\right)\end{aligned}$$
(1)
$$\begin{aligned}{L}_{i,r}^{s,j}&={\rho }_{r}^{s,j}+c\left({dt}_{r}^{s}-{dt}^{s,j}\right)+{T}_{r}^{s,j}-{I}_{i,r}^{s,j} \\ &+c\left({B}_{i,r}^{s}-{B}_{i}^{s,j}\right)+{\lambda }_{i}^{s}{N}_{i,r}^{s,j}+\varepsilon \left({L}_{i,r}^{s,j}\right)\end{aligned}$$
(2)

where subscripts \(i\) and \(r\) represent the frequency and receiver, respectively. Herein, superscripts \(s\) and \(j\) indicate the constellation index and satellite number, respectively. Also, \({\rho }_{r}^{s,j}\) is the geometric distance from the satellite to receiver in meters, \(c\) is the velocity of light in vacuum (\(m{s}^{-1}\)), \({dt}_{r}^{s}\) and \({dt}^{s,j}\) are the receiver and satellite clock offsets in seconds, \({T}_{r}^{s,j}\) is the tropospheric delay in meters, \({I}_{i,r}^{s,j}\) is the first-order ionospheric delay on the \(i\)th frequency in meters, \({b}_{i,r}^{s}\) and \({b}_{i}^{s,j}\) are the receiver and satellite code hardware biases on the \(i\)th frequency in seconds, \({B}_{i,r}^{s}\) and \({B}_{i}^{s,j}\) are the receiver and satellite phase hardware biases on the \(i\)th frequency in seconds, \({\lambda }_{i}^{s}\) is the wavelength of the corresponding GNSS signal in meters, \({N}_{i,r}^{s,j}\) is the integer ambiguity parameter in cycles and \(\varepsilon\) represents the observation noise and multipath for the related observation. The code-minus-phase observation (CMP) can be formed as follows:

$$\begin{aligned} {CMP}_{i,r}^{s,j}&= {P}_{i,r}^{s,j}-{L}_{i,r}^{s,j}={2 I}_{i,r}^{s,j}+c\left({b}_{i,r}^{s}-{b}_{i}^{s,j}\right)\\ &-c\left({B}_{i,r}^{s}-{B}_{i}^{s,j}\right)-{\lambda }_{i}^{s}{N}_{i,r}^{s,j}+\varepsilon \left({CMP}_{i,r}^{s,j}\right)\end{aligned}$$
(3)

This observation eliminates the geometry-dependent terms, including the receiver and satellite clock offsets, tropospheric delay, and geometric distance. However, it still includes twice the ionospheric delay, code and phase hardware biases, multipath effect, and observation noise. As the observation noise and multipath effect for phase observations are substantially lower than those of code observations, their effects can be neglected in the CMP observation. The slowly changing terms in the CMP observation, i.e., the constant ambiguities, hardware biases, low-frequency ionospheric delay, and multipath, can be removed by fitting a low-order polynomial \(p\left(t\right)\) over 120 s and subtracting it from the CMP observation (de Bakker et al. 2012). After a low-order polynomial fitting, the CMP observation contains the code observation noise in addition to the high-frequency ionospheric delay and multipath effect. For the CMP observation, the expectation and dispersion can be approximated by:

$$E\left\{{CMP}_{i,r}^{s,j}-p\left(t\right)\right\}\approx 2d{I}_{i,r}^{s,j}+d{MP}_{i,r}^{s,j}$$
(4)
$$D\left\{{CMP}_{i,r}^{s,j}-p\left(t\right)\right\}\approx {\sigma }_{C}^{2}$$
(5)

where \(d{I}_{i,r}^{s,j}\) and \(dMP_{i,r}^{s,j}\) represent the high-frequency ionospheric delay and multipath, respectively. Also, \({\sigma }_{C}\) is the standard deviation of the code observation noise and is directly connected to the \(\varepsilon \left({P}_{i,r}^{s,j}\right)\) given in Eq. (1).

Variance models

Traditionally, variance models depending on the satellite elevation angle are often used to describe the noise of code observations since the noise level is correlated with the elevation angle for geodetic-grade receiver-antenna-combination. This study adopts the cosec function, for GNSS applications one of the most common models, to determine observation weights based on the satellite elevation angle:

$${\sigma }_{C}^{2}={a}^{2}/{sin}^{2}E$$
(6)

where \(a\) is the empirical coefficient generally selected as 0.3 m and 3.0 m for P- or C/A code observations obtained from geodetic-grade receivers and \(E\) is the satellite elevation angle.

For geodetic equipment, the C/N0 is implicitly elevation-dependent since values are dominated by the antenna gain. So, the noise of code observations can be assessed with a C/N0 dependent variance function (Langley 1996) which is linked to the noise of the receiver’s delay lock loop. This function is also adequate for GNSS observations whose noise level is correlated with C/N0 values rather than the elevation angle, like smartphone observations. The C/N0 dependent variance function is given by:

$${\sigma }_{C}^{2}=\left[\left(\alpha { B}_{L}\right)/c{n}_{0}\right] \left[1+2/\left(T c{n}_{0}\right)\right] {\lambda }_{C}^{2}$$
(7)

where \(\alpha\) and \({B}_{L}\) are the dimensionless delay lock loop discriminator correlator factor and equivalent code loop noise bandwidth, which can be approximated as 0.5 Hz and 0.8 Hz, also, \(c{n}_{0}\) represents the linear carrier-to-noise density calculated as \({10}^{(C/N0)/10}\) for C/N0 given in dB-Hz, \(T\) is the predetection integration time in seconds, which is typically smaller than 0.02 s, and \({\lambda }_{C}\) is the wavelength of P- or C/A-code (29.305 and 293.05 m) (Langley 1996).

Finally, the SIGMA-ɛ variance model introduced by Hartinger and Brunner (1999) can be employed to specify the noise of code observations based on C/N0 values. This study adopts the modified version of this model (de Bakker et al. 2009); we consider a lower C/N0 reference value of 40 dB-Hz because C/N0 values obtained from smartphones are considerably lower compared to geodetic-grade receivers. The modified version of the SIGMA-ɛ variance model can be written by:

$${\sigma }_{C}^{2}={C}^{2}\cdot {10}^{-(C/N0-40)/20}$$
(8)

where \(C\) is the variance factor which has to be estimated for specific frequencies and constellations. Figure 1 shows the value change of the SIGMA-ɛ variance function for a set of C/N0 data ranging from 10 to 60 dB-Hz in cases where reference values are selected as 40 and 45 dB-Hz, respectively. Herein, the figure shows that the function value is equal to 1 for C/N0 values of 40 and 45 dB-Hz for the respective reference values. Therefore, the reference value is usually selected very close to the average of C/N0 values for an observation dataset. When the reference value of 45 dB-Hz is selected, relatively higher function values are computed for low C/N0 values. As lower C/N0 values are acquired from smartphones, compared to geodetic-grade receivers, a C/N0 reference value of 40 dB-Hz is selected in this study to represent the smartphone observations better for the SIGMA-ɛ model.

Fig. 1
figure 1

Value changes of the SIGMA-ɛ variance function between 10 and 60 dB-Hz when 40 and 45 dB-Hz reference values are used

Robust Kalman filter

The main difference between robust and standard Kalman filters is the use of an equivalent covariance matrix rather than the original covariance matrix for observations. The equivalent covariance matrix makes the filter more resistant to the negative impacts of dynamic system errors and outliers. Depending on the equivalent covariance matrix (\(\overline{\varvec{R}}_{k}\)), the Kalman gain (\(\overline{\varvec{K}}_{k}\)) at the epoch of \(k\) can be computed for the robust Kalman filter as follows:

$${\stackrel{-}{\varvec{K}}}_{k}={\varvec{P}}_{{\stackrel{-}{\varvec{x}}}_{\varvec{k}}}{\varvec{H}}_{k}^{T}{({\varvec{H}}_{k}{\varvec{P}}_{{\stackrel{-}{\varvec{x}}}_{k}}{\varvec{H}}_{k}^{T}+{\stackrel{-}{\varvec{R}}}_{k})}^{-1}$$
(9)

where \({\varvec{P}}_{{\stackrel{-}{\varvec{x}}}_{\varvec{k}}}\) is the covariance matrix for the predicted state vector and \({\varvec{H}}_{k}\) is the design matrix. Herein, observation variances are realigned in the equivalent covariance matrix by means of a robust function (Yang et al. 2001). This study employs the IGG III function, one of the most popular functions used in GNSS applications, to design the equivalent covariance matrix.

Based on the IGG III function (Yang et al. 2002), standardized residuals for the related observation can be calculated by the following equation:

$${\stackrel{\sim}{v}}_{k}={v}_{k}/\sqrt{{\widehat{\sigma }}_{0}^{2}{Q}_{{v}_{k}}}$$
(10)

where \({v}_{k}\) denotes the observation residual, \({Q}_{{v}_{k}}\) is the variance of the observation residual, and \({\widehat{\sigma }}_{0}^{2}\) indicates the estimate of unit weight variance. It can be computed by \({\widehat{\sigma }}_{0}^{2}={(\varepsilon }^{T}{Q}_{\varepsilon }^{-1}\varepsilon )/n,\) where \(\varepsilon\;\text{and}\; {Q}_{\varepsilon }\) are the innovations (predicted residuals) and their covariance matrix, and \(n\) is the observation number. Depending on the standardized residuals (\({\stackrel{\sim}{v}}_{k}\)), the variance inflation factor can be computed for the related observation \(({\gamma }_{k})\) as follows:

$${\gamma }_{k}=\left\{\begin{array}{cc}1& \left|{\stackrel{\sim}{v}}_{k}\right|\le {c}_{0}\\ \frac{{c}_{0}}{\left|{\stackrel{\sim}{v}}_{k}\right|}{\left(\frac{{c}_{1}-\left|{\stackrel{\sim}{v}}_{k}\right|}{{c}_{1}-{c}_{0}}\right)}^{2}& {c}_{0}<\left|{\stackrel{\sim}{v}}_{k}\right|\\ {10}^{-5}& \left|{\stackrel{\sim}{v}}_{k}\right|>{c}_{1}\end{array}\right.\le {c}_{1}$$
(11)

where \({c}_{0}\) and \({c}_{1}\) are two thresholds, typically chosen as \({c}_{0}=1.0\sim2.5\) and \({c}_{1}=3.0\sim8.0\). Finally, the equivalent covariance matrix can be formed by:

$${\stackrel{-}{R}}_{k}={R}_{k}/{\gamma }_{k}$$
(12)

where \({\stackrel{-}{R}}_{k}\) and \({R}_{k}\) represent the original and equivalent covariance matrices for observations, respectively.

In the conventional application of the IGG III function, the variance inflation factor is computed for each observation to shape the equivalent covariance matrix. Alternatively, Guo and Zhang (2014) followed an iterative procedure applying the IGG III function for the observation with the largest standardized residual in each iteration. The main reason for the use of this iterative procedure is the avoidance of filter divergence and a reduction in the contribution of the normal observations (Bahadur and Nohutcu 2021). Therefore, this iterative procedure is adopted in this study to conserve the original distributional properties of the observations.

Observation noise assessment

This section presents the detailed analysis conducted for assessing the observation noise of smartphones. Before the noise assessment, the section describes the observation dataset used in this study.

Data collection

In this study, the observation data collected at the HiTeC building roof of Leibniz University Hannover on October 25, 2019, is utilized for the observation noise assessment. The dataset includes GPS, GLONASS, Galileo, BeiDou-2, and BeiDou-3 observations with a 1-second sampling interval from a ** Functions 3 and Global Pressure and Temperature 3 (Landskron and Böhm 2018). Also, the ionospheric delay is mitigated with the daily predicted Global Ionosphere Map (GIM) generated by the CODE (Centre for Orbit Determination in Europe). In the filtering process, in addition to three positioning components, a separate receiver clock offset is defined for each navigation system, including BeiDou-2 and BeiDou-3, and they are estimated as the random walk process with a spectral density of \({10}^{3}\,m/\sqrt{s}ec\). Similarly, the random walk process with a spectral density of \(10\, cm/\sqrt{s}ec\)is used to estimate the positioning components, respectively.

Positioning solutions are conducted using an advanced version of PPPH software (Bahadur and Nohutcu 2018) under six separate scenarios to understand the impact of different variance functions with and without the robust Kalman filter method adopted in this study. So, the standard Kalman filter and robust Kalman filter methods are used with three variance functions explained previously. The standard Kalman filter employs the original covariance matrix for observations with a conventional outlier detection method. This method conventionally relies on the median absolute deviation check based on the innovations (a priori residuals). To be more specific, 852 observations are removed as they are labeled as outliers in the standard Kalman filter, which means 0.5% of the total observations, equal to 153,294, are excluded in the filtering process. Therefore, the influence of outlier observations is eliminated by this conventional method in the standard Kalman filter. The observation dataset has been processed under six separate scenarios. The positioning errors have been computed for each epoch as the difference between coordinates obtained from the related process and reference coordinates in the local coordinate system, including north, east, and up directions. Figure 8 indicates the positioning errors computed in the north, east, and up directions for the elevation-dependent, C/N0-dependent, and SIGMA-ɛ variance models with the standard Kalman filter. It can be observed that the SIGMA-ɛ variance model significantly improves the positioning accuracy in all directions. It can also be said that the positioning errors obtained from the C/N0-dependent model are relatively lower than those of the elevation-dependent model.

Fig. 8
figure 8

Positioning errors in north, east, and up directions for three variance functions with the standard Kalman filter in the static experiment

Similarly, Fig. 9 depicts the positioning errors calculated in the north, east, and up directions for three variance models with the robust Kalman filter. It is clear from the figure that the positioning accuracy is improved for all variance models when the robust Kalman filter method is employed. From these results, it can be said that the robust Kalman filter is more successful in compensating for the negative impacts of outliers and incorrectly weighted observations compared to the standard Kalman filter. Also, the SIGMA-ɛ variance model presents higher positioning accuracy when compared to other variance models.

Fig. 9
figure 9

Positioning errors in north, east, and up directions for three variance functions with the robust Kalman filter in the static experiment

Table 3 presents RMS errors computed for horizontal, vertical, and three-dimensional (3D) positioning components using different processing scenarios in the static experiment. Herein, horizontal positioning errors are calculated as the norm of the north and east components. Also, all epochs where position estimates exist are considered in the RMS error computation. These results demonstrate that the elevation-dependent variance function presents the worst positioning accuracy for the standard and robust Kalman filter solutions. In the standard Kalman filter, the SIGMA-ɛ model improves the positioning accuracy of the C/N0-dependent model by 20.3%, 22.3%, and 21.4% for horizontal, vertical, and 3D, respectively. These improvements are 22.1%, 15.6%, and 18.5% in the robust Kalman filter. Considering that many studies in the literature usually adopt the C/N0-dependent model without any robust statistical approach, the C/N0-dependent model with the standard Kalman filter can be assumed as the typical stochastic approach for smartphone observations. From this point, the proposed stochastic approach that includes the SIGMA-ɛ model and robust Kalman filter augments the 3D positioning accuracy of the typical stochastic approach by 45.8%.

Table 3 RMS errors (in m) of horizontal, vertical, and 3D positioning components for six processing scenarios in the static experiment

Figure 10 presents the CDF (Cumulative Distribution Function) plots of 3D positioning errors computed for three variance models with the standard and robust Kalman filters in the static experiment. In the standard Kalman filter, expected 3D positioning errors in the 50th percentile are 5.44 m, 3.99 m, and 3.04 m for the elevation-dependent, C/N0-dependent, and SIGMA-ɛ models. As regards the robust Kalman filter, in the 50th percentile, expected 3D positioning errors are computed as 3.43 m, 2.66 m, and 2.23 m for the elevation-dependent, C/N0-dependent, and SIGMA-ɛ models. These results mean that the proposed stochastic approach provides the best positioning accuracy, and its improvement percentage equals 44.1% in comparison to the typical stochastic approach that contains the C/N0-dependent model with the standard Kalman filter.

Fig. 10
figure 10

Cumulative Distribution Function (CDF) plots of 3D positioning errors for three variance models with the standard (left) and robust (right) Kalman filters in the static experiment

Kinematic experiment

To test the proposed stochastic approach with the dataset collected in a realistic kinematic environment, the benchmark data released by the Android GPS team is utilized in this study (Fu et al. 2020). The main reason for selecting this dataset is that it includes observations collected from the **aomi Mi 8 smartphone and has highly reliable reference coordinates for each observation epoch. The reference coordinates provided with the observation dataset were obtained from an external system containing the RTK positioning and NovAtel SPAN Inertial Measurement Unit system. The observation dataset was collected from the **aomi Mi 8 smartphone placed above the dashboard of a test vehicle moving along a highway around the US Los Angeles North Hills on December 8, 2021 (Fig. 11). The dataset includes observations of GPS, GLONASS, Galileo, BeiDou-2, and BeiDou-3 satellites with a sampling interval of 1 s. More details about the benchmark dataset can be found in Fu et al. (2020). For this dataset, the average numbers of available GPS, GLONASS, Galileo, BeiDou-2, and BeiDou-3 satellites on their first frequencies are 8.06, 5.55, 3.72, 1.98, and 4.94, respectively.

Fig. 11
figure 11

Experimental setup used for the observation collection in the test vehicle (Fu et al. 2020)

Like the static experiment, the observation dataset was processed under six different scenarios, including three separate variance functions with the standard and robust Kalman filters. The same processing strategies applied in the previous experiment were adopted in positioning solutions. All noise properties were taken identically to what has been determined in the static experiment, excluding that a greater spectral density of \(1\, m/\sqrt{s}ec\)is used to estimate the positioning components in the kinematic process. The positioning errors were calculated as the coordinate difference between the related solution and ground truth provided with the dataset. Figures 12 and 13 depict positioning errors calculated in the north, east, and up directions for three variance functions with the standard and robust Kalman filter, respectively. These figures also include a plot showing the satellite visibility during the experiment. It is clear in the figures that the positioning accuracy of the kinematic experiment is relatively lower than that of the static experiment for all components. It can be observed that there exist some jumps in the positioning errors that mainly resulted from the unexpected decrease in visible satellite numbers due to objects blocking visibility, such as bridges, large buildings, etc. It can also be observed that their impacts are minimized by using the robust Kalman filter. From the figures, it is obvious that the SIGMA-ɛ model substantially augments the positioning accuracy for the standard and robust Kalman filter solutions.

Fig. 12
figure 12

Positioning errors in north, east, and up directions for three variance functions with the standard Kalman filter in the kinematic experiment

Fig. 13
figure 13

Positioning errors in north, east, and up directions for three variance functions with the robust Kalman filter in the kinematic experiment

Table 4 provides RMS errors computed for the horizontal, vertical, and 3D positioning components under six different processing scenarios. Herein, to further analyze the results, in addition to the whole observation duration, RMS errors are also computed for four periods obtained by dividing it into equal segments whose duration is nearly equal to 6 min. The table presents the corresponding period numbers in which RMS errors are computed, while RMS errors computed for the whole observation duration are presented as the ALL in the table. Compared to the static experiment, it is obvious that lower positioning accuracy can be obtained from the kinematic experiment for all processing scenarios. From the results, it can be said that the highest positioning errors are acquired from the elevation-dependent model for all periods. The positioning accuracy can be improved with the SIGMA-ɛ model considerably for both filtering solutions. For the standard Kalman filter solution, the SIGMA-ɛ model provides considerably better 3D positioning accuracy in all periods, excluding the fourth period where the C/N0-dependent model has the lowest positioning error. Regarding the robust Kalman filter solution, the best 3D positioning accuracy is obtained from the SIGMA-ɛ model in all periods. These results demonstrate that the SIGMA-ɛ model augments the positioning accuracy throughout the entire observation period. Compared to the C/N0-dependent model in the standard Kalman filter, the SIGMA-ɛ model improves horizontal, vertical, and 3D positioning accuracies by 26.3%, 2.1%, and 10.2%, respectively; while these numbers are equal to 13.0%, 10.8%, and 11.4% for the robust Kalman filter. Also, the 3D positioning accuracy of the typical stochastic approach is augmented by 26.6% with the proposed stochastic approach including the SIGMA-ɛ model and robust Kalman filter.

Table 4 RMS errors (in m) of horizontal, vertical, and 3D positioning components computed for six processing scenarios in the kinematic experiment considering four 6-minute periods as well as the whole duration

Finally, Fig. 14 shows the CDF plots of 3D positioning errors computed in the static experiment for three variance models with the standard and robust Kalman filters. Considering the standard Kalman filter, expected 3D errors in the 50th percentile are computed as 5.81 m, 4.41 m, and 3.52 m for the elevation-dependent, C/N0-dependent, and SIGMA-ɛ models. In the robust Kalman filter, expected 3D errors in the 50th percentile are 4.86 m, 3.82 m, and 3.36 m for the elevation-dependent, C/N0-dependent, and SIGMA-ɛ models. These results indicate that considerably improved positioning accuracy can be acquired from the stochastic approach that augments the 3D positioning accuracy of the typical stochastic approach by 26.5%.

Fig. 14
figure 14

Cumulative Distribution Function (CDF) plots of 3D positioning errors for three variance models with the standard (left) and robust (right) Kalman filters in the kinematic experiment

Summary and conclusions

Using collected data from **aomi Mi 8 smartphones, the results of this study show that using C/N0-dependent weighting methods is more appropriate for representing the actual stochastic characteristics of smartphone observations instead of elevation-dependent weighting methods. As the noise characteristics of observations obtained from different constellations alter substantially, it is required to consider these differences to build a realistic stochastic model for smartphone observations. Assuming a normal distribution, the results indicate that the SIGMA-ɛ model, which includes different coefficients for each constellation, can stochastically represent more than 95% of smartphone observations. On the other side, the results also highlight that there are still a number of observations that cannot be correctly modeled regardless of the applied variance model. Therefore, a realistic stochastic model should contain a statistically robust approach to compensate for the negative impact of outliers and incorrectly weighted observations.

Concerning positioning performance, the results show that the proposed stochastic approach can provide better positioning accuracy than the conventional approaches. Compared to the typical stochastic approach that contains the C/N0-dependent model and standard Kalman filter, the proposed stochastic approach improves horizontal, vertical, and 3D positioning accuracies by 47.3%, 44.5%, and 45.8% in the static experiment, respectively. Similarly, horizontal, vertical, and 3D positioning accuracies of the typical stochastic approach are augmented by 33.5%, 22.9%, and 26.6% using the proposed stochastic approach in the kinematic experiment. 50% of the 3D positioning errors of the proposed stochastic approach are below 3.04 m and 3.36 m for the static and kinematic experiments, respectively.

These results conclude that the proposed stochastic approach can successfully represent the stochastic properties of code observations from Android smartphones and provide improved positioning accuracy compared to the conventional approaches. This study is limited to the use of the proposed stochastic approach with the **aomi Mi 8 smartphone, and future works should focus on its application with different smartphones. Also, the employment of the proposed stochastic model in other positioning methods, such as PPP and RTK, will be studied in future works.