Android positioning: from stand-alone to cooperative approaches

The request for continuous and accurate localization in most diverse environments is growing: a possible solution is the use of location information retrieved by smartphones. For Android devices, Global Navigation Satellite System-based positioning is one of the main localization source, but in some environments GNSS signals can be blocked or affected by multipath. In these circumstances, the navigation solution may experience severe degradation. The presence of multiple outliers and their exclusion can cause a significant reduction of the satellite geometry. A possible solution is the identification of blunders and the replacement of such measurements with observables provided by a nearby device. The merging of measurements from different devices is an open challenge that is addressed in this work. This paper analyzes three smartphone GNSS-based cooperative positioning approaches: Direct Measurement Sharing, where the aiding device provides its raw observations to the aided smartphone; Augmented Measurement Sharing, where clock parameters and their accuracy are shared along with the raw observables; Corrected Measurement Sharing CMS, where corrected observables are adopted. Specifically, measurements of the aiding device are at first corrected for the clock bias. The methods have been validated using static and kinematic real data: tests were performed using devices from three manufacturers with different versions of the Operating System (OS). From the tests, the effectiveness of the proposed methods is demonstrated and the benefits of the combined solutions with respect to the single device solutions are shown.


Introduction
Over the past few decades, mobile phones have become so pervasive that nowadays it is unthinkable to envision our lives without this technology. These devices being has created several business opportunities and promoted innovation toward the development of new services and applications. Because of the inherent mobility that characterizes mobile phone users, location information has also become crucial in several circumstances, such as rescue services, emergency management, and entertainment. This location dependency has boosted research, development, and business around the topic of navigation using smartphones. Different solutions Ciro Gioia ciro.gioia@ec.europa.eu Daniele Borio daniele.borio@ec.europa.eu 1 Joint Research Centre of the European Commission, Ispra, Italy have been proposed to improve stand-alone positioning algorithms with the goal of limiting errors, enhancing accuracy, and availability of the navigation information. Among the proposed approaches, the usage of GNSS raw measurements has attracted the attention of a large number of research groups. Numerous solutions were proposed for obtaining position information exploiting raw GNSS measurements from Android devices . The history of raw GNSS observables from Android devices is not long: in 2016 Steve Malkos, the Technical Manager of the Android Location and Context Team of Google, announced that, for the first time a mobile phone application had access to the raw GNSS measurements (Malkos 2016). This was a great news for mobile phone manufacturers and application developers that now can better test and design navigation algorithms. In 2017, about 4 billion smartphones with integrated GNSS chip sets were active worldwide (European GNSS Agency 2017). The great interest in the topic is confirmed by more than 1900 scientific papers published in less than 4 years. Even before the delivery of raw measurements by Google, the attention toward mobile phone measurements was high: for example centimeter-level positioning with a smartphone quality GNSS antenna was demonstrated (Pesyna et al. 2014).
Usually, the preliminary step for designing a navigation algorithm is the evaluation of the available measurements: in Kirkko-Jaakkola et al. (2015), smartphone measurement noise was analyzed. It emerged that smartphone observables suffered from a significant number of outliers in comparison with those collected by a low-cost GNSS receiver. The poor quality of Android device measurements was confirmed in Gogoi et al. (2018): the authors showed that the low quality of smartphone hardware components and the nonideal environments, in which phones are typically used, are the main factors driving the quality of the observables. In Zhang et al. (2018) , the quality of GNSS observations from Android devices and their accuracy was assessed in terms of carrier-to-noise power spectral density ratio (C/N 0 ), pseudorange noise, pseudorange rate error, and phase rate error. Additional analysis of the positioning performance was conducted in Humphreys et al. (2016) and Robustelli et al. (2019): it emerged that multipath is the main limiting factor preventing sub-meter level positioning. A multipath analysis using a mobile phone was presented in Massarweh et al. (2020). Timing capabilities of smartphones were for the first time analyzed in Gioia et al. (2019). The impact of the antenna configuration on the performance of an Android device was evaluated in Siddakatte et al. (2017) and Lachapelle et al. (2018). The C/N 0 , the pseudorange noise from several GNSS, the tracking capability of the carrier phase, and velocity estimation using Android devices were considered in Liu et al. (2019). Relative positioning using smartphones as master station has been demonstrated in Da Bove and Pietra (2019).
The diverse scenarios and conditions, where mobile phone users perform their activities, pushed the need of having continuous, accurate and reliable positioning everywhere and GNSS-based localization is one of the solutions adopted for solving this problem. GNSS-based positioning is easy to use and globally available; however, it is not reliable (if not unusable) in some specific situations, such as in dense urban areas. Urban areas are characterized by high densities of devices. In such scenarios, GNSS navigation suffers for the limited visibility of the satellites and for the presence of multiple outliers. Multiple outliers rejection is a hot topic and several solutions have been proposed: one of the most promising is based on Fault Detection and Exclusion (FDE) techniques Kuusniemi (2005), Borio and Gioia (2016). This methodology allows the identification and exclusion of an erroneous measurement. FDE techniques were initially developed for single outlier rejection, which makes them unusable in urban navigation. Several works have proposed an iterative application of FDE methods in order to deal with multiple outliers. In environments where the presence of multiple outliers is common and the total number of available measurements is limited, the adoption of FDE techniques could be problematic, since exclusion of several measurements can cause a significant degradation of satellite geometry conditions; in addition, the performance of FDE techniques is reduced when a low number of measurements is available.
A possible solution is the identification of blunders and the replacement of such measurements with observables provided by a nearby device. Such solution exploits the availability of a large number of devices in a small geographic area; measurement replacement can compensate for the geometry degradation due to the rejection of multiple satellite signals. A first attempt in this research direction was described by Minetto et al. (2017).
Collaborative positioning techniques are already a reality; they can be classified in transponder-based and GNSS-based approaches (Muller 2017). All the approaches are strongly impacted by signal reflection or blockage and unsynchronized clocks: these factors make practical implementations difficult (Blumenstein et al. 2015;Frattasi and Rosa 2017). Positioning exploiting vehicle to vehicle (V2V) communication was demonstrated in Qiu et al. (2015); in order to improve the accuracy of a target vehicle, a method exploiting measurements from surrounding vehicles was proposed in Muller (2017). A complete review of the available cooperative positioning approaches using wireless communications is available in Blumenstein et al. (2015) and Frattasi and Rosa (2017). Cooperative GNSSbased approaches exploit the relative positioning concepts with methods based on measurement double-differences Lassoued et al. (2016), Alam et al. (2013). Also, this method suffers degradations in urban areas as highlighted by Liu et al. (2014). To fill this gap, a two-level quality check on differential measurements was proposed in Zhang et al. (2019). This paper analyzes the potential of smartphone-based cooperative positioning and considers three approaches based on absolute positioning. The three methods assume the presence of two devices: the aiding and the aided smartphone. The aiding smartphone provides different types of information to the aided smartphone. In this respect, the three methods are: -DMS, where the aiding device provides its raw observations to the aided smartphone. In this case, the aided device needs to estimate an extended position, velocity, and time (PVT) solution that includes the clock parameters of the aiding receiver; -AMS, not only raw observables are shared but also clock parameters and their accuracy. -CMS, in this case corrected observables are shared.
Specifically, measurements of the aiding device are at first corrected for the clock bias.
The proposed methods allow the joint use of measurements collected by mobile devices operating in an independent mode and thus not connected to the same external clock. Thus, in order to jointly use measurements from different devices, the observations have to be time aligned. The proposed methods can be exploited to increase the number of tracked satellites and to replace erroneous measurements. In the first case, the measurements of the aiding device can be used to create a synthetic sky enhancing the dilution of precision (DOP) . In the second case, when a measurement is identified as an outlier, it can be replaced with the corresponding observation from a nearby device. Note that the methods proposed are different from single-antenna batch processing where several measurements from the same device but from different epochs are combined in a single solution. In this way, measurements are considered in batches. This type of approach is effective when it is possible to share common conditions between the measurements: these assumptions are not required in the proposed cooperative methods since measurements are collected in a simultaneous way and no dynamic model or static conditions are required. The models used in the cooperative approaches also impose conditions on the clock unknowns: such conditions are not adopted and are not required in batch processing. Finally, the paper focuses on the algorithm development: the application of the methods in real-time is left for future work; in particular, the adoption of a specific network infrastructures for measurement sharing is not investigated. This paper is an extension of Gioia and Borio (2019) where the following elements have been added with respect to the conference work: -Complete description of the mathematical models; -Geometric evaluation with the advantages and drawbacks of the three methods; -An additional PVT solution has been included as the comparison term. This solution is obtained simply excluding possible outliers; -Evaluation of the possible impact of the device model and OS, -Assessment of the performance as a function of the number of excluded satellites.
The developed navigation algorithms are tested in both static and dynamic conditions using GPS single-frequency (L1 only) observations. The experimental results show the benefits of measurement sharing, which can improve the availability and the reliability of the final PVT solution.
The remainder of the paper is structured as follows: in "Navigation algorithm and cooperative approaches", the navigation algorithms are described; the data collections and the experimental setup are described in "Experimental setup". Experimental results are analyzed in "Experimental results"; finally, "Conclusions" concludes the paper.

Navigation algorithm and cooperative approaches
In this section, the cooperative approaches are presented.

Stand-alone navigation algorithm
The stand-alone single point positioning (SPP) algorithm is based on the pseudorange equation: where d is the distance between satellite and receiver; cdt s is the satellite clock error, cdt r is the receiver clock bias; e orbital is the satellite orbital error; d I ono and d T ropo are the ionospheric and tropospheric errors; ρ contains the unmodelled errors.
All the error terms are either modelled or neglected thus leaving four unknowns which are the three receiver coordinates, included in the d term, and the clock bias, cdt r .
The measurements are used to estimate receiver position using a weighted least squares (WLS) technique solving a non-linear set of equations derived from Eq. 1. The solution is obtained through a linearization process leading to the following update equation: where x is the state vector containing the receiver coordinate and the clock parameter updates, z is the vector containing the difference between predicted and measured pseudoranges, and W is a diagonal weighting matrix with weights related to satellite elevation Angrisano et al. (2013). Finally, the algorithm is implemented in the East North Up (ENU) frame and H is the design matrix (Parkinson et al. 1996); for the stand-alone case, the rows of the design matrix are given by Hoffmann-Wellenhof et al. (1992): where el i and az i are the elevation and azimuth of the ith satellite.
The stand-alone algorithm also includes a block for outlier rejection, where the measurement set consistency is tested using a global test (GT); if such test fails, the measurement associated to the largest residual is excluded from the solution computation. The FDE approach used in this paper is briefly summarized in the next section.

Fault detection and exclusion
The presence of outliers is a fundamental factor preventing the usage of smartphone devices for high-accuracy applications. Environmental conditions and hardware imperfections can cause unpredictable range errors degrading the navigation solution. Hence, a method to identify and exclude possible outliers is necessary: these methods are usually identified as FDE techniques. Although FDE adds complexity to the navigation algorithm, it is an essential part of integrity monitoring and reliability assurance. In this research, the FDE technique described below has been adopted.
To detect a blunder within the measurements, the residuals of the WLS navigation solution are statistically tested using a set consistency check called GT Kuusniemi (2005). In the GT, the following hypotheses are considered: Consistent measurement set Alternative hypothesis (H 1 ) : Outliers are present . (4) The decision statistic: is built as a quadratic form of the residuals, weighted by the weighting matrix W , r is the vector of residuals defined as: Under H 0 , i.e., in the absence of outliers, the residuals can be modelled as zero mean Gaussian random variables, and D follows a central chi-square distribution with m − n degrees of freedom. The parameter m − n is the redundancy of the system defined as the difference between the measurement number, m, and the number of unknowns, n. D is compared with the decision threshold, T G : where the notation χ 2 1−α,(m−n) indicates the abscissa corresponding to a probability value 1 − α of a χ 2 distribution with (m − n) degrees of freedom. T G is set in order to have a error type I probability, i.e., the probability of erroneously declaring the presence of outliers, equal to α.
In the GT, the decision is taken as follows: If H 1 is accepted, an inconsistency in the measurement set is assumed, and outliers should be excluded. In this research, the exclusion is performed using the standardized residuals, w i , as decision variables: where r i is the residual of the i th satellite and (C r ) ii is the i th diagonal element of the residual covariance matrix. The measurements with the largest standardized residuals are excluded; multiple exclusions can be performed from one up to m − n + 1.

Cooperative approaches
The cooperative approaches proposed share a common algorithmic structure as shown in Fig. 1. The blocks shared with the stand-alone case are shown in blue, while the green blocks are the functional elements of the cooperative approaches. In both stand-alone and cooperative cases, an FDE block is present after the navigation solution. In the cooperative cases, FDE is performed twice: at first to identify blunders in the original solution computed by the master device and a second time to verify the consistency of the shared measurements. This strategy allows the identification of possible outliers shared by the aiding device. If outliers are shared by the aiding device, they should be rejected when the integrity algorithm is carried out using the measurements from both devices. Hence, if a shared measurement is considered as an outlier, the navigation solution is computed using the classical singledevice approach with a reduced measurement set. Hence, FDE is also used to detect measurements coming from too far devices.

DMS
In the DMS approach, the aiding device shares directly its pseudoranges whose equation can be written as: where cdt r B is the clock bias of the aiding devices. Subscript B is used to identify quantities related to the aiding device whereas index A qualifies quantities derived from the master device The measurements from the aiding device are used by the aided smartphone and integrated in a new navigation solution, which has a structure similar to that of the standalone navigation approach but with a modified design matrix. In particular, each row of the DMS design matrix has now five elements: where a and b are used to take into account the contribution of the clock bias, which comes from either the aided or the aiding device. a is 1 if the pseudorange comes from the master (aided) device or zero otherwise. b = 1 − a is 1 Fig. 1 General diagram of the cooperative algorithms developed when the measurement is provided by the aiding device and 0 otherwise. In this case, the state vector contains five elements: the three coordinates of the master device and the clock biases of the master and aiding devices. Hence, a total of five unknowns needs to be estimated: one of the measurements shared by the aiding device has to be sacrificed to estimate the additional unknown.
Since the measurements of the two devices are not time aligned, the pseudoranges provided by the aiding device are synchronized to that of the master device using Doppler shift observations. Specifically, pseudoranges are propagated as: where ρ B (t B ) is the pseudorange of the aiding device computed at time, t B ; T = t A − t B is the difference between the measurement time of the two devices, Doppler is the Doppler shift in hertz, and λ is the signal wavelength in meters. T is computed considering the time stamps of the measurements of the master and aiding device. In order to have simultaneous measurements, the pseudoranges are linearly interpolated using Doppler measurements. Linear interpolation allows the correction of first-order terms: since the observed T are significantly lower than 1 ms, higher order effects can be neglected.
In terms of information sharing, the DMS approach requires the aiding device to provide, for each position solution, K pairs of measurements. Where K is the number of replaced measurements. Each pair of measurements is made of a pseudorange and a Doppler observation, which are time-stamped.

AMS
In this approach, the devices share the raw observables and the clock parameters estimated by the aiding device. The pseudoranges of the aiding device are modelled as in Eq. 10. As for the DMS case, the state vector contains five unknowns. As mentioned in "DMS", one of the limits of the DMS is the presence of an additional unknown that reduces the benefits of a replaced observable. In order to enhance the effect of the additional observables provided by the aiding device, the clock parameter estimated by the aiding device is used as additional measurement. The measurement vector, in this case, becomes: where z is the measurement vector containing the difference between the predicted and observed pseudoranges, and cdt r B is the estimate of the clock bias of the aiding device. The design matrix needs to be modified with respect to that of the DMS case to take into account the inclusion of the additional measurement, which directly observes one unknown. The design matrix is built as: where H DMS is the design matrix defined in Eq. 11.
Finally, also the weighting matrix needs to be modified: N rmeas is the number of available pseudoranges, σ cdt r B is the variance of the clock parameter estimated by the aiding device.
In AMS, also the clock parameter needs to be propagated to the measurement time of the master device. The clock bias propagation is performed using the following relationship: whereċ dt r B is the clock drift estimated by the aiding device using Doppler shift measurements.
In the AMS, in addition to the K pairs of measurements, the aiding device needs to share its clock bias and drift values. The related accuracies are also shared. This is equivalent to share K + 2 pairs of measurements.

CMS
For the CMS, the aiding device shares the pseudoranges already corrected for the clock bias. Hence, the relative equation is: (17) The rows of the design matrix relative to the shared pseudoranges are: where h is the index identifying the shared measurement. In this case, the pseudorange is used only to estimate the receiver coordinates.
Measurements are time aligned using the procedure described above and based on Eq. 12.
In this case, the same amount of information shared in the DMS approach is needed. Indeed, K pairs of measurements are shared.

Experimental setup
In order to demonstrate the effectiveness of the developed approaches, several experiments have been conducted in different scenarios, including static and kinematic tests.

Static test
The static test was conducted under open sky conditions using the setup shown in Fig. 2. For the test, a set of four Android phones was used: three devices running Android 8 and one device equipped with Android 7; two devices are from the same manufacturer and of the very same model, the only difference is the OS: one of the two runs Android 8 while the other is equipped with Android 7. The phone used and their OSs are: -Samsung S8 with Android 8, -Huawei P10 with Android 7, -Huawei P10 with Android 8, -Xiaomi Mi-8 with Android 8.
During the test, the devices were placed inside a shielding box which was connected to a geodetic antenna placed on the rooftop of an office building. The input of the shielding box was directly connected to the rooftop antenna that was externally powered. The shielding box integrates a wideband passive antenna able to rebroadcast signals with very limited attenuation. The antenna occupies the whole Fig. 2 Experimental setup adopted for the static test. a Schematic representation of the test setup. b Views of the actual implementation of the setup. MP stands for mobile phone internal plate of the box: the phones were directly placed on such plate further reducing attenuation. For this reason, no signal repeater was needed Rohde (2015). In this setup, all the four devices should determine a common position, the one of the rooftop antenna, allowing direct replacement of the measurements. The length of the data collection was about 9 h. This experiment allowed the computation of statistically significant error indicators. Moreover, the impact of using devices with different OSs was validated.

Kinematic test
In order to validate the proposed methodologies in more realistic conditions, an experiment considering kinematic users with devices not connected to the same antenna was performed. For a more realistic scenario, the test was carried out considering moving not co-located users and environmental changes including masking due to the body movement (hand oscillations during the walk).
In this case, only two devices were used: the Samsung S8 with Android 8 and the Huawei P10 with Android 7. The mobile phones were carried by pedestrian users in a mixed environment, including open-sky conditions, passages under trees, and in the vicinity of reflecting buildings as shown in Fig. 3 b. The total duration of the data collection was about 12 min (733 s). At the beginning of the test, the users were static for 2 min. Then, the users performed two laps following the squared path shown in Fig. 3. The reference trajectory was computed using a GNSS receiver placed between the users as shown in Fig. 3 a. The kinematic test was conducted with a separation between the antennas of the two cooperative devices of about 2 m. Such a distance could be considered representative of the distance between pedestrian users moving in cities.
The antenna of the device used for the generation of reference trajectory was placed on the shoulder of one of the two users. Considering the overall accuracy of the methods, this solution was considered a good compromise between the accuracy needed for the reference trajectory and the complexity of the setup.

Experimental results
In this section, the results obtained using the proposed approaches and the data collected in static and kinematic conditions are presented. The results are analyzed in terms of: -Geometry. Specifically, H DOP defined as the difference between the horizontal dilution of precision (HDOP) obtained using the stand-alone approach and the different methods are considered.
-Reliable availability, defined as the percentage of time in which the solution is declared reliable by the integrity algorithm. -Percentage of recovered solutions computed as: where NRel Sol is the number of solutions passed from unreliable to reliable using a cooperative approach, NUnRel Sol is the number of unreliable solutions in the stand-alone case. -Position accuracy: the horizontal and vertical errors are considered and their cumulative distribution function (CDF) and mean are evaluated.

Static results
In this section, results relative to the static test are discussed. An overall analysis valid for all the combinations of devices and methods is performed. At first, geometric conditions are analyzed, then the solution reliability is considered. While all the possible combinations considering all the devices as master and aiding devices were analyzed, some configurations are not discussed in the following in order to avoid repetition of similar findings.
In the upper box of Fig. 4, HDOP differences are plotted as a function of time where a single measurement replacement has been considered. Only three cases are considered since the CMS has the very same geometry of the stand-alone case. The figure clearly shows the degradation of geometry due to the additional unknown in the DMS case; this degradation is due to the fact that the additional measurement mainly contributes to the estimate of the additional unknown. The very same degradation is observed when the outlier is simply removed: the blue and red dashed lines are coincident. Hence, no geometric advantages are observed in the case of a single measurement replacement. For the AMS, a smaller increase of the HDOP value is observed; this phenomena is due to the introduction of the additional equation observing the clock bias of the aiding device.
The reliable availability of the PVT solution is shown in Fig. 5. In the diagonal boxes, the reliable availability obtained using the measurements from a single device is shown (red bars). Although, the data collection is performed in the very same environment, the reliable availability varies between 75 and 93%. These extreme values are obtained using the two P10 devices with Android 7 and 8 as OSs, respectively. The differences in terms of reliable availability obtained using data from single devices may be due to hardware imperfections. The quality of GNSS measurements obtainable from Android smartphones is strongly affected by the characteristics of the GNSS antenna, which has to coexist with those of other communication systems (WiFi, Bluetooth, etc.). Moreover, mobile phones include different sensors and GNSS signal reception can be interfered by different hardware elements that can degrade the performance of the integrated GNSS receiver (Fortunato et al. 2019). On each row of Fig. 5, the off-diagonal boxes show the reliable availability obtained using the three cooperative approaches and the value obtained simply excluding a measurement. Each device in the vertical boxes acts as an aiding device while the row defines the master device.
The benefits of cooperative positioning methods in terms of solution reliability are evident: the larger benefits were observed for the P10 phone with Android 7 (box in the upper left corner of Fig. 5), which showed the lowest initial reliable availability. When a cooperative approach is implemented, an improvement between 11 and 21% is obtained. For the devices with an initially high reliable availability, only a limited enhancement has been observed, between 3 and 5%. The proposed methods provide similar performance and no significant differences can be appreciated. Also, the solution obtained simply excluding a measurement increases the reliable availability and provides an improvement similar to that of the cooperative approaches. This is due to the single measurement exclusion: in the case of multiple outliers rejection, the solution reliability is strongly reduced when no measurements are shared.
The performance in the position domain is evaluated considering the CDF of the horizontal and vertical errors. For the vertical error, the absolute value is considered. The model and the OS of the device can play a role in the performance of the cooperative approaches. Each device is characterized by a different chipset (depending on the model) and a different OS, which implements the Application Program Interface (API) for generating and retrieving GNSS raw measurements. Different authors Gogoi et al. (2018), Jahn et al. (2019) have recently shown that the Android version impacts measurement generation and, for example, code measurement ambiguities were often observed in phones using Android 7 (Warnant and Warnant 2018). While it is difficult to determine the causes of such phenomena, this paper empirically characterizes them supporting the fact that different OSs can lead to different measurement accuracies. A contribution of the paper is indeed the investigation of such effects. In order to investigate the issue of merging measurements from different devices equipped with different OSs, three cases are considered in the following: -Same device model with different Android versions, -Different device models operating the same Android version, -Different device models equipped with different Android versions.
In order to evaluate the impact of the number of replaced measurements, cases from one to five replaced/excluded measurements are considered.

Same device operating a different Android version
In this section, the results obtained merging the measurements of two devices of the same model (Huawei P10) but with two different Android versions (7 and 8) are presented. The P10 device with Android 7 is considered a master device.
The percentage of recovered solutions, defined as the percentage of epochs passing from unreliable to reliable, as a function of the number of measurements replaced (or simply rejected) is shown in Fig. 6 a. From the figure, it clearly emerges that the simple exclusion provides results similar to those achieved through cooperation only in the cases of one or two excluded measurements. In these cases, all the approaches are able to recover between 81 and 86% of the solutions. When the number of outliers grows, the capability to recover solutions remains constant for the cooperative approaches (about 88%), while it rapidly decreases for the simple exclusion method. This effect is due to the reduced redundancy, which affects the integrity algorithm performance. Similar results can be observed considering the reliable availability as a function of the number of replaced measurements in Fig. 6 b. The reliable availability of the cooperative approaches remains constant also in the presence of multiple outliers, while for the case of the simple exclusion method the reliable availability converges toward the value obtained using the single device.
In the four boxes of Fig. 7, the CDF of the horizontal position errors obtained for the different cooperative methods is compared with respect to the stand-alone solution (blue line). For each methodology, five cases with a different number of excluded measurements are considered. For all the cooperative approaches, the benefits are evident: the curves are higher than the stand-alone one and only small differences are visible among the different curves. For the DMS case, the probability of having an horizontal error lower than 10 m varies between 91.15% (one measurement replaced) and 93.73% (five measurements replaced). For the AMS and CMS cases, similar values are observed, with variations between 91.9% for the CMS case with one replaced measurement and 93.93% for the AMS case with five measurements replaced. A different behavior has been observed when the measurements are rejected and not replaced (bottom right box): the curves considering one or two exclusions are higher than the stand-alone solution, and when up to three exclusions are performed the curves are practically coincident. When more than three measurements are excluded, a degradation in the position solution is observed; such a behavior is due to the geometric degradation caused by the rejection of measurements.
In the four boxes of Fig. 8, the CDFs of the vertical errors for the positioning methods are compared with the standalone solution (blue line). Also for the vertical errors, the benefits of the cooperative approaches are evident, while the methods excluding measurements without replacement suffer for the geometry degradation due to multiple rejections.
In order to have a more direct comparison among the implemented methods, the mean horizontal and vertical errors as a function of the number of replaced measurements are shown in Fig. 9. The benefits of the cooperative approaches are evident for both horizontal and vertical errors: the first passes from 7.7 m for the stand-alone case (black dashed line) to about 5 m. Only small differences can be noted between the cooperative methods, the degradation Fig. 7 CDFs of the horizontal positioning error considering the three cooperative approaches and the solution obtained excluding outliers. Static experiment. "Repl Meas" is short for replaced measurement Fig. 8 CDFs of the vertical positioning error considering the three cooperative approaches and the solution obtained excluding outliers. Static experiment. "Repl Meas" is short for replaced measurement due to the measurement rejection is clearly visible: the violet line in Fig. 9 represents the case where only measurement rejection is implemented and an increasing trend as a function of the number of rejected measurements can be observed.
From these results, it emerges that even if the devices operate different Android versions, the cooperative approaches are effective in limiting the positioning errors and improving the reliability of the solution.
The results of the static test merging measurements from two similar devices equipped with a different OS are summarized in Table 1. The results are computed considering the case with a single measurement excluded/replaced and a second condition with five replacements/exclusions. In the second case, cooperation provides 10% reliable availability advantage with respect to simple exclusion and more than 20% with respect to the stand-alone approach. The median horizontal and vertical errors are also improved with respect to the stand-alone approach with exclusions: for the second case, a reduction of about 7 and 5.3 m can be noted for the vertical and horizontal components , respectively.

Different devices operating the same Android version
In order to verify the effectiveness of cooperative methods when merging measurements from different devices, the results obtained considering two different phone models (P10 and Mi8) are presented in this section. The P10 is considered a master device while the Mi8 is the aiding device; both devices were equipped with Android 8. In Fig. 10 a, the percentage of recovered solutions as a function of the number of replaced measurements is shown for the four implemented algorithms. When a single measurement is replaced, about 96% of the unreliable solutions became reliable excluding a single measurement or using the DMS; a smaller improvement, about 85%, is observed for the other two cases. The reduction of performance of the method that does not replace measurements is clearly visible when the number of exclusions increases: the percentage of recovered solutions passes from 96% with only one measurement excluded to 17% when up to five measurements are removed. This behavior is also reflected in the reliable availability of the solution in Fig. 10 b: the value remains constant for the cooperative approaches while it is reduced for the case where the measurements are not replaced.
The CDFs of the horizontal and vertical positioning errors for the static test considering P10 as master device and Mi8 as aiding device are shown in Figs. 11 and 12, respectively. In both cases, the advantages of cooperative approaches are evident; the degradation due to the geometry reduction is visible for the case where the measurements are not replaced by observations of a nearby device.
In order to have a direct comparison between the positioning methods, the mean horizontal and vertical errors are shown in Fig. 13 as a function of the number of replaced measurements. For the mean horizontal error, a reduction of about 2 m is visible when a single measurement is replaced. For the cooperative methods, this improvement remains constant also when multiple measurements are replaced, whereas it increases when only rejections are implemented. A similar behavior can be observed in the vertical channel where the reduction is of about 3 m.
For the three cooperative approaches, no impact related to the use of different phone models has been found.
The results of the static test merging measurements from two different devices with the same OS are summarized in Table 2. In this case, an improvement of about 5% in terms of reliable solution availability can be noted when using the cooperative approaches. The median horizontal and vertical errors are also improved with respect to the stand-alone case with only exclusions: for the case of 5 replaced measurements, a reduction of about 3 and 5 m can be noted for the vertical and horizontal components, respectively.

Different devices operating different Android versions
In this section, the effectiveness of cooperative methods in merging measurements from different devices and operating two distinct Android versions is evaluated. The results Fig. 12 CDFs of the vertical positioning error considering the three cooperative approaches and the solution obtained excluding outliers. Static experiment, P10 aided by Mi8. "Repl Meas" is short for replaced measurement Fig. 13 Mean horizontal (part a) and vertical (part b) positioning errors as a function of the number of replaced measurements. Static experiment with P10 aided by Mi8 obtained considering two different devices (P10 with Android 7 and Mi8 with Android 8) are presented. The P10 is considered a master device while the Mi8 is the aiding device.
The percentage of recovered solutions as a function of the number of measurements replaced is shown in Fig. 14 a. The benefits of cooperative approaches are evident, since about 66% of the unreliable solutions becomes reliable after measurement replacement. The final solution reliable availability is improved of about 16% as shown in Fig. 14  b. A small reduction (about 5%) of the solution reliable availability can be observed by comparing Fig. 6 (P10 Android 7 aided by a P10 Android 8 device) and Fig. 14 (P10 Android 7 aided by the Mi8 Android 8 device). This reduction is probably due to the higher inconsistency between the measurements provided by the two devices.
Although a small reduction of the reliable availability is observed with respect to the first case analyzed, the positioning performance in terms of CDFs of the horizontal and vertical errors is similar. The CDFs of the horizontal and vertical errors considering the four positioning methods and up to five excluded measurements are shown in Figs. 15 and 16, respectively. The probability of having an horizontal error lower than 10 m is increased of about 15.5% for all the cooperative approaches. In the vertical direction, a similar improvement is observed considering errors smaller than 15 m.
A reduction of the mean horizontal error of about 2.7 m has been observed applying the cooperative approaches as shown in Fig. 17 a. From the lower part of the figure, the advantages in terms of mean vertical error can be appreciated; specifically, a reduction of about 4 m is visible using cooperative approaches.
Similar results were obtained also in the case where the Mi8 is considered a master device and the P10 is considered an aiding device. In particular, the proposed cooperative approaches provide improved performance with respect to the stand-alone SPP algorithm. From Fig. 18, a small degradation can be noted when replacing more than one measurement: this effect is due to the quality of the replaced observations.
The results of the static test merging measurements from two different devices with a different OS are summarized in Table 3. From the table, the benefits in terms of reliable availability and accuracy clearly emerge. For the cooperative methods, the minimum improvement in terms  of solution reliable availability is about 15% while for the case of the stand-alone approach is only 9%. The median horizontal and vertical errors are also improved with respect to the stand-alone case: considering the five replacement case, a reduction of about 7 and 5 m can be noted for the vertical and horizontal components, respectively (Fig. 19).

Kinematic results
In this section, results relative to the kinematic test are discussed. For the kinematic data collection, two mobile phones were used: P10 with Android 7 and S8 with Android 8. In Fig. 20 a, the difference of HDOP with respect to the stand-alone algorithm is plotted as a function of time.
As for the static case, the degradation of geometry (about 0.2) due to the additional unknown in the DMS case can be noted; the very same degradation is observed when the outlier is simply removed: blue and red dashed lines are coincident. The introduction of an additional measurement causes a smaller HDOP reduction (about 0.1) as observed for the AMS case.
The mean HDOP difference as a function of the number of replaced measurements is shown in Fig. 20 b; also in the kinematic case, the benefits of the DMS are evident when more than one measurement is replaced.
Results obtained in terms of reliable availability considering only one replacement are shown in Fig. 21. With respect to the static case, single-device solutions are characterized by a lower reliable availability. This is due to the user dynamics and to the presence of obstacles such as trees and buildings: these effects lead to a solution reliable availability lower than 80% for both devices.
In both configurations, the replacement of a single measurement leads to an increased reliable availability:   Fig. 19, the solution reliability as a function of the number of replaced measurements is shown. The advantages of the cooperative methods are evident when more than one outlier is present. An improved solution reliability in the order of 10% is obtained with the three proposed methods.
The CDFs of the horizontal and vertical errors are shown in Figs. 22 and 23, respectively. The advantages of the cooperative approaches are confirmed also in the kinematic experiment; the probability of having a horizontal error lower than 10 m, p 10 , is increased with respect to the stand-alone case of more than 20% with the best results for the AMS and CMS cases. No significant differences can be appreciated between these methods. Also, the simple measurement exclusion provides advantages but a performance reduction is evident when more than one measurement is rejected: p 10 passes from 74% with one excluded measurement to about 61% in the case of three  A direct comparison between the implemented methods in terms of mean horizontal and vertical error as a function of the number of replaced measurements is performed in Fig. 24. In both cases, the advantages of cooperative approaches with respect to the stand-alone solution are  clear: a reduction of about 2 m for the horizontal case can be noted; the reduction for the vertical direction is more evident, about 4 m. Also, in this case, the mean errors remain constant when multiple measurements are replaced. The simple exclusion method provides improved performance with respect to the stand-alone solution, but when multiple rejections are performed an increase of the mean error is visible. Differently, from the static case, the line relative to the simple exclusion method is lower than that of the stand-alone case also with three excluded measurements.
Results of the kinematic test are summarized in Table 4. The table confirms the advantages of the cooperative methods in both terms of accuracy and solution reliability with respect to the stand-alone case with exclusions. In particular, with more than 2 outliers, the stand-alone approach is not able to improve the reliable availability: this is due to the limited number of available measurements that limits the capacity of the FDE technique.

Conclusions
In this paper, three methods for cooperative positioning, namely DMS, AMS, and CMS, have been described and tested. Specifically, mathematical models have been provided along with the advantages and drawbacks of the three methods. The possible impact of the type of device and OS has been evaluated; finally, performance has been assessed as a function of the number of excluded satellites.
The effectiveness of cooperative methods has been demonstrated using real data collected in both static and kinematic conditions. For the static test, four smartphones were placed in a shielding box and shared a common antenna. This test was conducted in order to evaluate the ability of cooperative positioning to cope with different clock biases and drifts. For the kinematic experiment, pedestrian users were performing close trajectories.
All the tests showed the advantages of cooperation: in static conditions, the reliability of the solution was improved through cooperation. An improvement between 3 and 21% has been observed. The level of improvement is determined by the quality of the measurements used as aiding. Measurements of poor quality are however useful to improve solution availability when a limited number of observations are available to the master device. All the approaches are able to recover between 81 and 86% of the unreliable solutions. A reduction of the mean horizontal and vertical error has been observed when cooperative approaches are implemented. In kinematic conditions, the reliable availability is increased between 13 and 25%. A difference (about 12%) among the cooperative approaches was observed and is due to the different strategies adopted to account for the clock bias of the aiding device. In cooperative approaches, the mean horizontal and vertical position errors remained constant when multiple measurements were replaced. This shows that if the separation of the phones is in the same order of the accuracy of the measurements, position errors are not degraded with respect to smartphones operating in stand-alone mode.
The cooperative approaches were also compared with the solution obtained simply excluding outliers. From the comparison, it emerged that in the presence of a single outlier the methods have similar performance. While when multiple measurements are rejected, cooperation allows one to overcome the geometric degradation due to the reduced number of available measurements. The benefits of the cooperative approaches are demonstrated in terms of both reliable availability and accuracy.
For the tests conducted, four different smartphone models with different Android versions were used. The results were similar and no significant differences were observed when using different pairs of devices. Hence, exploiting the proposed approaches a user can process observables provided by the equipment of close peers. Therefore, even less accurate devices could be able to achieve the accuracy level similar to that obtained by a more precise device. On the other hand, the latter devices will help the former to obtain a continuous and accurate PVT in environments where a single-device solution might not be sufficient. The cooperative approaches have been implemented and tested offline. Future developments include real-time operations, where devices share measurements using a local connection based on WiFi and/or Bluetooth. In a WiFi-based implementation, the aided (master) device can activate a WiFi hotspot: measurement sharing can be implemented via a simple socket connection (Android Java APIs provide both Server and Client Socket implementations). Other possible implementations can be based on the Android WiFiP2pManager class for peer-to-peer (P2P) communication between devices.
The availability of new multi-frequency device will allow the investigation of generalized cooperative approaches using dual-frequency measurements.

Compliance with ethical standards
Conflict of interest The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creativecommonshorg/licenses/by/4.0/.