# Situational Awareness: Mapping Interference Sources in Real-Time Using a Smartphone App
## 3 NGeneApp: An Android-Based Real Time RFI Detector for Smartphones
### Hardware-Dependent Optimizations  
In order to fulfill the real-time requirement, some smartphone-dependent optimizations are required. The interference detection functionality demands a very high computational burden, thus, the multi-thread programming needed a threads re-distribution among all available processor cores, to fully exploit the benefit of the high performance chipset. Figure 2 represents the threads allocation onto the eight cores of the Exynos 7 Octa 7420 system-on-chip.  
Being specifically designed for high performance applications, the Cortex-A57 cluster is in charge of handling all the threads with high priority or computational burden. For example, the FE thread, in charge of handling all functions related to the USB FE and stream, is allocated to one core due to the high data rate. The main thread including the PVT computation, the PSD estimation and the'main' receiver function is mapped to the core no. 7 while a channel thread is assigned to each of the two remaining cores in the cluster. The channel thread includes all the operations needed to track a certain number of satellite signals and to perform the intermediate stage interference detection. Thus, cores  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Other Works [17; 51]** & & **Proposed Crowdsourcing** \\ \hline \multirow{7}{*}{Capability} & & & Detecting and Localizing the interference \\ \cline{3-4}  & & & Characterizing the interference \\ \cline{3-4}  & & & Replicating and simulating the real interference event by using transceiver front-end or GNSS simulator in replay mode \\ \cline{3-4}  & & & Analyzing the impact of interference in different stage of the GNSS receiver \\ \cline{3-4}  & & & Integrity monitoring [52; 53] \\ \hline \multirow{7}{*}{Complexity} & \(\blackdiamond\) & Low complexity with the smartphone running application & \(\blackdiamond\) & Require addition accessory such as GNSS front-end and antenna \\ \cline{3-4}  & & The message sent to server is 929 bytes long & \(\blackdiamond\) & The message sent to server is 9256 bytes long + IF digitalized samples (if interference detected) (\(\blacktriangledown\)) \\ \hline \hline \end{tabular} (*): The high-speed data transmission requirement can be satisfied in 4G/5G networks.  
\end{table}
Table 2: _Cont._  
Figure 2: Thread allocation of NGeneApp on the cores of the Samsung Galaxy S6.  
no. 4 and 6 can manage up to six channels, i.e., six satellites in tracking. Signal acquisition, which is the heaviest function in terms of computational burden, is continuously performed on one channel on core no. 6, until all the channels are in tracking state. Being optimized for power efficiency, the Cortex-A53 cluster is less powerful compared to the Cortex-A57 also in terms of clock frequency (1.5 GHz vs. 2.1 GHz). Thus, in this case, three cores handle two channels each one. The remaining core executes the communication thread, in charge of handling the remote server link, which requires high priority for the timely delivery of the messages. Taking advantage of this threads allocation, NGeneApp is currently able to handle up to 12 channels in real-time.