Comparison of Two Approaches to GNSS Positioning Using Code Pseudoranges Generated by Smartphone Device

The release of Android 7.0 has made raw GNSS positioning data available on smartphones and, as a result, this has allowed many experiments to be developed to evaluate the quality of GNSS positioning using mobile devices. This paper investigates the best positioning, using pseudorange measurement in the Differential Global Navigation Satellite System (DGNSS) and Single Point Positioning (SPP), obtained by smartphones. The experimental results show that SPP can be comparable to the DGNSS solution and can generally achieve an accuracy of one meter in planimetric positioning; in some conditions, an accuracy of less than one meter was achieved in the Easting coordinate. As far as altimetric positioning is concerned, it has been demonstrated that DGNSS is largely preferable to SPP. The aim of the research is to introduce a statistical method to evaluate the accuracy and precision of smartphone positioning that can be applied to any device since it is based only on the pseudoranges of the code. In order to improve the accuracy of positioning from mobile devices, two methods (Tukey and K-means) were used and applied, as they can detect and eliminate outliers in the data. Finally, the paper shows a case study on how the implementation of SPP on GIS applications for smartphones could improve citizen science experiments.


Introduction
In 2016, Google made accessible the GNSS raw measurements of smartphones and tablets running Android 7.0. As reported by the European GNSS Agency [1], the access to GNSS raw measurements has allowed researchers to conduct several studies for increasing the performance of commercial GNSS mounted on smartphones and tablets, mainly through post-processing techniques of measurement.
Dabove et al. [2] showed the potential applications offered by using raw smartphone measurements in fields where precision positioning is not required. In fact, the authors described a number of applications, including commercial product detection, search and rescue for public protection, intelligent transportation systems, healthcare, environmental monitoring, etc.
Gioia and Borio [3] stated that the possibility to develop new algorithms for navigation and the possibility to perform post processing from raw data coming from GNSS mobile devices orient the research on these topics. In fact, in the last 4 years, about 1900 papers have been published in this field; on the one hand, research has addressed issues related to the development of algorithms to improve positioning (static or kinematic) and, on the other hand, it has attempted to correct the initial ambiguities of the carrier phase in order to improve the precision and accuracy of positioning. An example of algorithms to improve positioning is provided by Zhang et al. [4], who applied a time difference filter in GNSS kinematic positioning. The latter algorithm is divided into several steps. In the first step, the GNSS measurement error is estimated through the signal-to-noise-ratio (SNR) values. Subsequently, a single-point positioning (SPP) algorithm, a single-point velocity 2 of 21 determination (SPV) algorithm and a time-differentiated phase measurement technique (TDCP) are applied to accurately estimate the GNSS system velocity. Finally, the receiver position is determined through the use of the Kalman filter.
Zhang et al. [5] and Liu et al. [6] tried to improve the algorithm by proposing a method for pedestrian positioning. The results in kinematic positioning show an RMS value of 3 m in horizontal positioning and about 5 m in vertical positioning; the authors claim that these values are those provided by commercial Android devices capable of acquiring continuous, smooth and reliable solutions. Zhang et al. [5]  In the context of research related to the correction of initial ambiguities in order to improve the accuracy and precision of positioning, an interesting study is that of Realini et al. [8], who demonstrated that with intelligent devices such as the Nexus 9, it is possible to achieve positioning of decimetre accuracy with 15 min static-rapid surveys and a baseline of about 8 km, without fixing the ambiguity of the carrier phase observations.
Dabove et al. [9] compared the performance of a Huawei P10 + and an Ublox NEO M8T. In this case, the experimentation was conducted considering two different sites for the collection of the measurements and three different observation times (10,30 and 60 min). The positioning modalities considered were static, kinematic and Single Point Position, and all results were obtained by fixing the ambiguities with the "Fix and Hold" method.
Wanninger and Heßelbarth [10] discussed the quality of positioning, using a Huawei P30 (dual-frequency smartphone). In particular, the authors acquired several GNSS static survey sessions of 6-12 h for a total of about 80 h. The places chosen to acquire the experimentation, a roof and an open field, were all free from obstacles and elements capable of generating multipath effects. The Huawei P30 phase ambiguities could be corrected only for the observations in the GPS L1 carrier phase. The authors subdivided the observation data into sessions of shorter duration, 280 sessions of 5 min or 23 sessions of 60 min. After correcting the ambiguities, the errors in three-dimensional positioning (standard deviation) were approximately 0.04 m for the 5 min observations and 0.02 m for the 60 min observations; for observations lasting only a few minutes, ambiguity correction failed due to poor signal quality.
Gogoi et al. [11], through comparative experiments conducted on different smart devices, both in an outdoor environment and in an anechoic chamber, showed that it is possible to improve the GNSS measurements of Android devices by increasing the stability of the C/N0 signal-to-noise ratio and reducing the noise in pseudorange measurements. Furthermore, the authors point out how low-cost hardware components can influence the positioning errors of GNSS systems for smartphones. For example, Li and Geng [12] found that the C/N0 of a smart device is 10 dB-Hz lower than that of a low-cost geodetic receiver characterised by rapid changes at high altitudes. The authors state that the smartphone GNSS receiver antenna was unable to mitigate the effects of multipath and had a nonuniform gain pattern: this was evidenced by replacing the device antenna with an external 1.
For analysis of post-processing of GNSS data, we used RTK in the RTKPOST GUI application of RTKLIB. Through the RTKPOST, it is possible to upload RINEX files of observation and navigation data. In particular, RTKPOST inputs the standard RINEX 2.10 or 2.11 observation data and navigation message files (GPS, GLONASS, Galileo, QZSS and SBAS) and can compute the positioning solutions through carrier-based relative positioning. It is also possible to choose different positioning modes including single-point, DGPS/DGNSS, kinematic, static, PPP-kinematic and PPP-static.
CSRS-PPP is a web service (https://www.nrcan.gc.ca/maps-tools-publications/maps/ tools-applications/10925, accessed on 3 May 2021) (web app) offered by Canadian Geodetic Survey of Natural Resources Canada (NRCan), active since October 2003 [19]. The application allows users from all over the world to perform Precise Point Positioning by submitting the RINEX file of the observables produced by their own single-or dual-frequency receiver. Through a graphical interface, the users can choose the processing mode (static or kinematic), the reference frame of the output coordinates (NAD83 or ITRF14), and insert the Ocean Tidal Loading file (OTL). The results, once processed, are sent directly to the users via e-mail.
CSRS-PPP, in processing the data, uses the best ephemerides available at that time: 1. Ultra-fast (±15 cm), available every 90 min; 2.
Finals (±2 cm), available 13-15 days after the end of the week.
Version 3 of the CSRS-PPP can achieve millimetre-level accuracies for long observations (24+ hours) in static mode. Accuracies of a few centimetres can be typically achieved with a 1 h observation [20].

Materials
The data acquisition was carried out using the three smartphones mentioned earlier.
The main features of these smartphones are summarised in Table 1.
The TARA permanent GNSS station was chosen as a master receiver to perform the static differential positioning. TARA is part of the HxGN Continuously Operating Reference Stations (CORS) [21,22]. This station is equipped with a LEICA GR30 receiver and a LEIAS10 antenna and is capable of making multi-frequency and multi-constellation observations (GPS, GLONASS, Galileo and BeiDou).

Data Collection
Data were collected in the static way over several days on the roof of the Polytechnic of Bari in the headquarters of Taranto, in South Italy (Figure 1a). The location on the roof of the building allowed observations to be made in open sky conditions. For data collection, the smartphones were positioned in the old vertex of a permanent GNSS network called FATA [23] (Figure 1b). Therefore, the FATA point is a place of known coordinates, stable and free of any external electromagnetic disturbances, as it has been monitored for several years.

Data Collection
Data were collected in the static way over several days on the roof of the Polytechnic of Bari in the headquarters of Taranto, in South Italy (Figure 1a). The location on the roof of the building allowed observations to be made in open sky conditions. For data collection, the smartphones were positioned in the old vertex of a permanent GNSS network called FATA [23] (Figure 1b). Therefore, the FATA point is a place of known coordinates, stable and free of any external electromagnetic disturbances, as it has been monitored for several years.

Data Collection
Data were collected in the static way over several days on the roof of the Polytechnic of Bari in the headquarters of Taranto, in South Italy (Figure 1a). The location on the roof of the building allowed observations to be made in open sky conditions. For data collection, the smartphones were positioned in the old vertex of a permanent GNSS network called FATA [23] (Figure 1b). Therefore, the FATA point is a place of known coordinates, stable and free of any external electromagnetic disturbances, as it has been monitored for several years.

Data Collection
Data were collected in the static way over several days on the roof of the Polytechnic of Bari in the headquarters of Taranto, in South Italy (Figure 1a). The location on the roof of the building allowed observations to be made in open sky conditions. For data collection, the smartphones were positioned in the old vertex of a permanent GNSS network called FATA [23] (Figure 1b). Therefore, the FATA point is a place of known coordinates, stable and free of any external electromagnetic disturbances, as it has been monitored for several years.

Data Collection
Data were collected in the static way over several days on the roof of the Polytechnic of Bari in the headquarters of Taranto, in South Italy (Figure 1a). The location on the roof of the building allowed observations to be made in open sky conditions. For data collection, the smartphones were positioned in the old vertex of a permanent GNSS network called FATA [23] (Figure 1b). Therefore, the FATA point is a place of known coordinates, stable and free of any external electromagnetic disturbances, as it has been monitored for several years.  The GNSS antenna of the smartphone is located in its upper left corner, as can be deduced from the manufacturer's data sheet. For this reason, it was decided to position the smartphone in such a way as to obtain better acquisition of satellite data. The antenna of the permanent TARA GNSS station (described in Section 3.1) is located about 22 m (baseline) from the FATA station where the smartphone is positioned. The coordinates of the TARA and FATA stations are reported in Table 2.

Data Processing
The data were acquired on different days in order to obtain more datasets in different satellite configurations. The first dataset consists of the observations obtained in the first 5 min of each hour of observation; the second dataset consists of the first 10 min of each hour; the third dataset consists of the first 15 min of each hour; the fourth dataset consists of the first 30 min,; and the fifth dataset consists of 60 min of complete observation.
Each observation was processed with RTKPOST and CSRS-PPP. Static differential positioning with pseudorange measurements was performed by RTKPOST, using the permanent TARA GNSS station as a reference (base). CSRS-PPP was used to perform Single Point Positioning. The SPP was performed on single-frequency code observations and the data were mainly processed with a rapid ephemeris; the final ephemeris was used, if available. At the end of all processing, for each observation, the coordinates were obtained of the positioning of Xiaomi Mi 10 in Eastings (E Xiaomi MI10,i ) and Northing (N Xiaomi MI10,i ) in the WGS84-UTM system, and the ellipsoidal height Up (U Xiaomi MI10,i ) with their respective standard deviations (SDE Xiaomi MI10,i , SDN Xiaomi MI10,i and SDU Xiaomi MI10,i ). Following, the sub-datasets are shown for 5, 10, 15, 30 and 60 min: Considering, as reference, the coordinates of the FATA (E FATA , N FATA , and U FATA ), the positioning errors ∆E i , ∆N i , ∆U i of the Xiaomi Mi 10 were calculated with the following formulas: The sub-datasets created, ∆E, ∆N, ∆U, take the following form: where: • i = 1, . . . , n; • n is equal to the number of observations for 5, 10, 15, 30 and 60 min: n = 9 for the 5, 10 and 15 min datasets; n = 7 for the 30 and 60 min datasets.
Considering the positioning in DGNSS and SPP for each observation time, it is possible to create ten databases consisting of the sub-datasets: E, N, U, SDE, SDN, SDU, ∆E, ∆N, ∆U, as follows: For each sub-dataset ∆E, ∆N, ∆U, a normality test of Shapiro-Wilk can be conducted, using the following formula [24]: where: . . , m n are expected values of the ranks of a standardised random number; • V is the matrix of the covariance of ranks.
Through RStudio software, the Shapiro-Wilk test can be easily performed, analysing the returns of the W and p values. The test aims to verify the following hypotheses: • H0: Distribution of the dataset normal; • H1: Distribution of the dataset not normal.
In establishing a threshold value equal to 0.05, the following occur: • If the p-value > 0.05, the null hypothesis H0 is accepted; • If the p-value < 0.05, the null hypothesis H0 is rejected.
According to the Shapiro-Wilks tests, the sub-datasets of ∆E, ∆N, ∆U for which normality is verified are represented by the normal distribution of Gauss: Then, the arithmetic means for the sub-datasets ∆E, ∆N, ∆U were calculated, taking into account all the x i values (∆E i , ∆N i , ∆U i ) included in them, using the following formula: To identify possible outliers in the sub-datasets, two methods were chosen. In the first method, the xi outliers of the sub-datasets ∆E, ∆N, ∆U were found and eliminated by applying the Tukey method [25][26][27].
Following the method, two fences, one lower and one upper, were identified: where: • Q 1 is the first quartile; In this way, it is possible to eliminate the x i values lower and higher than the two fences and, consequently, three new sub-datasets ∆E Mm , ∆N Mm , ∆U Mm are generated. Normality tests were performed using Equations (14) and (17).
In the second method, the possible outliers x i are identified by applying an unsupervised classification algorithm called K-means, imposing some exclusion conditions based on distance [28]. The concept is to consider as outliers the values farthest from the cluster centres.
The application of the K-means algorithm consists of the following steps [28,29]: 1.
Choice of the number of classes K (K = 2); 2.
Setting of a mean cluster centre C i (i = 1, 2) for elements x i of classes K; 3.
Assignment of the elements x i to one of the two classes C i respecting the following condition: 4. Calculation of the new cluster centres: 5.
If the clustering remains unchanged for two successive steps, it ends. Otherwise, it restarts from step 2.
After clustering, three exclusion conditions are imposed on the elements x i of the sub-datasets ∆E, ∆N, ∆U:

1.
If a cluster has a number of elements greater than 2, x i > 2, the element farthest from the cluster centre is deleted respecting the following condition: 2.
If a cluster has a number of elements equal to 2, no element is eliminated since both are equidistant from C i ; 3.
If a cluster consists of only one element, only that element is deleted from the subdataset.
If the sub-datasets consist of few values, it is possible to establish simple exclusion rules, while in the case of larger datasets, more elaborate exclusion rules can be imposed [28]. Using the method above, the elements x i , considered outliers, are eliminated, and three new sub-datasets ∆E Km , ∆N Km , ∆U Km can be created. Then, for each new sub-dataset we performed the normality test, using Equations (14) and (17).
The mean values for all data subsets (∆E, ∆N, ∆U, ∆E Mm , ∆N Mm , ∆U Mm and ∆E Km , ∆N Km , ∆U Km ) were tabulated, analysed and compared to each other to determine normal distributions, standard deviations and positioning errors.
Linear regressions were implemented to identify possible correlations between mean values and observation times.
Once the level of accuracy achieved by the smartphones is identified, it can be evaluated and tested by means of an application in the field of surveying.

Normality Test
This section is dedicated to evaluating the p-values and collecting in tables the subdatasets that have passed the normality test.  From the observation of Table 3, it is possible to notice that there is no relationship between the length of the observation time and the verification by the normality test for DGNSS positioning.

Evaluation of DGNSS and SPP Standard Deviation
In this section, the standard deviations of the sub-dataset ∆E, ∆N, ∆U are collected for the various observation times and evaluated through tables and, subsequently, by the application of the linear regression. In this way, it is possible to evaluate functional relationships between standard deviations and length of observation sessions. Table 5 summarises the standard deviations in relation to DGNSS session length positioning of the several sub-datasets. Figure 2 shows the behaviour of the standard deviation for ∆E, ∆N and ∆U sub-dataset of DGNSS positioning over time and the R 2 values for the related sub-datasets. sitioning of the several sub-datasets. Figure 2 shows the behaviour of the standard deviation for ΔE, ΔN and ΔU sub-dataset of DGNSS positioning over time and the R 2 values for the related sub-datasets. Observing Table 5 and Figure 2, it can be seen that there is a strong linear relationship between standard deviation DGNSS and observation time only for ΔE (R 2 = 0.71) [30].
In Appendix A ( Figures A1-A3), through the normal distributions, it is possible to evaluate the relationships between standard deviation and observation times.   Table 6 summarises the standard deviations for all observations in SPP. Figure 3 shows the behaviour of the standard deviation for ΔE, ΔN and ΔU sub-dataset of Single Point Positioning over the time and reports the R 2 values for the sub-datasets ΔE, ΔN and ΔU.
Regarding the SPP, unlike the DGNSS, it is possible to note a linear relationship between the standard deviations and observation times for all three sub-datasets. ΔE and ΔN have a strong relationship, with R 2 values equal to 0.92, 0.88, and ΔU demonstrates a moderate relationship, with an R 2 = 0.68 [30].
The relationships between standard deviations and observation times are shown in Appendix B (Figures B1-B3). Observing Table 5 and Figure 2, it can be seen that there is a strong linear relationship between standard deviation DGNSS and observation time only for ∆E (R 2 = 0.71) [30].
In Appendix A ( Figures A1-A3), through the normal distributions, it is possible to evaluate the relationships between standard deviation and observation times. Table 6 summarises the standard deviations for all observations in SPP. Figure 3 shows the behaviour of the standard deviation for ∆E, ∆N and ∆U sub-dataset of Single Point Positioning over the time and reports the R 2 values for the sub-datasets ∆E, ∆N and ∆U.
Regarding the SPP, unlike the DGNSS, it is possible to note a linear relationship between the standard deviations and observation times for all three sub-datasets. ∆E and ∆N have a strong relationship, with R 2 values equal to 0.92, 0.88, and ∆U demonstrates a moderate relationship, with an R 2 = 0.68 [30].
The relationships between standard deviations and observation times are shown in Appendix B (Figures A4-A6).

Evaluation of DGNSS Positioning Error
In this section, the possible functional relationships between positioning errors and observations session are evaluated through the verification of fitting of linear regressions.
Tables 7-9 report the means of DGNSS positioning errors in Easting, Northing, and Up, respectively. The means refer to the sub-datasets ΔE, ΔN, ΔU: the means obtained from the sub-datasets ΔEMm, ΔNMm, ΔUMm and the means of the sub-datasets ΔEKm, ΔNKm, ΔUKm. Again, the values of the means were not reported where the normality test was not verified.
From Tables 7-9, we can evaluate the DGNSS mean positioning error. In particular, the minor Easting error (ΔEMm = 1.471 m) was obtained at 15 min for the sub-dataset ΔEMm. This result suggests for ΔEMm non-dependency on the duration of observation times with the achievable error; in fact, it is possible to observe an error value of 1.875 m for an acquisition of 60 min.. This result is not consistent with what is expected in the GNSS measurements with topographic receivers. For the Easting coordinate, at 60 min, the greatest error was detected for ΔE and ΔEMm and the lowest error was equal to 1.698 m for ΔEKm.
For the North position, the lowest error was reached at 10 min for the subsets ΔN and ΔNMm and was equal to 2.016, but also, in this case, for the 60-min acquisition, the error did not decrease (ΔN and ΔNMm = 2.489 m).
The lowest positioning error in the Up coordinate was obtained for 15 min for ΔUMm and ΔUKm and was equal to 3.087 m, while at 60 min, the error was equal to 3.572 m for ΔUKm. This was also the minor Up error at 60 min between the three sub-datasets, while the greatest error at 60 min in Up was equal to 3.579 m for ΔUMm and ΔU.

Evaluation of DGNSS Positioning Error
In this section, the possible functional relationships between positioning errors and observations session are evaluated through the verification of fitting of linear regressions.
Tables 7-9 report the means of DGNSS positioning errors in Easting, Northing, and Up, respectively. The means refer to the sub-datasets ∆E, ∆N, ∆U: the means obtained from the sub-datasets ∆E Mm , ∆N Mm , ∆U Mm and the means of the sub-datasets ∆E Km , ∆N Km , ∆U Km . Again, the values of the means were not reported where the normality test was not verified. For the North position, the lowest error was reached at 10 min for the subsets ∆N and ∆N Mm and was equal to 2.016, but also, in this case, for the 60-min acquisition, the error did not decrease (∆N and ∆N Mm = 2.489 m).
The lowest positioning error in the Up coordinate was obtained for 15 min for ∆U Mm and ∆U Km and was equal to 3.087 m, while at 60 min, the error was equal to 3.572 m for ∆U Km . This was also the minor Up error at 60 min between the three sub-datasets, while the greatest error at 60 min in Up was equal to 3.579 m for ∆U Mm and ∆U.
Through the study of linear regressions between the means of all sub-datasets of the DGNSS positioning errors and the observation times, it is possible to note a general weak relationship with values of R 2 < 0.5, for the most part, of the sub-datasets. Only the sub-datasets ∆E and ∆E Km show a linear relationship between variables, with R 2 values equal to 0.64 (moderate relationship) and 0.85 (strong relationship), respectively ( Figure 4). 30 2.361 2.513 4.880 60 1.875 2.489 3.579 Through the study of linear regressions between the means of all sub-datasets of the DGNSS positioning errors and the observation times, it is possible to note a general weak relationship with values of R 2 < 0.5, for the most part, of the sub-datasets. Only the subdatasets ΔE and ΔEKm show a linear relationship between variables, with R 2 values equal to 0.64 (moderate relationship) and 0.85 (strong relationship), respectively ( Figure 4).

Evaluation of Single Point Positioning Error
The analysis of SPP in Easting, Northing and Up are summarised in the Tables 10-12.
In particular, the tables show the means referring to sub-datasets ∆E, ∆N, and ∆U: ∆E Mm , ∆N Mm , ∆U Mm and ∆E Km , ∆N Km , ∆U Km . In accordance with Table 4, the values of the means were not reported where the normality test was not verified. From Tables 10-12, it is possible to obtain information about the mean error for Single Point Positioning. For the Easting coordinate, at 60 min, the major error is equal to 0.706 m for the ∆E Km sub-dataset, while the minor one is equal to 0.439 m for ∆E Mm . For the Northing positioning at 60 min, the major error is committed for the ∆N sub-dataset and is equal to 2.509 m, while the minor Northing error is, instead, equal to 1.984 m for ∆N Mm and ∆N Km . At 60 min, the major positioning error Up is recorded for sub-databases, ∆U Mm and ∆U Km , and is equal to 5.916 m; the minor one is equal to 5.346 m for the sub-database ∆U.
By observing the R 2 values, it is possible to assess the functional relationships between the averages of the SPP errors (for each sub-dataset) and the acquisition time; in particular, linear regression was used for all sub-datasets.
Unlike DGNSS positioning, by observing the coefficient of determination R 2 , it is possible to note that for the SPP, there is generally a linear relationship between the observation times and positioning errors that is between moderate and strong.
For a more cautious assessment of the degree of relationship between variables, it is advisable to analyse the R 2 values for the sub-datasets according to the positionings of Easting, Northing and Up.
The sub-datasets for Easting, ∆E, ∆E Mn and ∆E Km , show the strongest and most consistent linear functional relationship between variables, with R 2 values equal to 0.94, 0.88 and 0.92. For Northing positioning, the sub-dataset ∆N Km demonstrates a strong relationship between variables with a value of R 2 = 0.94; however, ∆N and ∆N Mn , with values equal to 0.66 and 0.58, instead demonstrate a moderate relationship between variables. As a precaution, a moderate relationship between the variables can be assumed, but of course, it is not as strong as that for the Easting positioning. The absolute highest R 2 value is expressed by the Up sub-dataset ∆U Km (R 2 = 0.98), and not to be underestimated is the ∆U with an R 2 = 0.93 but it is equally true that the Up positioning also expresses the lowest value with ∆U Mm (R 2 = 0.49). Even for the UP positioning, it can be conservatively assumed that there is no more than a moderate linear relationship between the variables [30]. Figure 5 shows an example of the linear regression performed for the sub-datasets ∆E, ∆N and ∆U in Single Point Positioning.
course, it is not as strong as that for the Easting positioning. The absolute highest R 2 value is expressed by the Up sub-dataset ΔUKm (R 2 = 0.98), and not to be underestimated is the ΔU with an R 2 = 0.93 but it is equally true that the Up positioning also expresses the lowest value with ΔUMm (R 2 = 0.49). Even for the UP positioning, it can be conservatively assumed that there is no more than a moderate linear relationship between the variables [30]. Figure 5 shows an example of the linear regression performed for the sub-datasets ΔE, ΔN and ΔU in Single Point Positioning.

Discussion
Smartphone positioning has shown limitations in the accuracy of its results compared to those obtained with traditional geodetic instruments. However, the aim of this work was not to compare smartphones with high-performance GNSS geodetic instruments, but rather to define possible smartphone applications. It should be pointed out that although the smartphone is equipped with hardware for dual frequency carrier phase acquisition, this is not stored in the app used in the experimentation. Consequently, the measurements were carried out with only the information of the codes present in the various constellations. The lack of information of the phase measurement could be due to limitations imposed by the Android operating system.
Tests with the three smartphones showed no substantial differences in accuracy and precision. The positioning errors of the three devices were processed for observation times of one, five and ten minutes, and the SPP and DGNSS solutions were fully compared. In particular, for the Huawei and OPPO smartphones, at one minute, there were errors in the order of meters and the positioning error decreased when the observation increased to five and to thirty minutes. Comparing the positioning errors at 60 min, it was observed that SPP is more advantageous than DGNSS in determining the Easting coordinate, unlike DGNSS, which is preferable to SPP for Up positioning. In Appendix C ( Figure A7), it is possible to see a spatial distribution of the error obtained for SPP and DGNSS.
In particular, the best planimetric positioning was obtained for the SPP sub-datasets whose outliers were eliminated with the Tukey method; the mean of Easting and Northing positioning errors were equal to ΔEMn = 0.439 m and ΔNMn = 1.984. Good results were also obtained with the sub-datasets whose outliers were eliminated by clustering: in this case, the mean of Easting and Northing positioning errors were equal to ΔEKn = 0.706 m

Discussion
Smartphone positioning has shown limitations in the accuracy of its results compared to those obtained with traditional geodetic instruments. However, the aim of this work was not to compare smartphones with high-performance GNSS geodetic instruments, but rather to define possible smartphone applications. It should be pointed out that although the smartphone is equipped with hardware for dual frequency carrier phase acquisition, this is not stored in the app used in the experimentation. Consequently, the measurements were carried out with only the information of the codes present in the various constellations. The lack of information of the phase measurement could be due to limitations imposed by the Android operating system.
Tests with the three smartphones showed no substantial differences in accuracy and precision. The positioning errors of the three devices were processed for observation times of one, five and ten minutes, and the SPP and DGNSS solutions were fully compared. In particular, for the Huawei and OPPO smartphones, at one minute, there were errors in the order of meters and the positioning error decreased when the observation increased to five and to thirty minutes. Comparing the positioning errors at 60 min, it was observed that SPP is more advantageous than DGNSS in determining the Easting coordinate, unlike DGNSS, which is preferable to SPP for Up positioning. In Appendix C ( Figure A7), it is possible to see a spatial distribution of the error obtained for SPP and DGNSS.
In particular, the best planimetric positioning was obtained for the SPP sub-datasets whose outliers were eliminated with the Tukey method; the mean of Easting and Northing positioning errors were equal to ∆E Mn = 0.439 m and ∆N Mn = 1.984. Good results were also obtained with the sub-datasets whose outliers were eliminated by clustering: in this case, the mean of Easting and Northing positioning errors were equal to ∆E Kn = 0.706 m and ∆N Kn = 1.984 m. The sub-datasets not treated with the elimination of the outliers instead showed mean positioning errors equal to ∆E = 0.700 m and ∆N Mn = 2.509 m. The best Up positioning was obtained with the DGNSS method, with a position error ∆U Kn = 3.57 m; the other two sub-datasets ∆U and ∆U Mn instead obtained a mean positioning error equal to 3.58 m.
The study of linear regressions shows that the accuracy and precision of SPP improves as the observation time increases, which leads the user to choose this mode if the observation can take place over a long period of time. In the DGNSS, no direct correlation between observation time and accuracy was found.
The choice in location of the smartphones was made to use very short baselines (less than 1 km) in order to assess only the fixed amount of error without considering the variation due to the distribution of error as a function of distance. It was verified, considering another permanent GNSS station with baselines of about 50 km (Avetrana site), that DGNSS positioning errors do not vary significantly for positioning with code pseudoranges.
In order to test the applicability of the results obtained, a smartphone survey of the wall of a small amphitheatre was carried out. The survey consisted of the acquisition of four vertices of the amphitheatre with the Xiaomi Mi 10 ( Figure 6) and observation times of 1 min with the Geo++ Rinex Logger for subsequent post processing in SPP. At the same time, the same vertices were acquired in real time with the Global Mapper Mobile app and with the same acquisition times. In Table 13 and Figure 6, it can be observed that SPP obtained better positioning results in 100% of the cases, proving to be better than Global Mapper Mobile positioning in real time.

anges.
In order to test the applicability of the results obtained, a smartphone survey of the wall of a small amphitheatre was carried out. The survey consisted of the acquisition of four vertices of the amphitheatre with the Xiaomi Mi 10 ( Figure 6) and observation times of 1 min with the Geo++ Rinex Logger for subsequent post processing in SPP. At the same time, the same vertices were acquired in real time with the Global Mapper Mobile app and with the same acquisition times. In Table 13 and Figure 6, it can be observed that SPP obtained better positioning results in 100% of the cases, proving to be better than Global Mapper Mobile positioning in real time.

Conclusions
In this paper, we present a statistical analysis method to evaluate the accuracy and precision of GNSS positioning of smartphones, using only pseudorange measurements. The choice was made to extend such methods to any device using pseudorange only since carrier phase measurements are not always available on all devices.
Two methods were described for the detection and elimination of outliers in the positioning data, namely, the Tukey and the K-means methods, which can improve the positioning accuracy of mobile devices.
The K-means method can be further investigated in order to improve the positioning performance of smartphones through artificial intelligence; therefore, the authors propose further studies in this research direction.
The comparative study of DGNSS and SPP methods showed that SPP is more accurate for medium to long observation times, while DGNSS is more efficient in the short term.
The results obtained could be aimed at applications in GIS for smartphones, allowing, for example, the creation of citizen science experiments (environmental, extended heritage monitoring, etc.), quickly and relatively accurately.

Appendix A
In the following figures are collected the normal distributions of the sub-datasets ΔE ( Figure A1), ΔN ( Figure A2) and ΔU ( Figure A3), derived from DGNSS positioning for observations of 5, 10, 15, 30 and 60 min. It is possible to note the lack of normal distributions ΔE for 5 min and 15 min and ΔU for 15 min. These distributions were not reported, as the condition of normality of the distribution was not verified according to Table 3.

Appendix A
In the following figures are collected the normal distributions of the sub-datasets ΔE ( Figure A1), ΔN ( Figure A2) and ΔU ( Figure A3), derived from DGNSS positioning for observations of 5, 10, 15, 30 and 60 min. It is possible to note the lack of normal distributions ΔE for 5 min and 15 min and ΔU for 15 min. These distributions were not reported, as the condition of normality of the distribution was not verified according to Table 3.

Appendix B
Below are shown the normal distributions of the ΔE ( Figure A4), ΔN ( Figure A5), ΔU ( Figure A6) sub-datasets resulting from Single Point Positioning for 5, 10, 15, 30 and 60 min observations. The distributions of ΔE for 30 min, and ΔN for 15 min are omitted since the normal condition was not verified against the results of the test (see Table 4). observations. The distributions of ∆E for 30 min, and ∆N for 15 min are omitted since the normal condition was not verified against the results of the test (see Table 4).

Appendix B
Below are shown the normal distributions of the ΔE ( Figure A4), ΔN ( Figure A5), ΔU ( Figure A6) sub-datasets resulting from Single Point Positioning for 5, 10, 15, 30 and 60 min observations. The distributions of ΔE for 30 min, and ΔN for 15 min are omitted since the normal condition was not verified against the results of the test (see Table 4).

Appendix C
The DGNSS and SPP positioning strategies obtained by Xiaomi were compared (Fig-Figure A6. Normal distribution ∆U for SPP.