# A Novel Data Forwarding Strategy for a Drone Delay Tolerant Network with Range Extension
## 4 Heuristic Flight Path Planning (HFPP)  
In this section, we propose a heuristic method called Heuristic Flight Path Planning (HFPP) that prioritises the data packets during a contact in order to select the best possible flight path. In other words, compared with similar intermittent networks where vehicles have their own mobility models and help as relays to route data packet, in this approach, drones slightly modify their path in order to meet the data packet's destinations. As discussed earlier, the cost-efficiency of drones enables this scenario to be practical and commercialized. However, one of the parameters that influence the performance of such network is energy. Drones consume power for two reasons, (i) communications, and (ii) flying. Hence, packets are prioritized, an important factor in weighting the packets is the amount of energy that is used for their transmission. Specifically, the consumption of transmission energy when a drone sends \(B\) bytes to any node is calculated as follows (from [28]):  
\[E_{send}=B(\alpha_{1}+\alpha_{2}\times\varphi^{\gamma}) \tag{1}\]  
where \(\varphi\) is the physical distance between nodes in contact \((\varphi^{\gamma}\leq R)\) and \(\alpha_{1}\) is the energy consumption rate per forwarded byte. The energy consumption of the amplifier per byte is indicated by \(\alpha_{2}\times\varphi^{\gamma}\), where \(\alpha_{2}\) is the energy consumption factor of the amplifier circuit and \(\gamma\) is the path loss exponent, which ranges between two and four in Wi-Fi communication [29]. As mentioned, drones also consume energy to overcome gravity and drag forces due to forward motion and climate conditions. It should be noted that in a round trip, drones will have different energy consumption rates as in most of the cases drones have no package loaded on the return trip. This implies that drones consume lower power on their return trip. We calculate the energy consumption for a delivery trip of distance \(\xi\) (in meters) as follows:  
\[E_{motion}=(e_{loaded}+e_{unload})\xi \tag{2}\]  
where \(e_{loaded}\) represents the power with the package present and without the package is indicated by \(e_{unload}\). In other words, the total energy consumption of the outbound trip and the return trip is calculated (our recent work discusses more in details [15]). From Equations (1) and (2), we derive the total energy consumption as follows:  
\[E_{total}= E_{motion}+E_{send} \tag{3}\]  
Now, HFPP calculates the weight of a data packet \(i\) based on \(\mu_{i}\), \(\overline{\text{T}}_{i}\), and \(E_{send}\). Specifically,  
\[\omega_{i}=\mu_{i}-\left(\overline{\text{T}}_{i}+E_{total}\right) \tag{4}\]  
Based on (4), when the time to live decreases or low energy is consumed for transmitting packet \(i\), the weight of the packet increases. Hence, when a packet has a short time to live, as it will be dropped shortly, a higher chance is given to the destination of that packet to be fit in the drone's flight path. This is because dropped packets will decrease the delivery ratio of the network. Hence, at each time that drones re-plan their flight path, the weight of packets increases as the time to live becomes shorter. Note that, due to the different scales of said parameters, we utilize a standard score as in [30] and normalize them that enables us to compare the different variables. The purpose of such prioritization is to add the destination of high ranked data packets to the drone's path. However, the drones' limited energy may not enable them to meet even nearby waypoints. In order to solve this issue, when a waypoint is added to the path, \(l_{max}\) is calculated based on the power consumption. Specifically, \(l_{max}\) can be derived from Equation (2) as follows:  
\[l_{max}=\frac{e_{budget}}{e_{loaded}+e_{unload}} \tag{5}\]where \(e_{budget}\) is the available energy level. Now, if by adding the next waypoint, the drones will not reach to the origin due to the not having enough battery, the nearby wireless charging station is added to path.