# Research on Wi-Fi Fingerprint Database Construction Method Based on Environmental Feature Awareness
## 4 Results  
### Data Collection  
The target objects selected for acquisition in this paper are the six dormitories of a nursing home, whose structural layout is shown in Figure 4.  
The gray areas represent walls, and the asterisk indicates the location of the AP (access point). There is also a bathroom in the house, with its wall acting as the main barrier to signal propagation. In this paper, a coordinate system is established with the lower-left corner as the origin, and the coordinate axes denote actual distances in millimeters. This setup allows for a clear and detailed representation of the parameters and coordinates of each part of the room.  
Signal strength is collected at the center point of each grid within each room to form a Wi-Fi fingerprint. Since each fingerprint consists of AP signal strengths from six rooms, the data are arranged in the order of Room 1-Room 6, separated by semicolons  
Figure 3: Structure of fully connected neural network.  
for clearer differentiation and representation. The acquisition process is repeated several times to minimize random errors and data loss, thereby improving the accuracy and representativeness of the collected data.  
Let us take Room 1, as shown in Figure 4, as an example. Assuming that Wi-Fi fingerprint information (RSSI values) has been pre-collected at each point in the room and stored in a database, the data stored in the database are presented in Table 2.  
Assume that the user is currently at an unknown location in the room, and their device has collected the following RSSI values over Wi-Fi: \(-90.0\), \(-39.3\), \(-35.8\), \(-90.0\), \(-90.0\), \(-66.3\). The user's RSSI vector is then compared with the RSSI vectors at each grid point in the database to identify the closest match. A common approach is to calculate the \"distance\" between the RSSI vectors, for instance, using the Euclidean distance [22] formula:  
\[d_{i}=\left(\sum_{j=1}^{N}\left(RSSI_{j}^{\mathbf{on}}-RSSI_{j}^{i}\right)^{2} \right)^{1/2},i=1,2,\ldots,n \tag{4}\]  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Room No.** & **Position** & **RSSI** \\ \hline \(1\) & \((X_{1},Y_{1})\) & \(-48.4\); \(-56.9\); \(-90.0\); \(-66.3\); \(-87.5\); \(-90.0\) \\ \(1\) & \((X_{1},Y_{2})\) & \(-46.5\); \(-67.0\); \(-68.0\); \(-90.0\); \(-90.0\) \\ \(\vdots\) & \(\vdots\) & \(\vdots\) \\ \(1\) & \((X_{4},Y_{7})\) & \(-56.3\); \(-67.7\); \(-90.0\); \(-52.6\); \(-90.0\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Details of data storage.  
Figure 4: Structural layout of target objects.  
In this context, \(RSSI_{j}^{m}\) represents the measured RSSI value from access point \(j\), while \(RSSI_{j}^{i}\) denotes the corresponding measured RSSI value from access point \(j\) at the \(j\)th grid point. In simpler terms, the process involves comparing the newly acquired signal strength, \(RSSI_{j}^{m}\), with each fingerprint stored in the database. By calculating and comparing the Euclidean distances, the coordinates corresponding to the point with the smallest distance--and thus closest to the user's current RSSI values--are returned as the user's predicted position.