## 2 Materials and Methods
### EAP Component
For a shallow earthquake with moderate intensity (typically around 4.0 to 5.0 on the Richter scale), the distance from the epicenter where it is no longer felt can vary depending on local geological conditions. However, we estimate an average distance of around 50 to 100 km. The Haversine formula is expressed as presented in Equation (2) [72]: \[d=2r\times\arcsin\bigg{(}\sqrt{haversin(\Delta\phi)+\cos(\phi_{1})\times\cos( \phi_{2})\times haversin(\Delta\lambda)}\bigg{)}\] (2) where: \[d\] is the distance between the two points (in kilometers); Figure 2.0 --the Earth's radius (approximately 6371 km); Figure 2.1 and Figure 2.2 are the latitudes of point 1 and point 2 in radians. The conversion from degree to radians is computed using Equation (3); Figure 2.3 --the difference in latitudes between Figure 2.4 and Figure 2.5 --the difference in longitude between Figure 2.6 and Figure 2.7 --Figure 2.8 --a function defined by Equation (4); Figure 2.9 (3) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]0 is the converted value to radians; \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]1 (4) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]2 (5) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]3 (6) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]4 (7) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]5 (8) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]6 (9) where: \[P(EQ)=0.7\times P_{EMM}+0.3\times\frac{1}{N}\sum_{i=1}^{N}S_{i}\]7 (10) where: \[\rho=\frac{c\times\(c\)--the latitude or longitude value in degrees. This value will be replaced with \(\phi_{1},\phi_{2}\), \(\lambda_{1}\), and \(\lambda_{2}\) to convert from degrees to radians. \[ \begin{split} haversin(\theta)=sin^{2}(\frac{\theta}{2})\end{split}  \tag{4}\]  
where:  
\(\theta\) is used to determine how far apart the two points on the Earth's surface are and is replaced in Equation (1) with \(\Delta\phi\) and \(\Delta\lambda\). The process combines real-time sensor data from the field with predictive analytics. The M5 Stack devices continuously monitor seismic activity, and if a threshold is exceeded (such as detecting significant gravitational acceleration), the sensor data, including coordinates and acceleration values, are transmitted to the SensorData table in Azure. The EMM Application Predictor then evaluates these inputs, alongside meteorological and historical earthquake data, to estimate the probability of an earthquake, integrating results from the daily meteorological updates and the real-time sensor data. The Azure-hosted SQL Server database is a central repository for predictive data (weather and seismic patterns) and reactive data (real-time sensor inputs). The user EAP is developed using the ASP.NET MVC template, which provides a framework for building Web Applications. The EAP is specifically designed to list and manage warning notifications. Figure 3 presents the EAP's graphical user interface (GUI). The EAP is an IoT application because it integrates real-time data collection, transmission, and processing from physical devices (sensors) over the Internet to deliver actionable insights. The defining characteristics that classify this project as IoT include:  
* Device Connectivity. The application involves M5 Stack modules with an ESP32 microcontroller and MPU-6050 sensors. These devices are physically distributed, capable of sensing environmental parameters, such as seismic activity (acceleration), and connected to the Internet. These devices are placed in residential places for local monitoring. This ability to gather and send data wirelessly is a key element of IoT systems;
* Data Transmission. The sensor data, acceleration values, and device coordinates are transmitted to a cloud-hosted database (in Azure) through an Azure API Request.