# Sensing in Inland Waters to Promote Safe Navigation: A Case Study in the Aveiro's Lagoon
## 3 Low-Cost Maritime Data-Sharing System Design and Evaluation
### Maritime Real-Time Data-Sharing: The NMEA Network Simulator and System's Architecture  
Before delving into the development of the low-cost IoT solution, it was essential to build a small simulator for a maritime usage scenario. This simulator station was equipped with a set of nautical electronic instruments to simulate an actual boat scenario. Several solutions examined in the benchmarking [35; 51; 58; 61; 62] revealed the possibility of accessing data obtained by existing sensors on nautical vessels and sharing them via the NMEA (National Marine Electronics Association) protocol [86; 87]. NMEA was introduced in the 1980s to consolidate and transmit all data from various maritime electronic instruments through a single electronic device [86]. In the NMEA network, there are two types of networks: the NMEA 2000 network and the NMEA 0183 network. The main difference is that in NMEA 0183 each sensor is connected to the network, while in NMEA 2000, the sensors are grouped into a single connector that simplifies the connection with the rest of the electronic sensors. This communication protocol stands out in this study since it serves as the foundation for connecting the data-sharing system to a significant portion of the instrumentation found on a vessel. This is a crucial protocol, responsible for connecting the boat's sensors to a specific network to consolidate all of the data obtained. For this station a B&G Vulcan 7 MED [88] was purchased, which includes GPS, Radar, and an AIS, primarily used as an aggregator of sensor data connected to the NMEA 2000 network through Wi-Fi, which allows users to receive and process these data on an external interface. The wind (B&G WS310 [89]), the water depth, the speed, and the air temperature sensors (Airmar B&G DST 800 [90]) were also integrated into this simulation station. The depth sounder presented a significant challenge in the simulation station, since accurate readings required a minimum depth of approximately 1 m and, preferably, it should be inside water. To tackle this issue, a trash bin was used to fill it with water and the sounder was placed on a wooden platform (Figure 8a). A K-line with adjustable  
Figure 7: Tidal height from a specific point in the Ria de Aveiro. weights was used to raise and lower the false bottom to simulate variable bottom conditions (Figure 8b), such as those encountered when navigating inland waterways. To ensure that the GPS signal was received properly, the plotter had to be placed on a storage shelf (Figure 9a), while the anemometer was mounted on a robust wooden platform to ensure stability in case of strong winds. This setup was installed on an outdoor balcony at the university department to simulate real-world conditions and obtain a preliminary simulation of a real usage scenario (Figure 9b). The establishment of an NMEA network was facilitated by this simulated maritime data-sharing station. Accessing NMEA data became feasible through a two-step process: (i) programming the ESP8266 using an Arduino script; (ii) and then using a Python script via the serial port on the Raspberry Pi. This Python script effectively read and processed the NMEA data, rendering it into a readable format for the API. Raspberry Pi was chosen due to its versatility and processing power, which were identified during the benchmarking process. It has been widely used in previous projects and is suitable for small-scale projects. The computer is highly adaptable and offers a robust platform for developing and deploying various applications, including those requiring real-time data processing and transmission, such as this maritime data sharing system. The cost-effectiveness and availability of this solution also make it an attractive option. Figure 8: The NMEA network simulator: (a) It is possible to observe the depth sounder support by a wooden board, the B&G plotter inside the storage shelves, and, on the right side, the wind sensor.