# An Integrated Safety Monitoring and Pre-Warning System for Fishing Vessels
## 3 Materials and Methods
### Structure of the Proposed Integrated Pre-Warning System  
Figure 1 presents the general structure of the proposed integrated pre-warning system for fishing vessels. The integrated system can be divided into four layers: field layer, process layer, communication layer, and supervisory layer. Each layer is responsible for specific hardware operations and hosts corresponding software modules or algorithms that collaboratively enable real-time monitoring, analysis, and warning issuance.  
Field layer: This layer was employed to realize the data acquisition, directly collecting temperature, humidity, latitude, longitude, surveillance images, and vessel motion attitude (roll, pitch, and yaw angles) information by a temperature and humidity sensor, GPS, a surveillance camera and a nine-axis sensor mounted on the main deck. The collected data are transmitted to the process layer for further analysis.
2. **Process layer:** This layer included the STM32 MP157 microprocessor that serves as the central processing unit. It handles sensor data input via serial or Ethernet ports and performs initial preprocessing, including data filtering and feature extraction. This layer accommodates several key software modules: * **A sensor data preprocessing module**, employing signal denoising techniques (e.g., Kalman filtering and moving average smoothing) to eliminate outliers and improve data reliability. * **A multi-source data fusion module**, which combines inertial and environmental information into structured data frames. * **A local storage system**, facilitating data retention.
3. **Communication layer**: The communication layer employs a 5G module to facilitate bidirectional data transmission between the terminal and the server, enabling remote control of the terminal. This terminal can connect with shipboard sensors to receive data in real time, such as location, speed, and environmental parameters. Leveraging the high-speed and low-latency characteristics of 5G networks, it swiftly transmits the data to the shore-based base station, ensuring that shore-based personnel can promptly access the ship's operational status.
4. **Supervisory layer:** This layer includes an integrated pre-warning decision support system, which is used to monitor the vessel motion attitude in real time, calculate the \"danger score\", and pops up notifications or sends an SMS when attention is needed. * **A vessel attitude anomaly assessment module**, constructed using fuzzy logic inference algorithms to calculate dynamic danger levels based on real-time posture, acceleration, and environmental parameters. * **An alert management** subsystem, which compares the computed risk levels against threshold criteria and triggers corresponding alarms. * **A graphical user interface (GUI)** developed with Vue.js, and a back-end management service built on Spring Boot and MyBatis, which collectively enable real-time visualization, data querying, and remote configuration.  
Figure 1: Integrated pre-warning system pyramid.  
The specific implementation details of the hardware components, software architecture, and key algorithms adopted in each layer are elaborated in Sections 3.2-3.5.