# Implementing and Testing a U-Space System: Lessons Learnt
## 5 Tests
At right can be seen part of the dialog of the middleware that INTA developed to monitor the communications with UTM. On it they could check the status of the connection with U-space, if the reports were being sent, the confirmation replies from the UTM and the instructions received. Figure 22: Planned geo-cages within which the UAV would perform the road inspection. Figure 23: Comparison of the trajectory requested, the one assigned by the path planner, and the one really executed during Exercise 1 of ground traffic surveillance. Figure 24: Comparison of the trajectory requested, the one assigned by the path planner, and the one really executed during Exercise 2 of ground traffic surveillance. Figure 26: **Left:** the Web app showing the execution of Exercise 2. **Right:** INTA’s middleware between their GCS and the U-space for the communication exchange. Figure 25: INTA’s GCS shows the drone (aircraft icon) heading to the geo-cage (polygon in blue) in the point of interest. Red dots are the waypoints of the flight plan. At right, the video feed from the UAV. Two DJI Matrice 300 RTK (DJI, Shenzhen, China) were involved in this exercise, both equipped with a DJI Zemnuse H20 camera. The need of a camera with a high performance was related to the use of a software during the surveillance that used computer vision techniques to act a as flying speed radar. The tool would tag the cars in the video feed provided from the drone with their speed in real time (Figure 27). This same feed could be used, if some infraction was detected (using the smartphone while driving, or with no seat belt on), to read the car plate, even when the flights were at such a high altitude (in some cases, in the limit of the allowed 120 m) that the people or the drivers overflow would not notice or hear them (Figure 28). An issue appeared related to the conversion of the altitudes; the Matrice 600 was not able to take-off and fly back home after delivering the defibrillator due to inconsistencies in the altitude values. The drones took as reference the relative altitude to the take-off point. To adapt the value of the mean sea level (MSL) provided by the path planner to the relative altitude of the drone, the difference between the altitude values along the trajectory were subtracted from that of the first take-off point (home point). But when the drone landed to deliver the defibrillator, the area was slightly under the home point used as reference, and the result of subtracting it was negative altitude, e.g., take-off point at 210 m, set as ground level reference 0 m for the whole mission; second waypoint at 215, ground level reference 5 m; landing; the path planner determines that the second take-off is at 205 m, and the ground level reference is calculated as \(205-210=-5\). The second exercise with SAMUR was addressed to use the drones during a mass event wherein an emergency resulted in a confused mass of people running to escape from a danger. The previous three multi-rotors would be used again to help the people to evacuate the area. INTA found this exercise the most demanding in terms of workload for the aircrew. It was also performed in the CIAR aerodrome, but a set of geo-fences simulated the environment of the stadium Santiago Bernabeu in Madrid and the surrounding buildings (Figure 30). Figure 28: Even flying at 120 m of altitude, it could be verified whether the drivers had their seat belt on, or if they were using their smartphone while driving. Figure 29: (**a**) Evaluation of the accident from the drone. (**b**) Delivery of a defibrillator. (**c**) The ambulance has been guided to the accident. All images obtained from the video streaming of one of the drones. Initially, two drones (Matrice 300) were executing routine surveillance L-shaped flights in a loop along opposite sides of the stadium (Figure 31, orange and light blue). Suddenly, one of the drones identified a suspected threat and canceled its current flight to hold position and inspect the target.