## 4 Testing and Result Discussion
### System Deployment in the Real Scenario
Indeed, it took the UAV just under a minute to cover the required distance, which according to the farm staff would have taken from ten to fifteen minutes. In addition to that, it was very advantageous to use the UAV to collect visual data from the herd of sheep (thus fulfilling the objective b) about saving information from the performed flights and missions). It can be observed in Figure 12 how it is possible to monitor cattle and have a clear control of the position and the actions that the sheep are carrying out. If required, the operator has the possibility of approaching the herd and directing it in the desired direction (thus effectively using the UAV as a sheepdog) by standing behind the sheep herd and moving the UAV as if it was \"pushing\" the animals. This is represented in Figure 13, where it can be seen how the UAV approaches the herd with the aim of driving it back to the stables. Not only the proximity of the device to the herd can be spotted, but also it shows how the sheep react favorably and move in the same direction as the drone. Figure 11: Location and extension of the testing location. Further flights were carried out where it became evident that a UAV can be used to obtain information about the herd of sheep. However, there were still two more experiments to perform. The first one was making those data available via IPFS network, whereas the other was transferring those data into the built blockchain. To have an IPFS node, it was required to download the software facilities as shown in the official web site and, as long as there is an Internet Protocol-based network connectivity and the installation had no issues, a node would become operational with all the required features for file sharing at the data level working properly. As far as the blockchain development is concerned, there were several elements that were included in each of the blocks:  
1. Current block hash: it identified in a unique manner the data that had been included in the system. It can be regarded as the result of applying a hash function on several pieces of information (usually, current block data, a nonce number, the previous block hash, and timestamps as input data). 2. Previous block hash: it was used as part of the data utilized as input to calculate the hash of the current block, thus chaining together each of the blocks that contain data. Figure 12: Cattle monitoring via UAV. Figure 13: Close view of the sheep herd. 3. Data: These were the actual information collected by the UAV. Typically, it will consist of some multimedia information that will be formatted so that it can be added to the blockchain as text. In the tests that were carried out the codification chosen was Base64, so images were converted into a string of characters that was added to the block. When required, this codification can be reversed, and the image is back to its original format and appearance. 4. Timestamp: it was a piece of information useful to know when data were included in the blockchain. 5. Nonce: it is an acronym of \"_number used only once_\" used to guarantee that there will not be two similar hash outputs in the blockchain. To improve portability and shareability of the information (thus taking advantage of the IPFS data network running just below the blockchain from a layered point of view) the blockchain information was stored as files shared throughout the IPFS network. As explained before, the main motivation to have blockchain in this deployment is providing an extra layer of security and distribution, which adds up to the one provided by IPFS. Since the computers used to store the IPFS-related facilities are also hosting blockchain data shared among all the participants, those computers become blockchain nodes as well. An example of the appearance of the IPFS node once information has been uploaded onto that server has been displayed in Figure 14. The node has several tabs that aid understanding the different elements present in an IPFS network:  
1.