Repositório ISCTE-IUL

. This work presents an approach to combine location information from beacons and local building information to give real time location and guidance to a user inside a building. This information can help users orientation inside unknown buildings and the data stored from different users can provide useful information about users movements inside public building. Beacons are installed on the building and emit signals that give a geographic position with an associated imprecision, related with Bluetooth’s range. This uncertainty is handle by building layout and users’ movement in a developed system that maps users position, gives guidance and store user movements. This system is based on a App (Find Me!) for Android OS (Operating System) which captures the Bluetooth Low Energy (BLE) signal coming from the beacon(s) and shows, through a map, the location of the user ‘s smart phone and guide him to the desired destination.


Introduction
Nowadays, with the complexity of many buildings, people get lost mostly because the building orientation signs are not enough and can be, sometimes, confusing. The best option is then to ask for directions and sometimes, depending the building size, they get lost again. This situation is usual in big and complex buildings like hospitals, airports, shopping's, museums and many other. These people's life problem can be easily simplified with an Indoor Location System (ILS). ILS or Indoor Positioning Systems, can be described with the objective to find any electronic device inside of a building, typically with a simple smart device like phone, tablet or watch. The method of finding the device can be implemented via Bluetooth, infrared, magnetic fields and/or WIFI. When our smart device is connected with some of the Indoor Location electronic devices, the system can store that data and take many conclusions about that. An example of an Indoor Location technology is Beacon Technology. A beacon is a device that broadcasts a Bluetooth Low Energy (BLE) signal in a limited and configurable range. This signal can be interpreted as the Location of the user inside of a building, without need of Internet. Most people have their own smartphone these days [1], so the best and easiest way to help with the orientation is through a mobile App -The Find Me! App. This soft-ware's function is to show, through a map, where the person/user is and how can he get to the intended destination, guiding him until he reaches it. The most important and crucial parts of Find Me! App are the user's current location (from the beacon) and the desired user's destination. Having these two locations, as data, a Path Finding Algorithm (A* Search Algorithm Type [2]) calculates the shortest way between these points and draw it on a map with the objective of guiding the user to his destination. When the user intersects another beacon region the drawn path is updated with a new user's current location.

State of Art
The navigation space in large buildings such as schools, public buildings or shopping centres is frequently complex, comprising rooms and corridors, stairs, escalators, lifts and ramps. Traditional architectural drawings such as floor and site plans, elevations and cross sections and more natural perspectives can be used, with adaptations, to aid in the navigation.
A floor plan, Fig. 1, is a rectangular projection from above showing the arrangement of spaces of a level of a building, as seen if a horizontal section is cut through a building typically at 1.20 m above floor level. It shows anything that could be seen below that level: the floor, walls, windows and door openings, stairs from the floor until the section level and sometimes furniture. This is the most commonly used kind of representation in orientation. In general, the public is used to this kind of drawing, but a considerable proportion of users have difficulty in reading plans. Elevations and cross sections, Fig.1 as example, are rectangular projections in the horizontal direction. The difference between them is the while elevations display the exterior of the building, cross sections show the interior, as seen as if a vertical plan cuts open the building. They are valuable way to illustrate the relationship between levels of the building, but not very often used in navigation. A more sophisticated category comprises the several kinds of three-dimensional projections. These are more easily read by lay users since they present a more natural way of showing the interior of buildings, walls, doors and windows, passages and furniture. Finally, first person view, as popularized in action games, allows users to relate what they see on the screen with reality. It's increasingly being employed, but it is much harder to implement since it demands a more precise location, a more detailed, 3D, description of the building and more powerful 3D graphics processing. The choice of which elements are represented in the drawings and their level of detail is important in navigation. Most structural and construction details, materials and element thickness are not valuable in this scenario, but prominent decorative features or floor and wall colours or lining materials, may be. On the other hand, visual aids such as human figures, shadows, transparency, exploded perspectives, enlargement of clear features or animations, even if not rigorous, give the observer a better grasp of the environment and direction.
Pathfinding or pathing, can be described as a computer Algorithm that finds the shortest route/path between two points. To achieve the main objective, the Pathfinding needs to receive three mandatory parameters: current point, destination point and a map. A star, or A*, holds the objective of calculate lowest route/path cost from a the current/initial point which is called node, to the destination node out of one or more possible nodes. It is based on an evaluation function: f(n) = g(n) + h(n). The h(n) is optimal path cost estimate from node n to the destination node and g(n) is described as current cost from the current/initial node to any node n, with other words, the optimal path cost finding. As A* traverses the map, it follows the path with the lowest cost while keeping alternative nodes in a sorted priority queue. If a node being traversed has a higher cost than another encountered node at any point, it discards the node with the higher-cost and traverses the lower-cost node instead. This process continues until the goal is reached. The provided map can be configured with two types of components: nodes and obstacles. To each node provides a cost, depending the initial and destination node but for obstacles no cost is provided so the A* doesn't keep it on its queue. Fig. 2 describes, in an objective way, the basic concept of A* algorithm in a flow chart, adapted for our mobile usage. BIM -Building Information Modelsare 3D descriptions of buildings which associate information to the geometry of the building and its contents such as fixings, furniture or spaces. As an example, a parametrized BIM model is aware that a specific door is a double door, glass made, has level 1 fire-rating, connects corridor 1S to room 1S04, opens to the room, on the left hand-side, etc. ISCTE-IUL's facility management office has been developing a BIM model which is being used to feed maps, room listings and locations, as well as beacon's locations. This proves a major advantage because since the BIM models is based on a data-based that can be queried and updated (currently not in real time) with information to and from the app.

Indoor Location System
Work [3] by Xin-Yu Lin, Te-Wei Ho, Cheng-Chung Fang, Zui-Shen Yen, Bey-Jing Yang and Feipei La, describes an Indoor Location System, using Beacon technology, applied to an Hospital Building. This ILS is divided in three main parts: Patients' Mobile App side: Patients need to install a mobile APP and after that, they will be able to be located, through the implemented beacons that cover all over the hospital building. Depending on the patient location, the intersected beacon sends data to the mobile app which sends it directly to the server that converts it to a Location. Server Side: This server is a middle tier that does the connection between the two users side: Patients and Medical Staff. This side holds a that Database that stores all patient's data and all the information from the beacons location as well. When the beacon data is received from the App, the Server does a search in its database looking for a beacon that matches the data sent from the APP and returns a location. Having the location it, directly sends it to Medical Staff's Devices. Medical Staff's Devices side: Besides showing all the patients data (like condition, name, age and address) it also show the patient's current location, provided by the server side, on a hospital map. Having this whole ILS implemented, this will certainly help doctors and probably security staff as well, in a case of emergency or even in day-to-day utilization. This example of ILS, applied with Beacons Technology, is very similar of what it intended to do in this paper, but holds a major differenceour system will be private, as it will only show the position/location of the user. Also, instead of having just a current location of the user, we have current location, destination, and the shortest path between these two points, shown in a map.

3
Find Me! Architecture The system architecture, described in  The beacon type/make used in this ILS is Estimote [4]. It has several specifications [5] and two protocol types: EddyStone [6] and IBeacon [7]. IBeacon was developed by Apple in mid 2014. This protocol allows the broadcast of a specific format data: • "UUID, 16 bytes, usually represented as a string, e.g., "B9407F30-F5F8-466E-AFF9-25556B57FE6D"; • Major number, 2 bytes, or an "unsigned short", i.e., a number from 1 to 65,535; • Minor number, 2 bytes, same as Major" [7] When the user runs the App, it automatically receives the data from the IBeacon and sends it directly to the Data Base. Find Me! Backendholds a local Database that stores all the rooms and the implemented/configured Beacons of the building, receives data from the Beacon and from the FindMe! Front End -Insertion of Room. After that, it runs a query with both data and returns two locations: User's Current Location and Destination. Having these data, the system finds the floor plan maps that corresponds to each location. The pathfinding Algorithm receives the current location, destination and the matching maps. If the current location is on the same floor of the destination: The Path Finding Algorithm, holds a A star methodology which calculates the shortest path between the received locations. If the current location is on a floor different of the destination the Path Finding Algorithm calculates the shortest path between the current location and the closest stairs (the user has also the option to choose elevator) with the objective of guiding the user to the destination floor. After that the path finding algorithm calculates another shortest path between the floor destination stairs to the destination location.
Having the shortest path, it sends it, with the maps and locations, to Find Me! Front End -Map View. Find Me! FrontEnd -Carry User interface of the App. In Insertion of Room, the user writes the intended destination that is send to the Data Base. Map View part is where the user can observe the orientations until reaches the destination. When it receives the locations, maps and the optimized path, the Map View renders all the elements and shows them to the user. The drawn path also intersects Path Confirmation Photos and shows them on the screen to help the user confirm if he is on the right way to the destination. When the user intersects another Beacon, the current location is updated.

Testing and Validation
In order to evaluate the proposed ILS, several experiments were conducted in the experimental test-bed. The experimental test-bed was located in ISCTE-IUL, more precisely Edificio 1floor no 1. This building has 3 floors, 335 rooms and 48 implemented Beacons (4 for each hall per floor). The configured frequency of transmission of each beacon was 1 packet/second and the configured range of the Beacon signal was 4 meters of radius. A group of twenty persons/users (students, local infrastructure responsible and teachers) as beta tester in Android mobile device. The user installed the Find Me! in an Android mobile device, with Huawei P8 Lite [9] smartphone device major testing equipment. When he ran the App, beacon data was sent to the App. After that, the user inserted the destination, room 0S2room located in floor 0 of Building 1. The current location floor was different from the destination floor so the app automatically gave orientations to the closest stairs, as can be seen in Fig. 3.
There was a meeting where we collect general opinion through a simply question opinion about the application usage and general comments was: simplicity of the software and the Path Confirmation Photos was the part that he enjoyed much because sometimes, the building structure can be confusing even in the map and with the photos he could be sure of getting closer to the destination. A decision of going to a complete solution cover all campus was performed by central system responsible.
The main user's criticism is that the number of beacons needs to be higher in a way to get more live updates of the current location because only four beacons per floor aren't enough. Table 1 shows the rate of each part of Find Me! that holds the User Interface, given by the user on a online survey that was available to fill.
The user checked Path Confirmation Photos to make sure that he was on the right way. As long as he was walking, the path was correctly updated, as is observed on Fig. 3 (right). When floor 0 of Edifico 1 was reached, the map, and also the Path Confirmation Photos, changed to the corresponding floor.
After that it was possible to identify the destination roomred pin on Fig. 4. The user just needed to walk there.

Conclusion
In this study, we implement a ILS complemented with a mobile App, to help everyone that enters in a complex buildingin this experimental the ISCTE buildingto receive the right orientation, not only on the beginning but also until the user gets the intended destination. It was also confirmed that depending with an increase of the numbers of beacons, the precision of the detected current location can increase. We can combine beacon location information with available buildings maps to provide guidance. Another contribution from this research work is that we are able to register in a passive way (without user identification) the movements of persons inside buildings. This important information can be analysed to extract knowledge about users' movements inside public buildings. We can connect this beacon information to IoT system to turn on/off lights and give information about the number of persons.
This work can be easily replicated to other buildings with the introduction of new maps and calibration of beacons signal range due to different propagation conditions. Also there is the possibility in a near future the possibility of association of advertise services and information through the beacons, for example beacon near library is intended to use as advertise library services, for canteen menus, for secretary services available, main entrance for main university information and others. We intend also in a near future introduce evacuation plan guidance for emergency situations.