EVALUATION OF THE POSITIONAL QUALITY THROUGH THE POST-PROCESSING OF RAW GNSS DATA FROM A SMARTPHONE VIA DIFFERENT SATELLITE POSITIONING METHODS

: Since the introduction of the Android 7 in August 2016, it has become possible to use raw data collected by GNSS sensors present in some Android smartphones and tablets. Therefore, it became possible, for the first time, to perform the post-processing of the data, which means to obtain coordinates that are more accurate than usual, from meters to decimeters. In addition, among the technological innovations in the context of positioning via smartphones, it is mentioned the use of modern GNSS sensors, like the one used by Xiaomi Mi 8, which was the first smartphone to integrate a dual-frequency GNSS sensor. In this research, data collection campaigns were carried out in static mode to evaluate the quality of geodetic coordinates obtained from Mi 8. Using freely available applications that store raw data in files in RINEX format, the data was post-processed with different positioning methods and with different software, including the freely available IBGE-PPP online service in Brazil. The results of this research show that it is possible to obtain geodetic coordinates with an accuracy at decimeter order, which indicates that the methodology can be used in some engineering applications. um sensor GNSS de dupla frequência. Nesta pesquisa, campanhas de coleta de dados foram realizadas em modo estático para avaliar a qualidade das coordenadas geodésicas obtidas a partir do Mi 8. Usando aplicativos disponíveis gratuitamente que armazenam dados brutos em arquivos no formato RINEX, os dados foram pós-processados com diferentes métodos de posicionamento e com diferentes softwares, incluindo o serviço online IBGE-PPP disponível gratuitamente no Brasil. Os resultados desta pesquisa mostram que é possível obter coordenadas geodésicas com acurácia na ordem decimétrica, o que indica que a metodologia pode ser utilizada em algumas aplicações de engenharia.


Introduction
The Global Navigation Satellite System (GNSS) is widely used in various researches related to Geosciences and in numerous engineering works that require, above all, accurate geodetic coordinates. Among these activities, can be mentioned the monitoring of masses and dams, land surveying of rural properties, and infrastructure works such as paving, sanitation, and electricity.
With the popularization of GNSS due to its global coverage and free of charge, there is an increasing number of GNSS sensors in large part of objects used in the day-to-day: mobile devices that have operating systems, such as smartphones, smartwatches and tablets (Dimarzio 2017). As indicated by GSA (2019), the smartphone will be the most used electronic device in the world in 2020, with approximately 3.5 billion users.
According to Heuberger et al. (2011), positioning via smartphones can be performed using GNSS sensors, Global Mobile System and through a Local Area Network. However, under ideal conditions, e.g. obstruction-free areas, the positional quality obtained from smartphones is in the order of 2 to 3 m, while in the worst-case scenarios, e.g. urban canyons, the error could be greater than 10 m (Pesyna et al. 2014). Therefore, smartphones are usually used for navigational purposes (e.g. definition of routes and trajectories) when the high accuracy is not required, unlike certain applications in engineering. By using geodetic receivers, it is possible to obtain accurate geodetic coordinates with a quality better than 1 cm, even submillimeter; however, these equipments have a higher cost when compared to smartphones, navigation receivers and/or low-cost systems.
One of the factors by which the positional accuracy obtained from smartphones is limited, is related to the GNSS module whose the solutions are internally calculated, that is, no output files are generated with raw GNSS data (Realini et al. 2017)enabled by Google through its Android operating system, opens the possibility to apply precise positioning techniques using off-the-shelf, mass-market devices. The target of this work is to evaluate whether this is feasible, and which positioning accuracy can be achieved by relative positioning of the smart device with respect to a base station. Positioning of a Google/HTC Nexus 9 tablet was performed by means of batch least-squares adjustment of L1 phase double-differenced observations, using the open source goGPS software, over baselines ranging from approximately 10 m to 8 km, with respect to both physical (geodetic or low-cost. Thus, it is not possible to perform the post-processing of the data, technique that allows obtaining geodetic coordinates with high accuracy. In August 2016 with the launch of the Android 7 platform, a new era in the context of positioning and navigation from mobile devices emerged. Due to a new Application Programming Interface (API) implemented on Android 7 and its successors, it became possible to access raw GNSS data, such as the information used in the calculus of pseudoranges, navigation messages, satellite clock information, carrier phase, among others (GSA 2017).
Due to the great potential of this innovative tool, the scientific community and companies in the field of Geoscience have developed certain android applications (apps) based on the modern API. The Geo++ RINEX Logger app is compatible with the modern tool and it allows converting raw GNSS data into files in the format of Receiver Independent Exchange Format (RINEX). Consequently, it became possible to post-process the GNSS data collected from smartphones compatible with this tool.
In addition to the new data acquisition tool mentioned above, a possible solution to the presented problem is the use of smartphones that have modern GNSS sensors, such as the BCM47755 sensor, present on the Xiaomi Mi 8 smartphone. Launched in May 2018, Mi 8 was the first smartphone in the world to integrate a dual-frequency GNSS sensor, capable of collecting data from multiple constellations, GPS, GLONASS, Galileo, QZSS and BeiDou, and multiple frequencies, L1, E1, L5 and E5 (GSA 2018; Technology 2018).
Among the researches related to the subject, the research developed by Realini et al. (2017) and by Zhang et al. (2018) demonstrated that it is possible to obtain accuracy with a decimeter level with a tablet (Nexus 9) without ambiguity resolution. Håkansson (2019) also calculated the precise positions from Nexus 9 and evaluated the positioning uncertainties of relative static solutions of a 5 minute's observation. Gogoi et al. (2018) performed comparisons of position measurements between the anechoic chamber and a real environment using three different smartphones. Their results show that the quality of the data captured in the anechoic chamber was significantly better than in real conditions. However, this research used only 10 minutes of raw GNSS data and only L1 signals from GPS constellation. Sheta et al. (2018)mobile devices such as personal digital assistants (PDAs indicated an improvement in the localization process when using the raw data collected by a smartphone in conjunction with the inertial data. However, only 45 seconds of data were used, and it is also not clear which constellations were considered, given that the authors only mention that GPS data in National Marine Electronics Association (NMEA) format was used. This research aims to evaluate the positional quality of the Mi 8 smartphone, using it in campaigns on static points established in the Astronomy laboratory of Federal University of Paraná (UFPR) in Curitiba, Brazil. Through the RINEX files collected via Android application, it was possible to perform the post-processing of the data through Relative and Precise Point Positioning (PPP) methods.
Furthermore, unlike the studies mentioned above, this research also seeks to evaluate the quality of the solutions using different combinations of constellations, duration of the campaigns (1 to 4 hours approximately), frequencies, elevation mask, ephemeris, and software (unpaid and commercial). In addition, considering the Brazilian scenario, were evaluated the solutions obtained through IBGE-PPP, which is one of the most widely used online service for post-processing GNSS data freely available in Brazil, administered by the Brazilian Institute of Geography and Statistics (IBGE).
The methodological aspects adopted are detailed in Section 2, which has the descriptions of the sites, the way the measurements were collected, and the used software. The mathematical model used in the analysis is described in this section. The experimental results are reported in Section 3 and some conclusions are mentioned in Section 4.

Experimental setup
The study area is considered a local free of obstructions, such as trees and buildings, and it was defined above a pillar on the rooftop of the Astronomy Laboratory, located at the Campus Centro Politécnico of the Federal University of Paraná (UFPR) in Curitiba, Paraná, Brazil. The pillar has approximately 1.5 m high and is located about 25 m from one of the GNSS stations belonging to the Brazilian Network for Continuous Monitoring of the GNSS Systems (RBMC), called RBMC-UFPR (IBGE, n.d.).
On the upper base of the pillar were defined three auxiliary points, called NO, SO and SE. The points have angles of approximately 120° between each other, and were defined using a rigid rod with 20 cm length, as shown on the left in Figure 1. The geodetic receiver Topcon HiPer SR was positioned in all the auxiliary points.
There is no information regarding on the position of the GNSS antenna on the device, but based on the information provided by the myfixguide.com website (https://www.myfixguide.com/xiaomi-mi-8-teardown), it appears that an antenna board is located in the upper of the device. Hence, to minimize the influence of the device dimension (74.8 mm X 154.9 mm X 7.6 mm) during the analysis, in all campaigns the Mi 8 was horizontally fixed on the rod, as shown on the right of Figure 1.

Data collection
The GNSS data collection through Mi 8 was performed using the Geo++ Rinex Logger android application (version 2.0.1), recording data every 1 second. This application gives access to GNSS data from multi-constellation, GPS, GLONASS, Galileo, QZSS and BeiDou, and multiple frequencies, L1, E1, L5 and E5, and converts it to output files in RINEX format.
The precise geodetic coordinates were determined by the relative method using the dual-frequency geodetic receiver HiPer SR and the RBMC-UFPR as a reference station.
A total of 17 data collection campaigns, lasting approximately 4 hours each, were performed in static mode over the three auxiliary positions NO, SO and SE, which resulted in more than 74 hours of tracking in this scenario, as show in Table 1. In all campaigns, the Mi 8 was connected to a power supply. In addition, a specific criterion was not established for defining the number of campaigns at each point.

Mathematical model adopted for accuracy analysis
The mathematical models used in the analysis were established based on Gemael et al. (2015) and Monico et al. (2009). The discrepancies are calculated using the reference observations, obtained by the relative method from data collections with the geodetic receiver, minus the calculated coordinate obtained via smartphone, as shown in Equation 1.

Discrepancies = Reference coordinate − Smartphone coordinate
(1) The Equation 2 shows the calculation of the trend. If there is a trend in the observations it should be evaluated if it is significant or not. This analysis is performed by verifying if the average of the discrepancies can be considered equal to zero. Thus, applying the Student`s T-Test, the hypotheses were defined using the equations 3 e 4.

Trend = Average Discrepancies = ∑ Discrepancies number of observations
(2) The hypothesis defined is based on the average of the discrepancies (trend), the standard deviation (σ), the random variable (z), and the significance level (α) considered, as shown in Equation 5.
If the estimated value for the average μ is within this range, it is considered that there is no trend at the level of probability 1-α. Therefore, as the model used is based on the discrepancies, the value represented as true was equal to zero. Also, the distribution used was Student`s T-Test and all analysis were performed considering a significance level of 95%.
The standard deviation of an isolated observation (σi) and the precision of the sample mean average () are obtained from equations 6 and 7, respectively.
The calculated accuracy (Equation 8) refers to the Mean Square Error (MSE). It is noted that when a set of measures does not present systematic errors (trends), the values of accuracy and precision are equal, as shown in Equation 8. In addition, the planimetric (2D) and planialtimetric (3D) accuracy are obtained, respectively, by equations 9 and 10.

Post-processing of Data
The data processing by relative positioning method, in the static mode, was performed using a professional software, Leica Infinity (version 2.4.01), which allowed post-processing of data from the GPS, GLONASS and Galileo constellations, and from the frequencies L1 and L5, E1 and E5. The reference base used was the RBMC-UFPR station, forming extremely short baselines with approximately 25 m. Furthermore, the data-recording interval of the reference station (RBMC-UFPR) is equal to 15 seconds; hence, all the processing performed by the relative positioning method were made using this interval. Table 2 presents the characteristics of the processing carried out in static mode by the Leica's software Infinity.  Table 3 presents the characteristics of the processing carried out by the PPP method using the RTKLIB software and IBGE-PPP service. Unlike the other processing, it is important to note that processing number 17 was performed using 19 RINEX files, lasting 60 minutes, generated during the campaign carried out on February 13 under the SO point. As shown in Tables 2 and 3, 277 individual processing were carried out, using the following combinations: GPS only, GPS and GLONASS and GPS, GLONASS and Galileo, as well as, using different frequencies, elevation mask and ephemeris.
The processing performed by RTKLIB (version 2.4.2) and IBGE-PPP configured the PPP method, the data was processed with a recording interval equal to 1 second. RTKLIB is an open-source software for standard and precise positioning that supports and allow post-processing data from GPS, GLONASS, Galileo, QZSS, BeiDou, and SBAS constellations (Takasu, 2013). IBGE-PPP is an unpaid online service for post-processing of GNSS data that uses the CSRS-PPP (GPS Precise Point Positioning) program, developed by the Geodetic Survey Division of Natural Resources of Canada (NRCan). It is possible to perform GNSS data processing, from GPS and GLONASS constellation, collected by receivers of one or two frequencies in static or kinematic mode. The coordinates are obtained in the Geocentric Reference System for the Americas (SIRGAS2000) and in the International Terrestrial Reference Frame (ITRF) (IBGE 2017).

Results obtained from the Relative Positioning
All 162 computations performed by Leica's software Infinity resulted in float solutions, without ambiguities resolutions. One of the factors that can explain this result is related to the constant failures in the signals tracked with the smartphone, and the high number of cycle slips. Figure 2 illustrates some of the cycle slips detected during part of Campaign 8. The data from the RBMC-UFPR (on the right) presents less cycle slips. Figures 3 and 4 show small circles that represent some of the 9270 cycle slips generated after Processing 8 for Campaign 8. In addition, the figures indicate the residues of the double difference of code L1 / E1 and L5 / E5, where it is also observed that the magnitude of the residues for the L5 / E5 code is approximately 10 times lower in relation to the residues for the L1 / E1 code.  Due to the high number of cycle slips generated in the 162 processes, it was decided not to carry out any treatment on the data, such as removing all the cycle slips.
According to Lu et al. (2018) the geodetic grade antenna is right-hand circular polarized while the antenna of smart devices is usually linearly polarized, which reduces the signal strength and increases the potential for multipath. Therefore, the smartphone antenna is extremely sensitive to low quality GNSS signal capture compared with the geodetic quality device. Table 4 presents the results of the calculation of the trend (Equation 2) for each geodetic coordinate. Although there are more than 1 meter in Ellipsoidal Height, none of the processing performed by the relative method showed significant trends for the 95% confidence level. The accuracy of each geodetic coordinate (East and North), the planimetric accuracy (2D) and planialtimetric accuracy (3D), are presented on Table 5. Comparing the results obtained between Processing 1 and 2, it is observed that there was a gain in the accuracy of approximately 29%, 15% and 17%, respectively, for the East, North and Ellipsoidal Height coordinates, when using the carrier phase L5. In this context, there was also a gain of approximately 7%, 27% and 26% of accuracy, respectively for the East, North and Ellipsoidal Height coordinates between P5 (L1 only) and P6 (L1 + L5).
Analyzing Processing 4, 5, 7 and 8, it is observed that the use of the final and rapid ephemeris did not cause significant differences in the results. This result was already expected due to the dimension of the baseline being short, about 25m. By analyzing the accuracy values for Ellipsoidal Heights, when combining the GPS and GLONASS constellations, there was a gain of approximately 47% of accuracy between P2 and P8, and a gain of 30% of accuracy between P3 and P6.
According to results referring to the different elevation mask (P2 and P3, P6 and P8), it is observed that using 10 degrees (P2 and P6), better values were obtained in the accuracy regarding the Ellipsoidal Height. On the other hand, it cannot be clearly stated that the same phenomenon is repeated in 2D accuracy.
The best result regarding 2D accuracy concerns the results generated by P7, however, Processing 3, 6 and 8 generated similar results. The only processing that resulted in values less than 1 m for 3D accuracy was the P6. Therefore, it can be said that the best results were obtained from P6.
As shown in Table 1, out of the 17 campaigns carried out, only 13 contain data referring to the three constellations. Thus, a new accuracy analysis was performed using only these 13 campaigns, that is, despite the fact that P2, P7 and P8 present 17 campaigns each, in this analysis presented in Table 6, only the 13 similar ones were used. It is worth mentioning that the Galileo system was not fully operational at the time of collection. In addition, there was a smaller number of satellites tracked during the campaigns compared to the others (Table 1), which may have influenced the results.
Through an analysis of the information contained in Table 6 and comparing P7 and P9, a deterioration in quality can be observed. There is approximately, 30% and 25% of deterioration in the East and North coordinates, respectively, when using signals from Galileo constellation.
Comparing P2, P8 and P10, the best results regarding the 2D and 3D accuracy were obtained in Processing 8 and 10, respectively. It is also observed that when using only the GPS constellation (Processing 2), there was a gain only in the accuracy of East coordinate. However, this processing generated the worst results for the North coordinate and, mainly, for the ellipsoidal height. Despite this, both solutions did not present significant trends for the level of significance adopted.
In general, it can be said that the results obtained by the relative positioning method are not similar to those obtained by conventional geodetic receivers under conditions, and with similar characteristics (e.g.: short baseline dimension, tracking time, etc.). This is clear according to the results obtained with the HiPer SR receiver, which resulted in millimeter accuracy in each coordinate. In addition, it is noteworthy that in all processes the standard deviations for isolated observations (Equation 6) were ranged between 1.29 m and 2.25 m in the East, between 1.10 m and 2.79 m in the North and between 2.69 and 6.40 m in the Ellipsoidal Altitude.

Results obtained from Precise Point Positioning
All 70 computations performed by IBGE-PPP generated solutions using the code and phase of the L1 carrier phase. However, it is worth mentioning that the data-recording interval was 1 second. The accuracy resulting from the processing performed by the IBGE-PPP service, presented results similar to those obtained by the software RTKLIB. Table 7 presents the results of the calculation of the trend (Equation 2) for each geodetic coordinate. None of the processing performed by the PPP method showed significant trends for the 95% confidence level as indicated. The greatest discrepancies in the East, North and Ellipsoidal Height were obtained in P17, P13 and P12, respectively. However, only in P12 the trend was greater than 1 meter. The accuracy of each geodetic coordinate (East and North), planimetric (2D) and planialtimetric (3D), obtained for the respective processing performed are presented on Table 8. Among the processing carried out from the IBGE-PPP with 17 campaigns (P14, P15 and P16), the most accurate results were obtained using the combination between GPS and GLONASS constellations. Analyzing P15 and P16, it is observed that the use of final ephemeris did not present significant gains in accuracy. Still, there was an improvement of 10% and 8% in the accuracy regarding the East and the Ellipsoidal Height coordinates, respectively, when using the final ephemeris.
When comparing the accuracy obtained in Processing 17 and the other processing performed by the same service, it is observed that the campaigns with a longer duration resulted in more accurate coordinates as expected.
Nevertheless, the 2D and 3D accuracies were 60 cm and 1.07 m, respectively, in P17.
The worst results in 2D and 3D accuracies obtained via PPP method, refers to the processing performed using only the GLONASS constellation (P13). On the other hand, P12 presented the best result for 2D accuracy, with nearly 22 cm. It is worth mentioning that fewer GLONASS satellites were tracked when compared to the GPS constellation (Table 1).
In general, the best results obtained via IBGE-PPP came from Processing 15; however, the quality of the results obtained by P17 stands out, as they were similar to even better than those obtained by the relative method, with campaigns lasting 4 hours.

Conclusion
Through the post-processing of RINEX data, generated by an application compatible with Android Nougat and its successors, it was possible to obtain geodetic coordinates, in static mode, with an accuracy at decimeter order using a smartphone.
The geodetic coordinates obtained by the PPP method from the online service IBGE-PPP, in general, presented more accurate solutions than those obtained by the relative positioning method, provided by the Leica's software Infinity. In both positioning methods, the most accurate results were obtained using the combination of GPS and GLONASS constellations and the worst results, for 2D and 3D accuracy, were obtained using only the GLONASS constellation.
It was observed that there is a deterioration of positional quality when using the Galileo constellation. However, there was a significant improvement in Ellipsoidal Height, when compared to the one obtained by processing using only the GPS constellation. With the Galileo satellite constellation completed and fully operating, it is expected that this gain will be more significant in the Brazilian territory.
The processing performed by the PPP method in static mode using the RTKLIB software and the IBGE-PPP service presented similar results. However, the PPP by the RTKLIB software allows a more in-depth analysis and eventual filtering of data by the exclusion of satellites made by the user, requiring greater knowledge for processing. In turn, the PPP-IBGE provides the user accurate geodetic coordinates, those referenced to the SIRGAS2000 reference system, used in Brazil, but it does not yet allow the use of modern frequencies (L5 and E5) and information from Galileo and BeiDou constellations. Thus, since the results showed a gain in accuracy when employing the L5 carrier phase, it is hoped to obtain even more promising results once this service is updated.
As expected, the use of final and rapid ephemeris did not contribute to significant differences in the solutions generated by the processing. In this context, those campaigns with a longer duration, about 4 hours, presented coordinates with better quality.
Regarding the period of the day in which the campaigns were carried out, in future works it is recommended to adopt the same period, avoiding, when possible, collections in periods with high ionospheric activity.
According to the results obtained through the post-processing carried out by the Leica's software Infinity (relative positioning method), there was an excessive presence of cycle slips generated in the solutions, which degraded the positioning quality (floating solutions). It is believed that this is caused due to the smartphone's sensitivity in capturing the signals, that is, due to the low quality of the GNSS antenna. However, it is suggested to carry out new experiments using other processing software, to verify whether if the behavior persists.
In this research, several data collections were carried out at different temperatures. The overheating of the smartphone has become a worrying factor, since it can compromise the internal components of the smartphone and, eventually, degrade the information provided to the user.
In general, due to the results obtained, it is observed that there is a promising scenario when using smartphones to collect GNSS data, both due to the possibility of obtaining geodetic coordinates with accuracy better than 1 m, and in studies related to interference, suffered by the device, such as ionospheric scintillation and the influence of multi-path signals.
There is a growing demand for increased positional accuracy obtained via smartphones and aiming to circumvent the need to acquire geodetic receivers in some circumstances. The results of this research indicate that it is possible to use this methodology for engineering applications that do not require high accuracy such as navigation, control points for satellite images (Sentinel and Landsat), precision agriculture, census records, among others. However, it is still necessary to carry out further tests to verify the real behavior of the smartphones against real engineering situations, considering that they were collected in a very different scenario from rural areas and other areas in Brazil.