## 4 Proposed Solution
### Timing Model  
The number of SNs covered by a mobile DS depends significantly both on the data acquisition interval and the LoRa Time On Air (TOA). Because LoRa uses Chirp Spread Spectrum (CSS) modulation, its TOA is highly dependent on the bandwidth (BW), and the spreading factor (SF) used, as shown in Equation (1). This equation is derived from the equation given in the manufacturer data sheet [54] and uses a set of nominal values for the parameters given in Table 4. It was validated using the online tool [55]. Therefore, network coverage by a mobile DS also depends on the BW and packet length used. The total time for data acquisition depends on the routing from the SN to the DS, as shown in Figure 5. For direct SN to DS data transmission, the total time T\({}_{\text{AQSN}}\) can be calculated using Equation (2). The total time of data transmission from the SN through the RN, T\({}_{\text{AQRN}}\), will be the sum of several data requests, acknowledgement, and data transmission messages, as shown in Equation (3).  
\[\text{TOA }=\left(20.25+\text{ceil}\left[\left(\frac{2\text{PL}-\text{SF}+7}{ \text{SF}}\right)\right]\times\,5\right)\left(\frac{2^{\text{SF}}}{\text{BW}}\right) \tag{1}\]  
\[\text{T}_{\text{AQSN}}=\text{T}_{\text{RDS}}+\text{T}_{\text{DSN}} \tag{2}\]  
\[\text{T}_{\text{AQRN}}=\text{T}_{\text{RDS}}+\text{T}_{\text{ARN}}+\text{T}_{ \text{RRN}}+\text{T}_{\text{DSN}}+\text{T}_{\text{DRN}}+\text{T}_{\text{ADS}} \tag{3}\]  
where T\({}_{\text{RDS}}\) is the TOA of the data request message from the DS, T\({}_{\text{ARN}}\) is the TOA of the acknowledgment message; T\({}_{\text{RRN}}\) is the TOA of the data request message from the RN; T\({}_{\text{DSN}}\) is the TOA of the data message from the SN; T\({}_{\text{DRN}}\) is the TOA of the data message from the RN; and T\({}_{\text{ADS}}\) is TOA of the acknowledgment message from the DS. For simplicity, all the requests and acknowledgement messages are considered to generate a 16-byte LoRa payload, and the data transmission and retransmission messages are 256 bytes. Therefore, T\({}_{\text{RDS}}=\text{T}_{\text{ARN}}=\text{T}_{\text{RRN}}=\text{T}_{ \text{ADS}}=\text{TO}_{\text{min}}\), and T\({}_{\text{DSN}}=\text{T}_{\text{DRN}}=\text{T}_{\text{DRN}}=\text{T}_{\text{ADN}}\).  
Figure 6: (**a**) Software algorithm for the SN, (**b**) SN dynamic routing algorithm, and (**c**) software algorithm for the DS.  
TOA\({}_{\rm max}\). Then Equation (3) can be written as Equation (4), and the time can be calculated using the values given in Table 4.  
\[\rm T_{\rm AQRN}=4 TOA_{\rm min}+2 TOA_{\rm max}{=4\times 197.25+2\times 33.41=855.82\ ms} \tag{4}\]  
The last acknowledgment message from the DS is an optional message for event-sensitive data transmission (hence, \(\rm T_{\rm ADS}=0\) and \(\rm T_{\rm AQ}=822.41\ ms\)). The maximum number of SNs covered by a single DS can be calculated using Equation (5). \(\rm U_{\rm CH}\) and \(\rm R_{\rm OH}\) stand for wireless channel utilization over the whole WSN and the SN's processing overhead ratio, respectively. Given a data acquisition interval of 15 min and 20% processing overhead (which depends on the SN hardware design and is obtained from the experimental data for the implemented SN), the maximum number of SNs (\(\rm N_{\rm max}\)) under one DS is found to be 142 for the given LoRa parameters.  
\[\rm N_{\rm max}\ =\ \rm ceil\Bigg{(}\frac{Duty\ Cycle}{T}\ \times\ U_{\rm CH} \times\ R_{\rm OH}\Bigg{)} \tag{5}\]