# Algorithms for Delivery of Data by Drones in an Isolated Area Divided into Squares
## 2 Materials and Methods
### Algorithms and Protocols for Delivery of Data Using Drones  
The DTN was modeled with a graph having fixed and mobile nodes. There are no connections between the fixed nodes, so there is no possibility of direct data transmission because the considered distance between the nearest two nodes is 3000 m. Network connections are provided by mobile nodes (drones), but their condition is not always the same; they have periods when they are active and periods when they are inactive. This means that there is not always an end-to-end path available between any two nodes in the graph. We tested five well-known routing algorithms for DTNs (Epidemic, Spray and Wait, PRoPHET, MaxProp, and MaxDelivery [54]), and a newly proposed TD-Drone Dijkstra approach, on the square-shaped network shown in Figure 6. We performed tests on the network by choosing random sources and random destinations that could be located on any node (marked as a gray circle or a gray rectangle). We considered the drones worked each day from 7:00 a.m. to 6:00 p.m. and the messages may leave a source node between 7:00 a.m. and 5:00 p.m. We considered 1000 messages randomly sent within this interval of time. Epidemic is the basic form of a flood-based routing protocol: when two nodes meet, they identify the packages that the other node has and transfer the packages that it does not have. At the end of the process, the two nodes have the same content in the buffer. This process is repeated each time two nodes come into contact. When a node has a copy of a message, it waits to meet the destination. In this case, the resource consumption is high but, in a high mobility network, the delay of message transmission is small. In the current network configuration, the algorithm produces poor results due to the low number of contacts between nodes. Spray and Wait is an algorithm with two phases, one for sending messages (spray) and one to wait for the contact with the destination node (wait). This algorithm circulates in two variants--standard and binary--depending on the number of spread copies of the message. It acts in the same manner as Epidemic, with an important difference: the number of spread copies is constant. The spray phase of the standard approach consists of spraying  
Figure 5: (**a**)Testing stand of the NodeMCU Lua Wi-Fi board and the micro-SD card module mounted on a testing breadboard. (**b**)The drone with the 3D-printed case and the Wi-Fi boards mounted on it. L copies of the message by the source node itself. The spray phase of the binary approach consists of spraying half of the number of copies to a meeting node. In this case, not only does the source spray messages, but also every node that has more than one copy. The nodes that have only one copy enter the wait phase. This algorithm has the disadvantage that nodes must keep track of other nodes' movement, but the advantage is that the level of flooding is limited. PRoPHET is similar to Epidemic, with the exception that it uses information from the buffer of the other node to update its predictability vector. Each node calculates the predictability of the message delivery and sends the message onward only if the contact node has higher predictability than its own. The disadvantage of this approach is the relationship between the overhead ratio and the number of nodes--as the number of nodes increases, the overhead ratio increases [15]. This protocol is known for the complexity of its forwarding strategy. Thus, it consumes a significant quantity of resources to process and store historical values. This approach is feasible for networks with high computation and infrastructure capabilities. MaxProp is an algorithm based on prioritizing packet transmission and discarding. The packets in the queue are divided into two categories: those below the \"n\" hop threshold (up to that point), and those above this threshold. Newer packages that have not traveled too much are considered a priority and the guarantee that they will reach their destination is considered to be high.