# RSSI and Device Pose Fusion for Fingerprinting-Based Indoor Smartphone Localization Systems
## 3 Methodology
### Experimental Setup  
We used an experimental setup and protocol similar to that of [17], as shown in Table 2. Data were collected in a room-scale setup that nearly exactly replicated the experimental approach in [17], which allowed the accurate exploration of the research gap to determine the localization improvement attained when taking device pose into account. RSSI and accelerometer measurements were collected at the five locations shown in Figure 5 (in the remainder of the paper, these are referred to either as ZoneA, ZoneB, ZoneC, ZoneD, and ZoneE, or ZA, ZB, ZC, ZD, and ZE, respectively) in an indoor environment with six spatially distributed anchors for four different device-pose use cases (shown in Figure 6, labelled AtEar, InHand, InHandbag, and InPocket, or AE, IH, IB, and IP, respectively). From Figure 5, it can be seen that each zone had a nearby anchor, and these could be written in \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Setup in [17]** & **Setup in This Study** \\ \hline Number of zones & 5 & 5 \\ Number of anchors & 5 & 6 \\ Number of HAR device poses & 4 (Hand, trouser pockets, jacket pocket, bag) & 4 (AtEar, InHand, InPocket, InHandbag) \\ Movement type & Static and dynamic & Static and dynamic \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Details of the experimental setup. Figure 4: Cascaded neural network implementation of proposed framework. pairs as [ZA, A2], [ZB, A3], [ZC, A3], [ZD, A4], [ZE, A5]. For each location and each device pose, three data runs were recorded: one in which the device pose was kept completely static and two in which natural variations due to body movement were added to the device pose; these are referred to as dynamic1 and dynamic2. Larger and more frequent variations in the device-pose use cases were included while recording the dynamic2 data compared with those in the dynamic1 data (Figure 6 right subpanels). Approximately one minute of data was recorded for each static/dynamic1/dynamic2 file, resulting in a total of 60 min of data. Because the proposed framework depends on collecting a range of accelerometer and RSSI measurements while the phone is in a particular device pose, it was necessary for the accelerometer and RSSI transmitter to be on the same device. An Android smartphone application was developed to send BLE advertisements at 10 Hz (in practice, the RSSI was obtained at between 5 and 7 Hz due to missed packets) as well as a BLE Generic Attribute (GATT) server [22] to sample and send accelerometer measurements as BLE-notify messages (at around 15 Hz) to a GATT client. The two data modalities of interest were recorded as follows:  
1. RSSI data were obtained from the BLE advertisements of a Google Nexus 5X phone with Arduino MKR1010 microcontrollers employed as anchors. The standard ArduinoBLE library was used to obtain the phone's BLE advertisement packet RSSI, which was then sent over a USB serial connection to an HP EliteBook x360 (Intel i5 quadcore with 8 GB RAM) laptop running MATLAB 2022 Rb. 2. Accelerometer data were obtained from the BLE-notify messages of a Google Nexus 5X phone with a GATT client programmed on a RaspberryPi 4B+, which then sent the accelerometer measurements over UDP to the laptop. The RaspberryPi was used to offload the processing for receiving the higher sampling rate BLE-notify messages for  
Figure 5: Picture of room and layout of anchors for data collection. Figure 6: Device-pose use cases considered for experimental data collection. the accelerometer service. The RaspberryPi's clock was time-synced with the laptop with Network Time Protocol to ensure synchronized timestamps. The experimental measurement setup is summarized in Figure 7 with the hardware and software components and their roles. To prepare the data into vectors for the classification, the following preprocessing steps were applied:  
1. A 1-element buffer was used to hold the RSSI vector. This buffer was filled before being considered the first complete RSSI vector.