# LR-MPIBS: A LoRa-Based Maritime Position-Indicating Beacon System
## 2 Materials and Methods
### Overall System Design
#### 2.1.2 System Architectural Design  
Based on the above analysis, the core functions of the position-indicating beacon system should include personnel drowning detection, automatic alarm, global positioning, wireless communication, and indicator lights. The LR-MPIBS consists of a ship-mounted base station (SMBS) and position-indicating terminal (PIT). The application scenario and workflow are shown in Figure 1. SMBS is installed on the rescue ship, with the antenna located on a relatively open and high place on the ship. Each crew member is equipped with a PIT. When the crew falls into the sea, the PIT can automatically detect and power on. During the rescue process, the PIT regularly collects BeiDou positioning information and transmits it to the SMBS through LoRa communication. The rescue ship can obtain information about the drowning person and carry out rescue operations.  
The overall architecture of the LR-MPIBS developed in this paper is shown in Figure 2. It includes three layers: a system-hardware layer, a communication-protocol layer, and a data-processing layer.  
(1) System-Hardware Layer: This is the hardware foundation of LR-MPIBS. The system-hardware layer is divided into PIT and SMBS parts. The main control module of the  
Figure 1: Application scenario of the LR-MPIBS.  
Figure 2: Architecture of the LR-MPIBS.  
PIT implements data acquisition, wireless communication, light indication, and other control functions. The Falling Water Detection (FWD) module monitors the situation of personnel falling into the water in real time, and automatically turns on the PIT after the crew falls into the water. The Beidou positioning module is used to realize the precise positioning of the drowning person. The wireless communication module uses LoRa technology to transmit data between the PIT and the SMBS under the harsh marine environment. The button and indicator module are used for switching the operation mode of the PIT and displaying the operation and rescue status to personnel in distress. The power-management module is responsible for voltage conversion and supplying power to the equipment. The master control module, wireless communication module, and power-management module of the SMBS have similar functions as their counterparts in the PIT. The computer communication module of the SMBS forwards valid rescue information from the PIT to the rescue team.
2. Communication Protocol Layer: This defines the communication protocol format of each module within the LR-MPIBS to ensure safe and accurate data transmission. The Beidou communication protocol of the PIT allows the positioning module to transmit NMEA-0813 messages to the main control module. The LoRa wireless communication protocol includes the rescue information protocol of PIT and the response information protocol of SMBS. The rescue information protocol is used to encapsulate basic rescue information such as personnel identifiers and locations, while the response information protocol is used to encapsulate communication responses and base station numbers. The SMBS drowning rescue data transmission protocol forwards distress rescue information to rescue teams.
3. Data-Processing Layer: It processes positioning and rescue data to ensure the validity and reliability of communication data. The verification of the validity of positioning data is used to filter data with large deviations. The extracting of key positioning data is used to extract key turning points in the trajectory of individuals drifting at sea. The compression of positioning data is used to compress key positioning data in wireless communication cycles and reduce communication traffic. The verification of SMBS rescue information is used to verify the integrity of rescue information.