# Hybrid Positioning for Smart Spaces: Proposal and Evaluation
## 5 Implementation and Evaluation of the Solution
### Validation  
One of the trials performed using the positioning system is plotted on the building plans in Figure 3. A prior training for WiFi fingerprinting was performed using the smartphone app, creating a three-meter resolution grid (443 fingerprints in total) shown in the screen shots in Figure 4. Both real and estimated positions are shown. The real position is represented by a black X on the center of the screen, which was manually set constantly during the test by dragging the background map while the user walks. This way, the actual positionwas taken from the graphical interface at the same time the positioning system worked. The estimated position was marked with a message indicating the main technology used, being the center of a circumference that showed the estimated error. Other possible solutions with their associated error are also shown. For each estimated position, the actual location was also saved for later comparison and error calculation.  
The test in Figure 3 started outside the building, and then the user entered the second floor to go downstairs. In this first stretch GPS was initially used, presenting a great error due to multi-path and signal obstruction of the metal facade of the building. Although enough satellites were received, between four and six, measurements still suffered from multi-path interference from the metal facade. The same phenomenon happened at the end of the path, when the user went outside the building. All the accuracy estimations returned by the different technologies were all expressed in meters, so they could be easily compared. Since the accuracy perceived by using WiFi fingerprinting was better than GPS in this moment, a technology handover was performed. Then the position accuracy was clearly better. Just before the stairs, a Bluetooth LE tag was detected and used with the proximity algorithm  
Figure 4: Two representative screen-shots of the app used to perform the tests.  
for a while, since it presented an error estimation better than WiFi fingerprinting. At the first floor the user went downstairs again to the ground floor, the moment captured in Figure 4b. At this floor, the user took the lift and returned to the first floor to walk within our department. Just going out the lift, a Bluetooth LE tag was detected, improving the floor change detection.  
At the middle of this stretch the user entered the central corridor and was located with another Bluetooth LE tag. Then he entered a laboratory, a moment also captured in Figure 4a. The door opening infrastructure informed the positioning system about the user location. Since this position had an optimum accuracy level, it was selected as the most accurate position, but only for a while. The error produced by this position source was incremented by 1 m/s. Later, after continuing walking through the first floor, the user entered another lift to come back to the ground floor and go straight forward to the main door exit. Close to the lift, another Bluetooth LE tag helped in the user location and floor change detection. Finally, when the user was near the main door, the positioning system selected flagged fingerprints represented as yellow balls in Figure 4b, that notified an exit proximity. This event was used by the system to turn on the GPS positioning system in the user smartphone. Usually, smartphones automatically turn off the GPS capabilities to save battery life if no GPS signals are received, so our app had to turn it on again.