## 3 Prototype Description and Implementation
### Prototyping of Software Components
#### 3.4.1 Command Ground Station Software Prototyping  
To have all the facilities required to run a laptop/Personal Computer hardware behaving like a CGS, the Mission Planner software must be installed first. This is a software used for planning UAV flights to last for a specific amount of time and point out what locations or intermediate coordinates should be visited. This is a program created by [PERSON] [45] that turns a computer into a complete CGS. It effectively implements all the necessary functionalities for the ArduPilot open-source program described above and thus has been integrated in the built UAV for handling it and performing flights autonomously. While it is only compatible with the Windows Operating System, the Mission Planner program offers as main advantage the possibility to use it as a tool for the configuration of the technical parameters of the vehicle, as well as an aid for the dynamic control of autonomous missions. Some of the features that Mission Planner implements are as follows:  
* Creation of routes for autonomous missions. * Creation of geofences using Google Maps, Open Street Maps or customized WMS (Web Map Services). * Selecting commands for the mission through its Graphical User Interface (GUI). * Downloading.log files with mission records for later analysis. * Configuration of the settings for the auto piloting of the vehicle. * Interface with a flight simulator for the creation of a complete software in the loop UAV simulator. * Execution of SITL simulation on different frameworks for all ArduPilot vehicles. The appearance of the Mission Planner software can be seen in Figure 5.  
In the deployment proposal carried out, a large part of the functionalities offered by this software are used, with the most important ones being the first two (a. and b.) due to the following reasons:  
* The creation of routes for autonomous missions is one of the functions implemented by the program that is most useful for the system proposal described in this manuscript. With this function, the operator of the aircraft can plan a fully autonomous flight by configuring numerous parameters such as the route to be followed by the aircraft, the altitude to be carried at all times or the actions to be carried out in an unforeseen event. With this, the farm staff can schedule reconnaissance flights to check that the herd is in the place where it should be, that there is water in  
Figure 5: Example of Graphical User Interface provided by ArduPilot. the drinkers, etc. Another possibility is carrying out reconnaissance routes to look for possible dangers in the pasture, such as the presence of real animals that can prey on the livestock, or an area with better conditions for the cattle. By means of the GUI offered by the Mission Planner software, the instructions are configured with the parameters that the UAV must follow during the flight. Some examples of parameters that must be configured would be (a) the height to which the aircraft must rise on takeoff, (b) the \"waypoints\" or route points that it must follow or (c) the speed at which it must move, (d) the point where it must land. The parameters mentioned are the most basic that a flight plan must contain. However, there are many more configurable parameters when establishing a flight plan. 2. The other functionality that should be highlighted in the program is its general GUI, which allows the configuration of many parameters such as the station and everything related to it (channels, switches), the adjustment of the speed of the motors, telemetry settings, etc. In addition to that, it also has a window where all the telemetry parameters that can be useful for the handling of the UAV by the operator are shown. Finally, it is worth mentioning that through the GUI of the Mission Planner software it is possible to carry out a series of actions related to the handling and management of the UAV. Although some of these actions can also be carried out through the transmitter, there are others that can only be executed from the software.