## 2 Proposed Software Architecture
### Software Architecture Instantiation
#### 2.3.1 Indoor People Location Service  
One of the main problems faced by the search and rescue brigade is determining whether people are inside the campus facilities and buildings after an earthquake. Therefore, the indoor people location service was proposed to support this activity. This service receives as input the signal intensity of the access points detected by the person's mobile device and returns the person's location within a specific building and floor. Because users' mobile devices can receive multiple RSSIs, this problem can be addressed as a classification problem. The development of the indoor location service involved implementing the fingerprint method (see Figure 5). Figure 5: Fingerprint method. The aim of the fingerprinting method is to obtain the RSSI of WLAN access points (APs) or reference points (RPs) at each point of interest and map it to a fingerprint database. The fingerprinting procedure is divided into two phases: The training phase (offline) and the trace phase (online). * Training phase: During this phase, the RSSI of each place of interest is taken as a fingerprint and stored in a database. * Trace phase: This phase uses a classification algorithm to match the data that the application user is sending with what is found in the database, such as fingerprints. The database of this project has a table called Network, where all the Wi-Fi networks that the GHEIs have are registered--the important information that is saved is the network identifier (SSID) and the primary identifier of the service set (BSSID). This information is consulted by the user and saved in its database in order only to select those networks that belong to the GHEI. During the training phase, the fingerprints of each AP that arrives at an RP are mapped and stored in the database through the web application that has the fingerprint module. When a fingerprint is added, modified, or deleted, an ARFF (Attribute-Relation File Format) file is created since it is the default format for the WEKA library (Waikato Environment for Knowledge Analysis) [40], which is a software platform for machine learning and data mining developed in Java and licensed under the GNU-GPL license. WEKA was selected because it provides a comprehensive set of machine learning algorithms that represent the state-of-the-art in the field. Additionally, it allows the fine-tuning of hyperparameters and facilitates experimentation, which is not commonly explored in similar studies. Although WEKA can work with several types of files, the ARFF is specific to the library, and therefore, WEKA works better with this type of file. These files are plain text and can be edited in any text editor, but they must follow a particular structure, and there are two parts: the header and the data. The ARFF is created with the information from the fingerprints. On the other hand, during the trace phase, the users through the mobile application send the id of the network table that they detect with the greatest intensity and its RSSI to the REST API; for this procedure, there exists, within the application, the pre-processing class in charge to filter the list of networks that only belong to the GHEIs, and that the signal strength is greater than \(-95\) db. That class returns an ordered list of networks, and the application selects the network with the highest intensity. When the information reaches the REST API, the ARFF created with the fingerprints is used to train the classification algorithms. To select an appropriate machine learning algorithm, we considered the nature and size of the dataset. Since our dataset consisted of 7050 fingerprint instances, it was not large enough to justify the use of more complex models such as deep learning. Instead, we opted for the K-nearest neighbor (KNN) and J48 decision tree, as both are well-suited for moderate-sized datasets and provide interpretable results.