# Integration of Directional Antennas in an RSS Fingerprinting-Based Indoor Localization System
## 4 Deployment Cycle
### Site Survey and Calibration Phase
#### 4.1.1 Radiomap Generation  
The site survey must be performed in order to generate the radio map. This map allows one to characterize the spatial RSS distribution inside the indoor environment, collecting the so-called fingerprints, which in this case are composed of an RSS data matrix with \(N\times K\) features (\(N\) transmitted beacons captured by \(K\) SRs) and the associated location (room ID) from where the tag transmitted the beacons. Usually, it is assumed that the more fingerprints gathered, the better the radio map will represent the scenario. However, there is no clear guidance on how to carry out this process, since it depends on the scenario, the fluctuation of the signal and other parameters that must be fixed during the process (e.g., tag position, transmission power, number of transmitted beacons, _etc._). Furthermore, we cannot take as many fingerprints as desired, since it becomes unfeasible in terms of time, especially if the indoor scenario is very large. Hence, performing the site survey is not a trivial task. Many papers, such as [25; 26; 27; 28; 29], have assumed a static tag position during the RSS measurement campaign in order to generate the radio map to characterize the spatial RSS fluctuation. Other authors have demonstrated the importance of the orientation of people with respect to the SRs, as this influences the RSS variability due to the body absorption losses, which may report an increase of up to 3-6 dB on the RSS standard deviation [30]. Furthermore, parameters, such as temperature or humidity variations produced by weather changes or the dynamics of a normal office environment (people, doors, _etc._), can directly impact the magnitude of these irregularities on the electromagnetic channel [19]. In this paper, unlike other works, radio map fingerprints have been gathered as people stroll about the scenario (not statically), as we believe that these fingerprints will represent the electromagnetic fluctuation suffered by the signal during the online stage more realistically, when people move and the system operates in real time. Thereby, the RSS fluctuation will be better characterized by the ANN during the training process of the calibration phase. Two software tools have been specifically developed to manage the site survey process efficiently in terms of time. In Figure 3, the interface of the so-called system management tool (Left) and the site survey tool (Right) are shown, which can be installed in a portable device with the Android OS (e.g., tablet or smartphone). Therefore, it is possible to control the localization server (where the system management tool is installed) remotely via WiFi from the Android device. This has allowed configuring in real time the system parameters and automatically organizing the information derived from the fingerprint generation. Figure 3: (**Left**) System management tool and (**Right**) site survey tool for Android. In Figure 4 is summarized the process followed to generate the site survey. As the first step, the system management tool and site survey tool are started up in the server and the Android portable device, respectively. Then, the digital map of the scenario and the tag configuration (channel frequency, number of beacons, TX power, _etc._) are loaded in the server. In the next step, a person with the Android device and the tag fixed to the body moves across each defined area/room (previously defined in the pro-project phase). Different points are chosen randomly, trying to encompass the whole area. The person moves indicating on the touch screen of the Android device the room where he/she is located. Then, a beacon burst is transmitted from the tag to generate the fingerprint associated with the current position. This process is repeated several times inside each room until no rooms remain unexplored.