Development of a Path Tracking System for GPS Denied Environment

Navigation applications such as Google Maps and Waze fail to function at global positioning system (GPS) denied environments. This is typically the primary problem faced by mountain hikers who have lost their way in a dense forest or a dementia patient who has lost his/her way. Navigation applications fail to function at places without internet signal. Also, a dementia patient may not be able to recall his original destination, rendering the GPS useless.The development of a path tracking system which does not rely on GPS is therefore necessary in such a situation. The system should be capable of guiding a person to return back to his/her original starting point without the requirement of a GPS. In this paper, we present the development of a path tracking system which exploits the inertial measurement unit embedded in a mobile phone. Doing so, the use of the GPS can be evaded. The system that we have developed consists of 3 main functions, i.e. (i) path recording, (ii) path navigation, and (iii) map generation. An SQLite database is setup in this application for storing data. Java libraries such as GraphView and Canvas are implemented to perform observation on the data obtained from the sensors and also to map the route according to the data stored into the device. The validation results show that the accuracy of the system is beyond 90%. The results convincingly corroborate the reliability and feasibility of the system.


INTRODUCTION
With the advent of the Global Positioning System (GPS), a person can easily find his/her way back to the original starting point by following the guidance given by the system (Poulose and Han 2019;Adege et al. 2018;Debeunne and Vivet 2020;Tran et al. 2007;Gustafsson et al. 2002;Cheah et al. 2016;Ali et al. 2020;Mamun et al. 2014).However, when one is lost in an environment which is deprived of internet connection, then the GPS would have ended becoming like a white elephant.This is typically the kind of problem that may be faced by mountain hikers or dementia patients who have lost their ways.Navigation applications such as Google Maps (Saibani et al. 2021) and Waze fail to function at places without the internet.A dementia patient may not be able to recall his original destination and, as a consequence of this, the GPS may render useless to him/her.Therefore, a path tracking device which does not rely on GPS has to be developed to disentangle a person from this kind of awkward situation.
Existing systems developed to track paths (Poulose and Han 2019;Adege et al. 2018;Debeunne and Vivet 2020;Tran et al. 2007;Gustafsson 2002) rely heavily on the GPS.The idea of forsaking the GPS when tracking the path is novel and, to the best of our knowledge, has not been reported in the literature.Here, we propose the development of a path tracking system which adopts an inertial measurement unit (IMU) to record the path taken by the user.In order to identify a person's location, two parameters, namely, the acceleration and the magnetic field strengths, are collected using an accelerometer (Ngatiman and Zuawi 2019;Falamarzi et al. 2019) and a geomagnetic field sensor (Li et al. 2013) in the IMU (Sultan et al. 2022).Since these two sensors are readily embedded in a mobile smart phone, the proposed path tracking system can easily be programmed into the phone.The system that we have developed consists of three main functions, i.e. (i) path recording, (ii) path navigation, and (iii) map generation.An SQLite database is setup in this application for storing data.Java libraries such as GraphView and Canvas are implemented to perform observation on the data obtained from the sensors and also to map the route according to the data stored into the system.

METHODOLOGY THE PATH TRACKING SYSTEM
The proposed path tracking system is programmed using Android Studio.Figure 1 depicts the graphical user interface (GUI) of the system.As can be seen from the figure, the interface consists of seven buttons -namely, 'path record', 'manual navigation', 'automatic navigation', 'compass', 'map generation', 'database', and 'reset database'.
When the user starts to embark on his journey, he is required to click at the 'path record' button in order to allow the system to trace and save the route that he will be traversing.As can be seen in Figure 2, the tracking device (which is a mobile phone, in this case) is then placed tightly into the trouser pocket close to the user's thigh, so as to detect his movement.The information of the path that the user has traversed is saved into the SQLite database and can be easily retrieved by clicking at the 'database' button.Likewise, the information can be erased (when the user no longer finds it useful) by clicking at the 'reset database' button.is to be put into the trouser pocket so that it can detect the movement of the leg If the user wishes to use the path tracking system to assist him to navigate back to his original destination, he can either click at the 'manual navigation' or 'automatic navigation' button.Both functions backtrack the route that the user has traversed and send out instructions to guide the user to travel back.The main difference between them, is that 'automatic navigation' sends out an instruction to the user spontaneously every time the user pauses; whereas, 'manual navigation' requires the user to click at the button himself in order to view the instruction.The system is also equipped with the compass function.This allows the user to identify his direction relative to the geographic cardinal directions.The system is also capable of plotting the route that the user has traversed.Hence, if the user chooses to visualize the path that he has taken, he can click at the 'map generation' button.
In a nutshell, the proposed path tracking system consists of 3 main functions, i.e. (i) path recording, (ii) path navigation, and (iii) map generation.It is able to trace the route that the user has traversed and, based on the records saved into its database, the system can progressively guide the user to navigate back to his/her starting point.The system also generates a map which shows the user's route.

PATH RECORDING
In order to record the user's path, the number of steps taken by the user (i.e., step count), the length for each step (i.e., step length), and the heading at each step (i.e., heading) are to be recorded.Since the path tracking system is developed for pedestrians, such as hikers or elderly patients who are suffering from dementia, the sampling frequency of both the accelerometer and geomagnetic field sensors is empirically set to be approximately 50 Hz.The frequency can, of course, be increased if the system is meant for tracking a person who is running.Doing so, however, will result in higher power consumption.
When the user starts to record his path, the accelerometer will detect the acceleration changes in each second and save them in an array list.The root mean square (RMS) of the three-axes acceleration data, a avg is computed based on (1) below, where a x , a y , and a z are, respectively, the acceleration values at the x-, y-, and z-axes.In order to measure the magnitude of the linear acceleration, the force of gravity has to be eliminated.To do so, a complementary filter with a time constant τ of 0.18 s was implemented.Every time the user raises the leg which consists of the path tracking system, the accelerometer will detect a peak.By this mean, the user is assumed to have taken 2 steps when the next peak is detected.This is because the user is required to move both his legs alternately before raising the same leg to stride again.The user's movements and their corresponding peaks can be obtained from GraphView, as depicted in Figure 3.In order to determine the total distance that the user has traversed, the number of steps is to be multiplied by the length for each step.Since the step length differs for different steps, as well as, different individuals, a constant parameter cannot be assigned for it.In our case, we have modified the bio-mechanical model proposed in Zhao et al. (2017) to estimate the step length SL, as shown in (2) below, where K is the constant calibration which varies from 0.4 to 0.7, depending on the magnitude of the peak from the accelerometer, and l is the leg length (in cm) which is measured from the ground to the waist of the user when he is standing straight up.This is to say that, the user is required to enter the parameter for his leg length l when the tracking system is initialized, as shown in Figure 4.
The user's heading or orientation at each taken step is determined by using the accelerometer in combination with the geomagnetic field sensor.Both these sensors provide the rotation matrix (Dai et al. 2018) which comprises the azimuth data.
(2) PATH NAVIGATION Path navigation helps to guide the user back to the starting point.The algorithm of this function is rather similar with that of the path recording, except that it works in exactly the reverse order.
The SQLite database stores the data recorded at each step -namely, the heading, step count number, and the travelled distance, and tags each of them with a unique identity number (ID).In order to guide the user to return to the starting point, the path tracking system has to identify the user's existing heading and the real-time data.This information is then compared with the data stored in the ID immediately before it.As shown in Figure 5, the system subsequently sends out instructions which dictate the user to adjust his heading towards the direction stored in the ID.Once he has orientated his position towards the appropriate direction, the system will then dictate the user to move forward, as depicted in Figure 6.The system will repetitively backtrack the ID and compare the data in it with the real-time data until it reaches the first ID. Figure 7 shows the final screen image of the system when the user returns to his starting point.It can be seen from the figure, that the "Navigation Complete" message will appear to notify the user that the system has arrived at the first recorded data.
As mentioned in the earlier section, the system is equipped with the 'manual navigation' and 'automatic navigation' functions.Although the nature of both functions is similar, we perceive that there is a need to have both to coexist in the system.The main reason for this, is because the path tracking system is placed in the pocket.If 'automatic navigation' is selected, the user is required to make use of another mobile phone to communicate with the system, so that the instructions from the system could be read.The hassle can, however, be saved if 'manual navigation' is selected, since the user can withdraw the device from his pocket from time to time to read the instructions.FIGURE 5.The system will first compare the user's heading with the direction of the route that he should take to return to the starting point.A message is then sent out to dictate the user to turn to the correct direction FIGURE 6.Once the user's heading is pointing at the correct direction, the system will then instruct the user to propel forward FIGURE 7. Once the user arrives at his/her destination, the 'navigation complete' message will appear on the screen MAP GENERATION Mapping employs the Canvas library to plot the lines that the user has traversed.It extracts the information of the step counts and the heading at each step from the SQLite database.The information is then used to generate a twodimensional map.The map presents useful information about the user's route and in the event the user loses his way, the map may come in handy when it is sent out to the search-and-rescue team.Figure 8 shows the route drawn by Google Maps when connecting 2 locations and that plotted by the system when the user traversed from the first location to the second.It can be observed that the route plotted using the path tracking system resembles closely that shown by Google Maps.Upon close inspection, it can also be seen that the route that the user has traversed comprises a string of red dots.The distance between 2 adjacent red dots represents 1 m.The dots help the user (or the search-and-rescue team) to estimate the actual distance for each path.It can also be observed from the inset in Figure 8(b) that the size of the map can be amplified if the user wishes to take a closer look at certain paths.Figure 9 illustrates the comparison of the actual distances and the average distances estimated by the system.It can be observed that the average estimated distances are in sufficiently close agreement with the actual distances.In fact, the path tracking system exhibits an accuracy range of 91.5 to 97.8%.Since the accuracy is beyond 90%, the evaluation convincingly corroborates the reliability and feasibility of the system.

CONCLUSION
A path tracking system which does not rely on the GPS has been developed.By making use of the inertial measurement unit, the system is able to determine and record the route taken by the user.The system is able to guide the user back by backtracking the data stored in the system and comparing it with the existing position and heading of the user.
Alternatively, the user can also refer to the map generated from the recorded data to return to his/her original point.

FIGURE 1 .
FIGURE 1. GUI of the proposed path tracking system FIGURE 3. Peaks are detected every time the user raises his leg FIGURE 8.The (a) intended route shown in Google Maps and the (b) map generated from the proposed path tracking system