Implementation of a Beacon-Enabled Mobile Indoor Navigation System Using Augmented Reality

: In last decade, expansion of mobile phones increased people’s usage of these devices. In parallel with the increasing usage rate, the number of developed applications increased for mobile phones. Thanks to mobile phones, many different fields have been affected. However, the biggest contributions of mobile phones are orientation and location finder services. Although people spend major time of their life in indoor areas, usage of navigation systems must be outdoors since these systems get coordinate information from satellites. In indoor areas, walls, and any object in a building cause wrong results or block navigation systems. In this study, orientation and location finder services for indoor navigation will be done by using accelerometer, compass and camera that have been already included in the phones and augmented reality technology for iOS based mobile phones and locations will be provided thanks to beacon Bluetooth devices.


INTRODUCTION
Mobile media, which have been a commonly used communication type in early 2000, have increasingly brought the smartphones to an important place.However, mobile phones have been considered as the portable form of fixed phones for communication media, before they have become helpful devices with high development rate in every part of life [1].Individuals studying in this field can create games and social media applications on mobile phones.Nevertheless, major contributions and studies have been carried out on routing and positioning [2].
Recently, Location Based Systems (LBS) have increased in importance for industries and researches.Since the service and battery capacity of smart phones develop, various applications have been created for restaurants, museums, hospitals, roads, buildings etc.
The functions of navigation systems such as routing and positioning enable different application areas to these systems and take an important place in daily life.Positioning and navigation systems present necessity for various fields of profession [3].Additionally, users can be informed about helpful activities, announcements and opportunities by additional information collected from users thanks to navigation services.Map databases of involved terminals should be established in order to determine the shortest way from current location of user to his/her destination point.Outdoor navigation systems can determine the location of user with Global Positioning System (GPS).Necessary applications of outdoor navigation contain all defaults or updated versions of map databases.
GPS systems in smart phones are commonly used due to their user friendly interface and verification of precise information.Since common outdoor use of GPS is available, GPS beneficial fields involve only 4.5% of users in daily operating time.But GPS cannot provide precise information for navigation through the indoor areas.Indoor signals of GPS are very weak or unavailable.Concrete walls, objects and ceilings of the buildings can be suggested as main reasons for low/unavailable signal.The proximity between pathways inside the buildings may also cause complexity [4].Since these complications occur, current location should be estimated by calculating through indoor navigation as in normal navigations.The determination of the current location of the user and location changes is still a problem.
Accelerometer feature in smart phones can be used as a pedometer and can direct the individuals suffering from immobility to tackle the health problems such as obesity by calculating the calorie intake [3].Besides the health assistance, accelerometer feature embedded in smart phones can be used for guidance on indoor navigation services by utilizing pedometer function.
Augmented reality shall be considered as a part of cyberspace and cyberspace adapted to real life is an analogue of virtual reality when compared to augmented reality.Augmented reality can be formed during virtuality or reality.Augmented reality is a direct or indirect view of physical environment whose elements are supplemented enhanced by computer-generated sensory input such as sound, video, graphics or GPS data [5].
The main objective of the study is to present the indoor navigation system by the verification service through beacon signals and by using the accelerometer, compass, camera and Bluetooth features of smart phones without GPS.
Related works are mentioned in Section 2. The System Design is described with details in Section 3. Generated application is shown in Section 4. Tests performed during application are illustrated in Section 5. Conclusion is rendered in Section 6.

RELATED WORK
Link et al. performed a walking procedure from an initial point to destination point using only the accelerometer and the compass readily available in modern smart phones with android operating system.Researchers accurately localized a user on map, and provided turn-byturn instructions to the destination by using mobile phone [6].
In the study performed by Namiot, advanced indoor positioning systems and technologies were evaluated.Deficiencies and disadvantages of wireless communication Technical Gazette 25, 4(2018), 979-985 and Bluetooth based indoor positioning systems were described in details [7].

Figure 1 System information flow
An indoor navigation system on smart phone using android operating system was created in a study by Chon and Cha.Researchers used the accelerometer, compass, GPS and Wi-Fi components in smart phone.The location of users was detected on indoor navigation application by Wi-Fi connection spots.Movement actions were categorized by not only the walking and running but also the messaging, phone calling and web surfing [8].
Ascher et al. investigated the information about mapmatching capabilities in real-time applications by comparing the maps available on mobile phones with additional components [9].
Ravi et al. determined user's location based on the periodically captured camera images of physical objects received from a smart phone during indoor navigation.Thus, preliminary results showed that user's location can be determined correctly with 80% probability of success.They used only a database involving images on web server.The smart phone periodically captured images and web server positioned the user by comparing the received images with images stored in database [10].
In their study, Kalkusch et al. used augmented reality technology to guide visitors through an unfamiliar destination.Visitors stated that they had the opportunity to see the additional information predefined on the places about an unfamiliar building without a guide.Their system was created by a helmet worn by the user.A single camera and necessary sensors were mounted on the helmet.Coding for the augmented reality was performed by Studierstube software developed by Schmalsteig.Writings, pictures and 3D objects were added to the real view on the screen embedded on the helmet with the application [11].

SYSTEM ARCHITECTURE
In this study iPhone 5s mobile phone was used whose trademark is Apple.This Phone has Bosch Sensortech BMA220 accelerometer that was used for step detection.This project's software coded in Xcode editor used Objective-C programming language.Estimote Bluetooth beacon devices were used in this study.Fig. 1 shows the system information flow.
In this study, initial point of user was determined by scanning QR code via mobile phone camera as shown in Fig. 2. When the user selected the destination point, the shortest route was determined by the algorithms of location data.Beacon Bluetooth devices were used to verify that each nodal can be reached on the specified path and to increase the authenticity of the routing application.

Selection of Pedometer
Accelerometer embedded in phone has been used for pedometer.Z-axis of accelerometer has shown the movement changes during step counting while walking with phone.X and Y-axis have represented the small movements of user due to vibrations of phone.Different frequencies from natural oscillation movements of user in action have been observed on Z-axis.
Blue coloured frequency value represents the Z-axis in Fig. 3. Low-pass filtration was applied in order to prevent the tiny fluctuations of axes.Thus, sudden downgrades and upgrades of values and undesired frequency values were avoided.The low-pass filtered accelerometer data is shown in Fig. 4.Each repetitious peak points on Z-axis express a step.Frequency value should be higher than previous and subsequent values in order to determine the highest value periodically on frequency.In order to prevent to count extra steps by deceiving the mobile phone, a command, which does not calculate the second step within 0.4 seconds after the first step, has been executed on pedometer algorithm.Draft code of pedometer is shown in Fig. 5.

Figure 5 Pseudocode of step detection
In addition to pedometer calculation algorithm, another pedometer calculation method, which was commerce by Apple in a conference, held on June 2014.This method was scaled by processors presented to developers by IOS 8 operating system.Thus user can choose one of the pedometer calculating methods.

Estimation of Step Length
In order to match the distance travelled by user with the step counts recorded by pedometer application, stride length of the user should be calculated.The methods for estimating the stride lengths are divided into 2 groups, static and dynamic calculation.Static method has been divided into 2 groups by gender for use.mL and wL represent the stride length based on gender and h values represent the height of user.
In particular, there may be greater variation than expected from person to person, as well as when one person uses a different pace and stride length on static calculation [12].This led to addition of dynamic stride length calculation into the application.The best dynamic method has been selected as Scarlet experimental method which has the lowest error rate [13].
This approach can vary through the steps of different people or in the steps of one person using different paces at different time from one measurement to another.Step size has been calculated by multiplying the value of maximum, minimum, and average acceleration of the step length with a constant value (k).k refers to constant value, favg refers to adhoc value of step acceleration, f min and f max refers to minimum and maximum acceleration values of the step respectively.In this paper, k equals 0.81 for all test subjects [13].

Calculation of Distance and Angle between Two Points
In this study, distance between the starting and target point has been calculated.Therefore, the longitude and latitude values of starting and target points have been recorded, and the distance between two points has been calculated by air distance.lat refers to the latitudes and lng refers to longitudes of two points.

(
) ( ) After the calculation of the distance, the user should know the direction to reach the destination.So the angle has been calculated by the following procedures according to the coordination points.Estimation of Warc value depends on the positive or negative status of x and y values [14].The direction which the user should follow has been determined by compass in the phone.

Determination of the Shortest Path by Using Dijkstra
Computer, Chemistry and Geology Engineering Faculty buildings of Süleyman Demirel University were selected as a path for the indoor navigation.The initial and final points have been set in these buildings.Coordinates of relevant points have been recorded, and the distances between each point have been estimated.A Json File has been generated for determined data.Dijkstra algorithm has been used for indication of the shortest path between starting and target points for user.
Dijkstra algorithm works with higher performance unless negative (−) length values are available.Points on the map should be connected and the weight which refers to the distance value between each of two connected points should be estimated in order to execute the Dijkstra algorithm.The total number of points through the application is 19.The proximities and distances between those 19 points have been determined.The application does not direct to the specified target point but to the next nodal point.The map is shown in Fig. 6.Technical Gazette 25, 4(2018), 979-985

Augmented Reality
Most of the mobile navigation applications inform the location based on the map downloaded in phone.Recent studies have been highly dependent on map [4].Without the use of map, user can only see the environment provided from camera by using the screen.Necessary data for guiding operations are also presented in the screen.This information includes the data about the direction signs, the destination and distance travelled.
When guidance will be executed, first the data about the current location is obtained by the scanning of the QR code with the user's phone.After the selection of the destination by user, the Dijkstra determines the shortest route and each nodal points located on the path are transferred to sequence.Finally, the guidance proceeds from current nodal point to subsequent nodal point.
Since the indoor navigation system has been developed using augmented reality, the user has to hold the phone in a vertical position to see the direction he/she is going through during routing, and the specified directions can be taken without error.

Location Verification with Beacon
Beacon devices function with BLE (Bluetooth low energy) communication protocol.The energy consumption of these devices is lower when compared to the other communication devices.Based on this result, beacon devices using BLE protocol are considered as effective on the application due to their productive use with long lasting, up to 3 years, battery life.Battery life of beacon devices varies by their signal strength and frequency [15,16].The battery life of beacon devices against the signal strength is displayed in Tab. 1.The signal categories according to proximity between phone and beacon device have been shown in Fig. 7 [17].Since the signal strength is indicated as near, the distance to the point should constantly be controlled on the application.When the signal received from the beacon is immediate the accuracy of user distance between the signal point is verified as 0.5 m and the guidance will proceed to the next point with a distance of 0.5 m from the previous one.If the signal from the beacon is not indicated as near and the remaining distance has been determined as 2.5 meters by the pedometer, the user will notice that he/she is still far from the destination point and will not be guided through the next target until signal appears.The draft code of beacon verification progress is shown in Fig. 8.

Control System of Beacon Devices
The operating time of Beacon devices is close to 3 years.Thanks to the strong adhesive underneath the devices, there is no chance of falling off vertical walls.However, a control structure has been added to the mobile application in case of any failures of the devices, or if the battery life ends unexpectedly.The application sends information whether the beacon devices are working or not, the available battery data to a developed desktop application by taking from any user who is using the application as they pass by the beacon devices.Thus, beacon status is constantly observed.
In order to make sure whether Beacon devices are working or not, a map is designed by calculating the proximity distances during placement of each beacon in the building.The maximum distance between each point on the map and its neighbours is set at 50 meters.It has been observed that each beacon point placed in the application development phase can receive signals from neighbouring beacon points.Anyone who uses mobile application sends information to the administrator desktop software directly if signals cannot be received from the determined point when he/she reached there with the help of the pedometer and the compass while receiving signals from the next neighbour point.
The battery data of Beacon devices is also sent to the administrator desktop software when all users pass by the beacon.Thus, the system administrator receives beacon information in the building all the time.
Fig. 9 shows a display of the desktop software, which receives beacon devices information.When the program is operated, the latest updates from all the beacons are listed in the table on the main screen.In favour of user security, only signal information and remaining battery data of beacons are shown, no personal details are displayed related to the users.

APPLICATION
Firstly, the type of pedometer should be selected in application.After the selection of pedometer, user scans the QR code at the current point and selects the destination.After the determination of destination, the shortest route will be estimated and the route on designed map will be illustrated to direct the user.After this process, the routing will be started by the user.The camera of the phone will be turned on and routing from the current point to first nodal point will be executed.As the user starts to walk, the distance of the first nodal point transiently varies with the formula of the stride length.When the user approaches the nodal point by less than 2.5 meters, the beacon previously located on the point starts to receive signal.The pre-located beacon devices and QR codes are shown in Fig. 10.
When the distance data from the signals remains less than 0.5 meter, next nodal point will be assumed as the destination point and the nodal point on current location is changed as previous target point by the information received from Dijkstra and the routing proceeds in that interchangeable pattern.Fig. 11 displays the routing screen of the application.
If the user could not reach the nodal point and even the estimated distance has finished during the routing by pedometer, the distance count will be paused by the application due to the lack of signal transmission from beacon and it is expected from the user to reach the position where beacon signals are available.Therefore, the possible errors will be reduced.

CONCLUSION
In our study, 96.18% accuracy rate has been observed on the beacon verified indoor navigation.However, the errors originated from most of the pedometer algorithms.These errors remained insignificant by using beacon verification.In the past studies, position verification was not performed with beacon devices for indoor navigation systems developed using augmented reality.Users have indicated that camera on tracking provided better and easy guidance.Yet difficulties based on algorithm errors while determining the exact position between two nodal points are still available, the grip angle of the phone is also an important factor for the use of step count algorithm on the pedometer.Furthermore, more beacon devices should be used and more dynamic algorithm evaluating the grip angle of phone should be designed in further studies in order to improve the routing.

Figure 2
Figure 2 System Architecture.Mobile Phone takes data from QR Code and Database, and Estimote beacons send signal about the edge of the point in locations.

Figure 3 Figure 4
Figure 3 Unfiltered accelerometer data

Figure 6
Figure 6 Node points for navigation

Figure 7 Figure 8
Figure 7 Beacon signal powers

Figure 9
Figure 9 Beacon control application display

Figure 10 Figure 11
Figure 10 Beacon device and QR code

Table 1
Battery life of beacon devices

Table 2
Results without beacons

Table 3
Navigation results with beacons