# A Real-Time GNSS/PDR Navigation System for Mobile Devices
## 1 Introduction  
Nowadays, thanks to the technological development and the mass diffusion of mobile devices, there is an increasing interest in those applications that allow users to keep track of their movements and provide location-based services. Thanks to the development of micro electro-mechanical systems (MEMS) technology, mobile devices are equipped with increasingly cheaper and smaller sensors. Positioning and navigation solutions are generally provided by global navigation satellite systems (GNSS). These systems, together with the help of mobile networks, allow to obtain a position solution with bounded errors in a relatively short time, but its prolonged use leads to a rapid drain of the battery and its performance can strongly decrease in those environments that do not present an open sky visibility of the satellites. This is in contrast to the needs of users, whose interest is to have both the positioning service also available in harsh environments such as the urban one and a battery life that can cover the whole day. In addition to the GNSS receiver, most portable devices (e.g., smartphones) include sensors such as accelerometer, gyroscope and magnetometer. These additional sensors allow to estimate intensity and orientation of the user's motion without relying on external infrastructure. By exploiting the computing resources of the processors and the low energy consumption of these sensors, some manufacturers may also implement additional features in the devices such as fall detection and step counting, providing useful information on the user's quality of life [1]. In this work, after a review of the state of the art of the pedestrian dead reckoning (PDR) navigation techniques, we propose an algorithm for a real time identification of the user's motion direction by exclusively exploiting the data coming from inertial sensors, and therefore with low energy consumption. We will also show how to smartly merge thisinformation with GNSS data in order to achieve a twofold objective: increasing the accuracy of the position solution and saving energy at the same time by using the GNSS sensor efficiently. With respect to the state of the art concerning the integration between GNSS and inertial navigation systems [2; 3; 4], the present work proposes a real-time implementation of an integrated GNSS/PDR framework which provides several advantages: firstly, a smart trade-off between accuracy and energy consumption; then, the independence from the body-worn location of the smartphone; finally, a compensation strategy of the systematic errors that are committed on the step-length estimation and the determination of the motion direction. Figure 1 illustrates the block diagram that highlights the operation of the proposed system:  
The data coming from the magnetic, angular rate, gravity (MARG) sensor, which is composed of a triaxial accelerometer, gyroscope and magnetometer, is processed by a suitable Madgwick filter in order to obtain the orientation of the mobile device in a fixed North-East-Down (NED) frame; then, the acceleration in NED frame is exploited to identify the single steps, which are used as a trigger signal to drive an algorithm for the estimation of the heading angle of the walk; finally, the data coming from the GNSS is integrated with MEMS data in order to determine the user position. The algorithm for the heading estimation is event-driven, in fact it is essential to identify every single step for determining the direction of advancement of the user's motion. In Section 2 materials and methods used to obtain the proposed GNSS/PDR navigation system are illustrated; in particular, the treatment of the methods has been divided into the determination of the device orientation (Section 2.2.1), the step detection (Section 2.2.2), the determination of the motion direction (Section 2.2.3), the step length estimation (Section 2.2.5) and the GNSS/PDR integration (Section 2.2.6). Section 3 describes and discusses the results obtained; finally, Section 4 shows the conclusion of the presented work.