# Unmanned Aerial Traffic Management System Architecture for U-Space In-Flight Services
## 4 UTM System Architecture
### Tactical Deconfliction  
The Tactical Deconfliction module provides support to compute alternative flight plans for UAS that need to resolve a potentially threatening or conflicting situation. The TD receives requests from the EM indicating the necessary information related to the event to solve, i.e., the type of threatening situation and the data of the affected operations and the active geofences. Depending on the situation, the TD will attempt different types of maneuvers to generate a list of alternative flight plans for the involved UAS. For each possible solution, the TD will compute an associated cost and riskiness level, which will be reported back to the EM, together with the generated alternative flight plans. Then, as it was explained in Section 4.5, the EM is the module that makes a final decision about which the best solution to resolve the conflict is. The TD uses two different approaches to compute the alternative routes, depending on whether the threat is a conflict between different UAS or a situation with a single UAS involved. The first case occurs when the flight plans of several UAS are in conflict, e.g., due to a loss of separation. In that case, a geometric approach based on repulsive forces is used to modify the original flight plans. The details of the implemented algorithm can be seen in [35], but it basically models the UAS trajectories as cords with electrical charges that repel each other, in order to increase their separation. By applying vertical or horizontal separation maneuvers between the involved UAS trajectories in an iterative procedure (see Figure 9), the TD can generate several alternative solutions. The priorities of the conflicting flight plans are also considered. The algorithm tends not to modify the flight plans of those UAS whose operations present a higher priority in the U-space. For each computed solution, its cost is calculated as the total distance traveled by the UAS, whereas its riskiness is the length of the UAS routes that still get in conflict with other geofences. Even though these types of conflicts are solved in an iterative manner, by applying the tactical deconfiction procedure for each pair of UAS sequentially, the final solution could still produce additional conflicts with geofences. In this case, the Monitoring module would report those new pending conflicts in subsequent iterations. A second approach is used to solve situations with a single UAS involved. This is the case of a UAS that presents a technical problem, that is out of its Operational Volume, or that has a conflict with a geofence. In all those cases, a heuristic path planner based on the well-known A\({}^{*}\) algorithm is used. First, if the UAS flight plan goes through a geofence, the path planner generates an alternative route avoiding that geofence (see Figure 10, left). Second, if the UAS is already within a geofence, it gets out of the geofence through an _escape_ point, and then it avoids the geofence to resume with its flight plan afterwards (see Figure 10, right). The TD also computes an alternative route from the current UAS position to the last waypoint in its flight plan, in order to skip the conflicting part of the plan and fly directly to the final goal. Third, if a UAS is out of its Operational Volume, two alternative routes are computed: one from the current UAS position to the closest point of its flight plan; and another from the current UAS position to its next waypoint in the flight plan, regardless of how long the UAS remains out of its Operational Volume. In the three cases, an alternative route to return back to the home station is also computed. The EM could select this option if all the other solutions to continue with the operation are too risky. In all the generated solutions, the cost is determined by the total distance traveled by the UAS.