## 3 Methodology
### Choosing the Adequate Volume of Traffic in the LoRa Network
When sending data packets, it is crucial to maximize the transfer of useful information. Hence, it must be considered that the payload contents are used to maximize the transfer of useful information with minimal transmission bandwidth. Therefore, a critical aspect of data transmission planning refers to the processes for determining the necessary update rate of information to make a minimum number of samples. A reasonable sampling rate should be used to capture the original data. Moreover, for highly periodic measurements, as is the case for monitoring of most parameters related to precision agriculture, an adequate sampling rate will result in an accurate representation of the measured values. Thus, more frequent data delivery is necessary for monitoring data related to the amount of precipitation essential for irrigation procedures, especially in the rapid occurrence of short-term storms. In these cases, it is necessary to take several samples per hour to assess the current state as accurately as possible. It is logical to group all readings into the same packet in the case of sensors with multiple sensor elements that have synchronized measurements. In the case of group readings, bits are often arranged in registers of a fixed size. However, in this case, there is an unnecessary waste of resources allocated for unused bits. For example, some sensors have 10- or 12-bit resolution, while LoRaWAN provides slots of 8 bits (or multiples of 8) for transmission, where it is possible that some of these bits remain unused. Therefore, optimizing the data transfer between devices is necessary to maximize the transfer of useful information in the minimum number of bytes. In a group reading, the process of maximizing data transfer in the fewest bits, i.e., the process of bit packing, takes advantage of binary payload data transmission where payload bits are sent one after the other to ensure a compact flow of information. An example of such a message format as can be found at the commercially available all-in-one sensor weather stations is presented in Table 4. The values presented in Table 4 represent the collected data and contents of the actual packet with a payload of 11 bytes. However, an essential aspect of bit packing is ensuring the appropriate scale and precision of the data. Many physical measurements can be compressed into smaller data representations, so sending more bits than required for the same data is inefficient. For example, for transferring information about environmental temperature, an 8-bit representation can be used instead of the 11-bit. It enables the representation of a temperature range from \(-40\)\({}^{\circ}\)C to \(+87.5\)\({}^{\circ}\)C, sufficient to display the required temperatures with high accuracy. The same applies to other environmental parameters monitored by sensors, such as the relative humidity sensor, which can measure environmental humidity or soil moisture at different depths, and the pressure sensor or rain gauge which is used to determine the maximum instantaneous rainfall rate. Irrigation planning based on monitoring current conditions in the environment carried out by sensor nodes represents a relevant example of the increasingly necessary application of sensor networks in precision agriculture, especially regarding the necessity of optimal water utilization, which is essential in the face of increasingly frequent water shortages. The proposed 6-byte payload format shown in Table 5 corresponds to the optimal data set for monitoring environmental parameters essential for the crop irrigation process, which provides the same amount of useful information as the previously shown 11-byte payload, but within the reduced packet size.