# A Real-Time GNSS/PDR Navigation System for Mobile Devices
## 2 Materials and Methods
### Materials  
Mobile devices such as smartphones can differ on technical characteristics including computational power, storage capacity, and available sensors. In this work, a Realme 5 Pro model has been chosen as a mid-range smartphone in order to guarantee the functioning of the implemented system on as many devices as possible. All main technical characteristics of this device are shown in Table 1.  
The IMU used in this model of smartphone is the BMI160 [5] produced by Bosch. It has been designed for low power, high precision 6-axis applications in mobile phones, tablets, wearable devices, remote controls, game controllers, head-mounted devices and toys. When accelerometer and gyroscope are in full operation mode, power consumption is typically 925 \(\mu\)A, enabling always-on applications in battery driven devices. In this case is a 6-DOF IMU that includes a triaxial accelerometer and gyroscope. Another 3 DOFs are implemented by the triaxial magnetometer that is the _AK09918_[6] composed by a triaxial electronic compass IC with high sensitive Hall sensor technology. The Snapdragon 712 chipset of the Realme 5 Pro smartphone allows the access to the following satellite constellations: GPS, GLONASS, BEIDOU, GALILEO, QZSS, and the SBAS. In particular, the GPS, GLONASS, BEIDOU, and GALILEO constellations refer respectively to the American, Russian, Chinese and European global navigation satellite systems; QZSS refers to a regional navigation satellite system aiming to enhance GPS in the Asia-Oceania regions; SBAS refers to the satellite-based augmentation systems aiming to improve the accuracy and the reliability of the GNSS information [7]. An objective of the algorithm that integrates PDR and GNSS is to take rid of the non-stop use of satellite data in order to achieve energy saving. Therefore, it is necessary to choose an appropriate time interval between subsequent activations of the GNSS receiver. In order to obtain comparable data, it was decided to acquire the GNSS data (latitude, longitude, and accuracy associated to the position solution) on a continuous time basis and to implement a control logic to use the data in the algorithm at regular predetermined intervals with a predefined duty cycle. In this way, it was possible to run the GNSS/PDR algorithm multiple times on the same data in order to define the best time interval between subsequent activations of the GNSS receiver. It is necessary to consider that once the satellite receiver is switched on, it will be necessary to wait for a certain time interval to achieve the time to first fix (TTFF), which is a measure of the time required for a GNSS navigation device to acquire the satellite signals, decoding the navigation data, and to calculate a position solution. When smartphones are connected to the mobile network, the TTFF can be either more than a minute or less than a second depending on the type of assistance provided by the mobile network [8]. The system proposed for the integration between GNSS and PDR is suitable for a real time implementation; therefore, it was chosen to implement all the algorithms on Simulink visual programming of the Mathworks development environment. Figure 2 shows the Simulink diagram of the proposed GNSS/PDR system which assumes the GNSS data available at the initial time of the walk. The data generated by the accelerometer, gyroscope and magnetometer sensors are acquired at a sample rate of 100 Hz. This diagram illustrates the principal system blocks, from the data acquired by the sensors to the information provided as output: \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **Processor** & **Chipset** & **RAM** & **ROM** \\ \hline Realme 5 Pro & ProKyro 360 & Snapdragon 712 & 4 GB & 128 GB \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Technical characteristics of the smartphone used to acquire the data. 1. latitude and Longitude computed by the PDR only;
2. latitude and Longitude computed by the GNSS/PDR integration;
3. step counted by PLL;
4. distance evaluated by the GNSS/PDR integration.