# Tracking and Monitoring System Based on LoRa Technology for Lightweight Boats
## 5 Test-Bench
### Equipment  
As aforementioned, a LoRa-enabled monitoring unit was placed in the bow of the tracked boats (Figure 5). This module consisted of an Arduino mini Pro board operating at a frequency of 16 MHz, to which the rest of the sensors were connected, namely, a NeoN8M GPS module by U-BLOX (precision of 2 m) (Thalwil, Switzerland), an MPU9250 inertial unit (InvenSense, San Jose, CA, USA), a BMP280 barometric sensor (Bosch Sensortec, Reutlingen/Kusterdingen, Germany), an ACS712 amperimetric sensor (Allegro MicroSystems, Worcester, MA, USA), and a Light Dependent Resistor (LDR) to measure the received light intensity. Regarding the LoRa-based communications, a SX1278 transceiver (Semtech (previously defined in page 4)) was used with an output power of 14 dB and a transmission channel in the 434 MHz band. All of these devices were encapsulated in a case of 60 \(\times\) 70 \(\times\) 50 mm (see Figure 5). Attached to this case, the employed antenna was an 1/4 wave helical dipole. It is important to note that, due to the structural restrictions of the boats under consideration, the installation of the device was always on the bow of the ship, which implied that the position of the antenna never exceeded 80 cm above the sea level. As explained in the next section, the water proximity to the communication equipment may introduce some additional adversity to the propagation conditions. The communications with land were established through a base station placed in the port (Figure 7). This base station was deployed by means of an Arduino Due board with the same GPS module and LoRa device as those installed in the end-devices. A full wave antenna was attached to the SX1278 module. In this case, the antenna was not directly connected to the transceiver, but a wire of 1.5 m was employed. The base station was installed on the terrace of a building at the edge of the sea. With this configuration, it presented a height of about 3 m above the sea level. Please note that the there was no line of sight at every measurement point in the studied area, as discussed later. From a software perspective, the base station implemented self developed routines written in Python, for packet decoding and its subsequent storage in a PostGis database. In addition, in order to present the results through the web-based dashboard (Figure 8), an own Javascript development was employed. Observe that, in this monitoring panel, race buoys and boat position and their rankings are shown at the top of viewer. The table includes the entire list of participants and the instantaneous velocity of each boat. On the top of this chart, wind speed and its direction are also presented. At the bottom, a plot shows the evolution over time of several eligible variables, e.g., speed, temperature, light intensity, or power consumption, among others. The messages generated by the monitoring units presented the structure showed in Figure 9 with a full length of 52 Bytes, which permitted us to transmit the information gathered by the on-board sensors to the base station. After a control header of 8 bytes, the payload field included the following data: instant GPS position, instant Integer Time Of Week (ITOW), instant heading and its accuracy, average and standard deviation of trajectory orientation, average and standard deviation of gyroscope (\(x,y,z\)), average and standard deviation of accelerometer (\(x\), \(y\), \(z\)), average and standard deviation of incident light, average and standard deviation of pressure, average and standard deviation of amperes consumed, and average and standard deviation of remaining voltage. Therefore, observe the notable amount of information delivered in each transmission. The Hash/Auth field was used for authentication and encryption purposes, hence the exchanged data were end-to-end encrypted. As performance metrics, we have considered both the Received Signal Strength Indicator (RSSI) and the Packet Delivery Ratio (PDR).