# An Integrated Safety Monitoring and Pre-Warning System for Fishing Vessels
## 3 Materials and Methods
### Operation Mechanism for the Integrated System  
Figure 3 presents the operation mechanism of an integrated safety monitoring and early warning system for fishing vessels. As observed in Figure 3, the integrated system consists of sensing terminal subsystem and decision support subsystem. In addition, the sensing terminal subsystem is composed of field layer sensors and a process layer MCU; a detailed discussion is presented in Section 3.4.  
The decision support subsystem (DSS) is mainly composed of a data preprocessing module, dynamic object detection module, environmental anomaly assessment module, vessel attitude anomaly assessment module, and notification generation module. The DSS acquires environment data, vessel attitude, GPS coordinates, and surveillance images in real time. Then, the raw data from sensors are preprocessed through the data preprocessing module. The environmental anomaly assessment module analyzes the real-time data from the temperature and humidity sensors and then determines whether the environmental information is abnormal. It sends alert messages to the notification generation module if temperature and humidity exceed the threshold value. The vessel attitude anomaly assessment module analyzes the real-time data from the vessel's sensors and predicted the attitude status of the vessel. The notification generation module displays the warning information on the web end or sends SMS alerts to the registered users if necessary. Detailed information on each control module can be found below.  
Figure 2: Structure of hardware.  
* **Data preprocessing module**: Within this module, two sequential filtering processes are executed. Initially, the Kalman filter is applied to the raw data from the nine-axis sensor. Environmental data, including temperature and humidity, undergo smoothing via a moving average filter. This process entails averaging sensor readings across a designated time window to mitigate short-term fluctuations and noise, thereby enhancing data stability.
* **Vessel attitude anomaly assessment module**: This module employs a fuzzy logic algorithm to calculate the \"danger score\" to predict the vessel's attitude status; a detailed description can be seen in Section 3.5.2. If the \"danger score\" exceeds a predefined threshold, it sends alert messages to the notification generation module.
* **Dynamic object detection module**: Surveillance images are employed to monitor the cockpit and deck areas. It can detect if the cockpit is unattended or if there are personnel near the deck edges, and send alert messages to notification generation module, enhancing crew safety. The intelligent detection method used in this study is provided by the surveillance camera manufacturer TP-LINK, which enables the camera to automatically trigger alerts when personnel cross predefined boundary zones near the dock edges.
* **Notification generation module**: This module employs two notification ways, SMS alerts dispatched to crew members' smartphones and real-time safety alerts displayed on a web platform. SMS alerts encompass comprehensive information, including the hazard score, type, and recommended responses, ensuring crew members are well informed and can act promptly. The web platform complements this by offering a visual representation of the vessel's hazard status, incorporating real-time attitude data and hazard score trends, thereby facilitating continuous monitoring and swift decision-making.  
Figure 3: The integrated pre-warning system operation mechanism.