Comparative analysis of positioning accuracy of Samsung Galaxy smartphones in stationary measurements

Achieving single meter positioning accuracy by portable mobile devices still poses a major challenge to the satellite signal receivers constructors, despite gradual constellation completing process and the progress achieved in last decades. Nowadays popular smartphones are multifunctional devices that serve also as a personal navigation tool in navigation and sport activities using the global navigation satellite systems (GNSS) receivers installed. It would seem that introducing newer models to the global market would cause constant progress in the accuracies obtained, however, the study results do not confirm that. This study focused on Galaxy series smartphones of Samsung, one of the leading manufacturers worldwide, to examine its technological progress. The aim was to verify the thesis using statistical models and analyses to compare succeeding generations of smartphones on six devices from the series. The authors conducted two synchronous stationary measurement campaigns of 24 and 12 hours with one-second interval in obstacle-free environment which provided 70000+ and 30000+ statistical samples of position measurements. The reference values of true smartphones coordinates were determined by means of state-of-the-art precise surveying instruments and geodetic calculations. The results indicate that two newest generations of the Galaxy series included in the research, namely S6 and S7, obtained lower accuracies than their predecessors. Against the backdrop of lack of public availability of smartphones technical parameters, the conducted research results are relevant especially to smartphones positioning service users community.


Introduction
Smartphones have become an inherent element of daily life of developed societies in the past decade. With comprehensive accessories, readily installable applications connected to the internet, they have in fact become upgraded multifunctional devices that help process, store and disseminate various types of information, regardless of location and time. Their increasing a1111111111 a1111111111 a1111111111 a1111111111 a1111111111 A very large group of applications and solutions is based entirely or in part on global and local satellite navigation systems [14][15][16][17][18]. The latest smartphones, such as Samsung Galaxy (models: S5-S8), receive signals of not only fully operational systems Global Positioning System (GPS) (United States) and GLONASS (Russia), but also of those being still developedsuch as Chinese BeiDou and European Galileo. Using more than one system speeds up the positioning process and increases the accuracy of position determination [19][20]. This is important because potential failure in high accuracy achievement can lead to errors, for instance in navigating a moving vehicle, determining the route or speed of a person engaged in physical, tourist or other activities in the Location Based Services (LBS) [21]. Mobile phone manufacturers do not usually inform users about technical aspects of implemented GNSS receivers. It is known, however, that they belong to a group of autonomous receivers determining distances based on correlation properties of pseudo-random codes-in the same way as popular receivers dedicated to sport and recreation.
The concept of position determination accuracy (positioning) is a key parameter defining GNSS receivers. The GPS system user segment includes both precise geodetic receivers used in the highest accuracy applications (e.g. Earth crust displacements monitoring) and lower accuracy receivers that determine the position for recreational and tourist purposes.
In geodesy and navigation, positioning accuracy using GNSS satellite navigation systems is carried out via [22][23]: • static (stationary) measurements, where the position coordinates obtained from a receiver measurements are referenced to known reference coordinates-geodetic coordinates (predictable accuracy) or to their position averaged in a session (repeatable accuracy); • kinematic (in motion) measurements, where position coordinates obtained from measurements are referenced to a predetermined track.
In summary, the purpose of this article is to provide a comparative analysis of the positioning accuracy of Samsung Galaxy smartphones, one of the world's leading manufacturers of mobile phones using static (stationary) measurements.

Subject of study
For the comparative analysis five Samsung Galaxy S series smartphones were chosen: 3 Mini, 4, 5, 6, 7, and Galaxy Y. Selected technical parameters are presented in Table 1. Originally, the authors intended to use first generation Galaxy S and Mini 2 phones, however, the devices were discarded due to uncontrolled application downtime. The smartphone accuracy analyses carried out so far have commonly adopted the methodology of using one device in a research [24][25]. This would confirm the thesis that individual devices released on the market are identical in terms of technical parameters. Therefore, quality tests (both in terms of firmware and hardware) confirm the repeatability of individual devices. A more detailed analysis of GNSS antenna parameters used in smartphones was carried out in [26]. In addition, it should be noted that research [27][28][29] that focused on the precise Real Time Kinematic measurement technology (providing centimetre accuracy) also used single copies of mobile devices. Therefore, since even if analyses of such high accuracy are carried out with the use of a single model, such approach is even more legitimate for much less accurate position estimation by smartphones GNSS receivers.

Measurements
As part of the research, two stationary measurement campaigns were held in 24-hour and 12-hour time spans respectively. The top roof of the National Sailing Centre in Gdansk (Poland) was chosen as the measurement site as location free from any terrain obstacles. A specially designed platform with vertically placed mobile phones was mounted on the roof (Fig 2). In case of unfavourable weather conditions (high humidity, drizzle, rain, etc.), a plastic cover tightly connected to the base could have been mounted on the platform to secure the devices (Fig 2). Inside the box a power strip with the connected phone chargers was placed. The position coordinates determination by a smartphone receiver is substantially influenced by the device's software [30]. Hence, it has been decided (like with [31]) to analyse only National Marine Electronics Association (NMEA) GGA messages recorded during measurement. Each smartphone used application developed by ppillaii [32] as a free NMEA GPS logger to register and record three-dimensional position coordinates and additional navigational parameters. All active applications (except for the NMEA logger), connection options (Wi-Fi, Bluetooth, mobile data) and power saving mode were disabled on each phone. The SIM cards were also removed. Only the location service remained enabled.
Before commencing stationary measurements by smartphones on the platform, it was necessary to accurately determine the reference (true) coordinates of mobile phones GNSS receivers. The centimetre accuracy of the determined coordinates was achieved by using satellite and classical geodetic measurement techniques. The real time kinematic (RTK) and real time network (RTN) solutions were not used. Instead, static satellite measurements of state-of-the-art geodetic GNSS receivers were used to establish a control network. In the next stage the tachymetry was used to determine coordinates of the antennas of the tested smartphones. The location of the four points of the control network was chosen during field reconnaissance. Steel bolts were used for permanent stabilisation.
In the first phase of the survey, two GNSS Trimble R10 geodetic receivers were used to record raw satellite observations (Fig 3) during two 45-minute static sessions. Synchronous satellite observations of GPS and GLONASS systems were obtained from the reference stations of the TPI NETpro commercial active geodetic network located in Braniewo (68 km), Elblag (46 km), Gdansk (13 km), Starogard Gdanski (48 km) and Wejherowo (44 km). During postprocessing precise ephemeris data in a ' � .sp3' format provided by GFZ German Research Centre for Geosciences was used. Satellite positions in the files were given with a 5-minute interval, which significantly increased accuracy of the determined GNSS vectors. All calculations were performed in the Trimble Business Center software. Estimated coordinates of the control network points were characterised by maximal errors of 0.010 m (horizontally) and 0.017 m (vertically). The resulting ellipsoidal coordinates were then transformed into the PL-2000 coordinate system (Polish modification of the Gauss-Kruger projection of the ellipsoid to the plane).
The second stage of the measurement work was determination of the position of the phones with the classic electronic distance measurements (EDM) using Leica TPS 1103 total station. The instrument position was calculated by the method of space resection, which requires the recording of directions and distances to points with known coordinates (Fig 3). Based on the set of four points of the control network, the station coordinates were determined with errors not exceeding 0.01 m. Known position and orientation of the instrument enabled the measurement of the positions of the phones and determination of the coordinates.
After determining the receivers phones coordinates the NMEA GPS application and the location service were activated, the "NMEA Raw Data" and "Save" options (for recording measurements on the microSD memory card) were selected. The first measurement campaign (24 At night, the plastic cover was attached due to high humidity in the area. During the observations acquisition a number of problems was encountered: • approximately 2-3 hours after the measurements started the applications in Samsung Galaxy S3 Mini and Y smartphones were suddenly shutting down. Consequently, it was decided to systematically record the information at 1.5-hour intervals (for Samsung S3 Mini and Y phones) and at 3-hour intervals for other phones, without removing them from the measurement platform; • while recording data the NMEA GPS application occasionally crashed on some devices; • at the beginning of the second measurement session, the Samsung Galaxy S7 application shutdown was observed, and a message about possible overheating was displayed. That was probably the result of a temporary plastic cover mounting due to the expected rain (despite the sunny summer day).
All the unexpected events resulted in the loss of unsaved data. Fortunately, these periods were relatively short because of the regular monitoring of a measurement platform status. After the measurements were completed, registered files were transferred to the computer and the obtained data were processed.

Data processing
The recorded measurement data were merged from multiple minor files and saved in one observation file for each smartphone. The files were subsequently loaded to the proprietary software (in C#) for deleting erroneously recorded NMEA-0183 messages, quite common in GNSS receivers measurements datasets (Fig 4). It was used to calculate a checksum using the XOR operation on all characters of the line (except the leading dollar sign) to the checksum itself (without the checksum and the asterisk sign). The software compared a calculated checksum using an exclusive disjunction with the checksum value stored in the hexadecimal system at the end of each line. If checksum values were not consistent, the software deleted the selected line.
Upon completion of the software calculation, three files containing erroneously recorded NMEA-0183 messages (1), NMEA GGA messages (2) and other messages (3) were received. Only GGA messages were used in the research. In the context of further analyses, it is important to explain in details the format of the latitude and longitude coordinates fields registered in the form of full degrees and minutes within one string. It needed to be converted to full degrees according to the example presented in the Fig 5. The full-degree coordinates format was needed for further conversion of angular latitude and longitude into metric Cartesian coordinates. The second important operation was the normal height calculation based on the altitude above mean sea level (GGA message) and the height of geoid above World Geodetic System 1984 (WGS84) ellipsoid obtained by interpolation of the EGM2008 geoid model [33]. Formulas in [34] were used to determine the normal heights.
Determining errors of individual measurements (expressed in the differences of angular horizontal coordinates of latitude and longitude) due to the changing length of parallels arcs requires introducing a projection to present them as linear values in meters. To accomplish that the angular coordinates of the WGS84 ellipsoid (with parameters: a = 6378137.000 m, b = 6356752.314 m) [34] were projected onto a surface using the Gauss-Kruger projection commonly used in geodesy [35]. As a result of the calculations, the plane coordinates (x, y) were obtained, where x denotes distance in meters of the point from the equator calculated along the meridian arc (on the WGS84 ellipsoid), and y denotes distance in meters from the central meridian of several degrees wide zone, which is arbitrarily set. A minus sign in y coordinate means that the point is located west of the meridian, whereas a plus sign corresponds with a position to the east of the meridian. In order to avoid negative values of coordinates on the y axis, a constant value of, for instance, 500 000 m (for the three-degree longitude zone in the Polish 2000 system) is added to the coordinate. The entire process of converting the angular ellipsoidal coordinates into Cartesian coordinates was based on the formulas presented in [36].
After converting ellipsoidal coordinates of points to plane coordinates and determining normal heights, the results were statistically calculated. For this purpose, the commonly used navigation method of measuring the accuracy of positioning was used, which is summarised in Table 2 [37 -39].
Horizontal coordinates of the latitude and longitude (φ, λ) and orthometric height (H) were recorded in NMEA GGA format files. On their basis, the RMS values, used in further formulas in Table 2, were calculated. RMS φ and RMS λ parameters are initially expressed in angular units (degrees). In order to determine the linear values of positioning errors, the values needed to be related to the one-degree arcs lengths of meridian and parallel in the measurement location (Gdansk). The length of the meridian arc is calculated using the following formula: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ð1 À e 2 sin 2 ðφÞÞ where: s M -meridian arc length of the ellipsoid of revolution, M(φ) -the radius of curvature in the meridian plane at latitude φ, φ 1 ,φ 2 -latitudes of points determining the meridian arc, a-major semi-axis of the ellipsoid of revolution length, e -ellipsoid of revolution eccentricity. In order to determine the arc length of the parallel, it is necessary to calculate its radius length using the formula: where: N(φ) -the radius of curvature in the prime vertical plane at latitude φ. The radius of circle centred at the true position, containing the position estimate with probability of 50%.

3D 50%
The radius of sphere centred at the true position, containing the position estimate with probability of 50%.

2D 68%
The radius of circle (sphere) centred at the true position, containing the position estimate with probability of 68%.

R95
2D 95% The radius of circle (sphere) centred at the true position, containing the position estimate with probability of 95%.
The next step is to calculate the length of the parallel circle arc. According to the angle definition, this length was obtained using the formula: where: s P -parallel arc length, a _ -angle in the radial measure.
In case of the WGS84 ellipsoid of revolution used as the reference, the one-degree arcs lengths of meridian (s M ) and parallel (s P ) in Gdansk were 111 311.842 m and 64 995.633 m, respectively. According to them, the linear values of RMS φ and RMS λ were calculated.

Results
The assumption of the study was to conduct the measurement continuously for a period of 24 hours with a one-second interval in the same conditions. As a result, a representative synchronous sample of statistical data that describe the smartphones positioning process was obtained. The collected data allowed to carry out a reliable comparative accuracy analysis. By determining the coordinates of the GNSS receivers of the phones, the previously described accuracy measures of positioning could be related to actual values (predictable accuracy). Due to the limited volume of the article, statistics of errors in the repeatable position were deliberately omitted. The applied approach can be found in the geodesy and navigation literature. For the evaluation of several adopted measures of accuracy values a Mathcad sheet was created (Table 3). Due to the achieved low accuracy of the positioning of Samsung Galaxy S6 and S7 phones additional verification session was conducted (Table 4).
Based on the results presented in Table 3, the smallest error was obtained in the Samsung Galaxy S4 smartphone, which achieved 2D results: 1.10 m (R68) and 1.65 m (R95), and in the 3D: 1.93 m (R68) and 3.53 m (R95). Similar, but slightly lower accuracy characteristics are those of a Samsung Galaxy S5 (differences between various measures are usually from a dozen to several dozen cm)- Fig 6. On the Samsung Galaxy S3 Mini phone, most of the accuracy measures are within the range of 3-4 m (both horizontal and vertical). However, during processing of the measurement data it was noted that the phone continuously recorded the same position during individual 1.5-hour measurement sessions (the coordinates changed when the NMEA GGA file saving option was activated). A value decrease in the horizontal position  2D)) and 2.79 m (DRMS (3D)) were obtained. The second measurement campaign showed a significant increase in the value of DRMS (2D) by 142% from the value of 1.03 m to 2.49 m, which can be seen in Fig 6. It should be noted that the RMS (h) error has practically not changed (increase by 9% from a value of 2.6 m to 2.83 m). Accuracy measures calculated for the S4 smartphone do not differ between the two measurement campaigns by more than 50% (Tables 3 and 4). The results of position determination of the other three remaining smartphone models in two measurement campaigns are presented in Fig 7. The obtained accuracy measures in most cases do not differ by more than 40%. The smallest differences were noted in the S6 model. In the first 24-hour campaign, the Samsung Galaxy S6 obtained errors of 6.84 m (DRMS (2D))   Table 4). The S6 and S7 models turned out to be the least precise devices in the whole set. Almost all their measurements, both in 2D and 3D, vary from almost 10 to even a dozen or so meters. The next smartphone, which supported only GPS satellites, (Samsung Galaxy Y) fulfils the accuracy requirements of [40], and the previously quoted position errors are, respectively: 3.71 m (R68) and 4.93 m (R95) in the 2D plane, as well as 5.03 m (R68) and 9.13 m (R95) in the 3D plane. In addition, the Samsung Galaxy Y recorded periodically the same position, but definitely less often than the S3 Mini (Figs 6 and 7). The study also analyses the random variable distribution which is the error of a single measurement in terms of typical statistics used in navigation [41]. According to the Central Limit Theorem it can be assumed that the random variables distribution with a large number of variable values follow to a normal distribution [42]. Given the number of coordinate errors in the north and east directions (x and y) considered in the research, their normal distribution can be assumed. The linear position determination errors are defined by the Pythagorean theorem and the calculation of the hypotenuse length. This formula corresponds to Euclidean norm of two independent random variables. According to the definition, the probability distribution of the resulting variable is Rayleigh distribution. Hence, it can be expected that the empirical probability distribution of the accuracy indicators determined in this work will have a distribution similar to the Rayleigh distribution. The statistical distribution of position errors can be presented by Rayleigh's distribution, as probability density function ƒ(x; σ) and distribution function F(x): where: N-number of measurements. The probability density functions (PDFs) present the probability of a continuous random variable's (in this case a position error) taking a value from a particular given range. It is worth noting that statistical tests carried out in the EasyFit 5.5 Professional software confirm that the position error empirical probability distribution is similar to the Rayleigh distribution (5). The functions have the property that its integral over the entire domain (area under the function graph) is equal to one. Depending on the parameters of the expected value and the standard deviation, the PDF functions graph shape differs. The expected value in the case of repeatable accuracy analysis is the arithmetic mean. In the presented analysis of the predicted accuracy it is the known true value (the reference coordinates of smartphones determined using precise surveying instruments). The standard deviation of a variable can be interpreted in the general Rayleigh distribution as a scale parameter [42][43]. Hence, high accuracy GNSS receivers should have PDF functions fast monotonically increasing and close to the vertical axis graphs. The GNSS receivers of the S4 and S5 smartphones determined the position with a very similar and relatively small error in relation to the other tested models. Furthermore, the graph of their probability density function shows that they obtained small values of standard error deviations. Increasing flattening and increasing values of the functions graphs maximum arguments prove the lower the accuracy and the precision of subsequent models (Y, S3 Mini, S7 and S6) (Fig 8).
Cumulative distribution functions (CDFs) represent the probability that the random variable will take a value less than or equal to a given argument (Fig 9). In this case the definition should be read as the probability (vertical axis) of a position determination error equal to or lower than the given threshold value (horizontal axis). The fast monotonically increasing function graph shows the high accuracy of the measuring device. The CDF functions (6) are strictly dependent on the PDF functions (5). Additionally, in Fig 9 lines of the probabilities of 68% (0.68) and 95% (0.95) were added with corresponding values of the tested smartphones CDF functions determined by the Rayleigh distribution quantile function formula that can be derived from (6): Q ¼ s ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi À 2lnð1 À pÞ p ð8Þ where: Q -random variable value (positioning error), p -probability threshold value. Similar results of S4 and S5 smartphones confirm the two model's relatively high accuracy in comparison to other devices (steep chart of the function of the distribution function). The probability that the position assigned with them will be burdened with an error greater than 3 m is almost certain (99.9%). Similarly, in the case of the S6 model, the probability is only 36.4%. Table 5 shows the global scientific research carried out over the last few years, during which the accuracy of static (stationary method) position determination in the group of smartphones and sport-recreational receivers was assessed. It is worth adding that there is much more research on the assessment of kinematic position determination accuracy [43][44][45][46][47], [31] than stationary described in this research.

Discussion
It can be seen in Table 5 that researchers use different methods to assess the accuracy of measurements, while the basic and most commonly used in geodetic and navigational literature accuracy measures of position coordinates are: RMS, DRMS, 2DRMS, CEP, SEP, R68 and R95 (described in data processing section). The positioning accuracy of Samsung Galaxy series smartphones GNSS receivers exceeded the accuracy provided by GPS receivers tested in [49]. The CEP error values of both the first and the second smartphone measurement campaigns are lower than in the cited publication. The tested GPS receivers did not obtain a value lower than 5.0 m (Qstarz BT-Q1000XT). The worst position in terms of accuracy was obtained by i-gotU GT-600 Logger (10.8 m). Bearing in mind the year of publication (2013) and only one GNSS system used (GPS), it should be noted that Samsung Galaxy Y (present on the market since 2011), S3 Mini at the time (since 2012) and S4 (since 2013) have obtained much better Stationary positioning accuracy of Samsung Galaxy smartphones accuracy parameters. Therefore, using them as sports route loggers seems justified due to the higher accuracy of positioning.
[50] describes the determination of the reference coordinates values with the same accuracy as obtained in the following research (< 1 cm). The accuracy criterion used for the parameterisation of sports GNSS receivers was 2DRMS-a measure commonly used in surveying and navigation. As a result of the obtained values comparison, it should be noted that only two smartphones (S4 and S5) and in the first campaign only, achieved better positioning accuracy than the tested sports receivers. Qstarz BT-Q1000 with the accuracy of 2.18 m proved to be the most accurate GNSS receiver. The remaining models also obtained good results (2.18 m, 2.97 m, 4.02 m and 7.06 m) compared to Samsung Galaxy smartphones, whose 2DRMS values usually oscillated between 5 and 6 m (Y, S3 Mini, S5) with several values exceeding 10 m (S6 and S7). The accuracy of sports receivers described in [50] proves their higher accuracy and precision in relation to Samsung Galaxy smartphones.

Conclusions
While addressing the issue of accuracy of GNSS receivers implemented in smartphones, the authors realised that these are very specific measurement devices. The final effect of displaying the desired information (a pair of coordinates, speed, direction, position on the electronic map) is affected by a number of factors that can be assigned to two groups: (1) those who are fully or partially user-dependent (software update and selection, choice of specific software options, firmware update in the device, etc.); and (2) factors that the user cannot alter (the quality of components installed in the receiver, built-in systems software, GNSS system errors, etc.). The popularity of smartphones and their use in navigational applications is widespread in public, but just few nonprofessional users are aware of the complexity of the underlying process, based on the knowledge and experience of hardware and software manufacturers. It would be helpful if smartphones manufacturers were to act like universal GNSS data loggers manufacturers (e.g. Qstarz, Holux) and published technical information on the achieved accuracy or on implemented GNSS chipsets. Unfortunately, smartphone specifications are missing such data. Hence, the major objective of this article has been to bridge the gap.
Determining the position using smartphones in most cases is used in dynamic applications (travelled route registration, road navigation, etc.). Arbitrary determination of kinematic accuracy is difficult due to the changing measurement conditions (speed, direction, obstacles presence, etc.). For this reason, long-term stationary measurements are carried out in favourable field conditions (no obstacles) to assess the accuracy of smartphones. Considering the ideal conditions for carrying out the measurement, it can be assumed that smartphones in everyday use in urban areas will achieve accuracy in the best case equal to that obtained in the study. The authors aimed to verify the hypothesis concerning satisfying the needs for better positioning accuracies by successive generations of mobile devices. Due to the popularity, availability and recognized position on the smartphone market, six models of the Samsung Galaxy series from 2011-2016 were used in the study (Y, S3 Mini, S4, S5, S6 and S7). The construction of a dedicated measurement platform enabled synchronous measurements under the same field  Stationary positioning accuracy of Samsung Galaxy smartphones conditions. To verify the obtained results of the 24 hour long measurement, the second independent campaign lasting 12 hours was carried out in the same place. The one-second measurement interval ensured obtaining a representative statistical sample. The collected measurement data were processed to determine the error values commonly used in surveying and navigation (RMS, DRMS, CEP and others). In addition, a statistical analysis of the probability distribution of a random variable of measurement error was performed. Two of the tested phones obtained the 2DRMS errors in the first campaign that slightly exceeded 2 m (S4 and S5). The oldest models (Y and S3 Mini) obtained three times greater error values and two latest tested smartphones obtained a surprising result close to 14 m (S6) and 9 m (S7) accuracy. According to that, the second measurement campaign was performed to verify the original research. For most cases, the accuracy obtained by smartphones was confirmed. Only Samsung Galaxy S5 got significantly different accuracy parameters (e.g. 2DRMS larger by 142%). Errors increments exceeding 50% of the value obtained in the first campaign were also recorded in smartphones S3 Mini and S7. In other cases (Y, S4 and S6 models), the error differences did not exceed 50%, with a significant part not exceeding 25% of the original values. The oldest models of the Samsung Galaxy series (Y and S3 Mini) during the tests measured the position abruptly, often registering the same coordinates for a longer period of time. The significant low accuracy confirmation in two measuring campaigns was found in the case of the S6, which additionally confirmed the worst result in the smartphones group. Obtained results show that intuitive perception of newer Galaxy models as better in every possible operational aspect does not necessarily refer to the accuracy of positioning. It is difficult to understand considering that the operators of global navigation satellite/positioning systems continue to develop and improve them. It is also worth noting that the research was carried out at a measuring station without terrain obstacles-the conditions rarely encountered in everyday use of such receivers.
The limitation of the research is that only one model of each smartphone was tested in measurement campaigns. In future work more than one device per phone type will be validated to present the repeatability of the determined positioning accuracies.