# A Method for Modeling and Testing Near-Real-Time System Scenarios
## 3 Certification of UAV Operational Scenarios
### Linking Scenarios with Functions Affecting Flight Safety
Moreover, in the event that there is an avionics problem during return, the UAV can deploy its parachute immediately in fail-safe mode. This approach is theoretically very safe but carries the risk of the uncontrolled landing of the platform in built-up areas. An even more serious problem will be when the UAV lands on a road where vehicles are moving. Therefore, larger and better-designed unmanned platforms analyze the possibility of returning to base after a failure in the event of loss of communication with the pilot. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**ID**} & \multirow{2}{*}{**Function**} & \multirow{2}{*}{**Emergency State**} & \multirow{2}{*}{**Flight Phase**} & \multicolumn{2}{c}{**Expected Effect on**} & \multirow{2}{*}{**Emergency**} & \multirow{2}{*}{**Veification**} & \multirow{2}{*}{**Methods**} \\  & & & & & **UAVs, Humans, Missions, Other Systems** & & & \\ \hline \multirow{2}{*}{100.1} & Ensuring stability and control & & & & & & \\  & & & & & & & \\ \hline \multirow{4}{*}{100.1} & Determination of spatial orientation in the range, roll, pitch, and yaw of the air platform} & Inability to determine & & & & & \\  & & & & UAV loss: & & & & \\ \cline{1-1}  & & & & & & & \\ \cline{1-1}  & Determination of spatial orientation in the range, roll, pitch, and yaw of the air platform & & All phases except & UAV loss: & & & \\ \cline{1-1}  & & & & & & & \\ \cline{1-1}  & & & & & & & \\ \cline{1-1}  & & & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: An example of the description of an emergency state. Each state is assigned to a function belonging to the group described in the FHA. The emergency state has its priority, indicating how quickly the system should handle the problem that has been identified. It is also worth discussing the types of algorithms that are used to implement the handling of special situations in flight. Currently, many problems are proposed to be solved based on artificial intelligence algorithms. In this group, there are mainly heuristic algorithms and convolutional neural networks for the classification of input data. Formally, it could be considered that the algorithms of this class are sufficient to design safe systems. Our experience shows, however, that deterministic algorithms should be used, the correctness of which is easy to prove formally. Of course, this is not possible in every case. However, it is worth giving two examples of the approaches used. First, Kalman filters are often used to identify failures on an air platform ([PERSON] et al. [28]), which is now standard. For this purpose, algorithms from groups of expert systems based, for example, on techniques implemented in Prolog or CLP languages, are not widely used. The same applies to the algorithms for determining the UAV flight trajectory in the event of a potential collision with another air platform. The most common approach is the geometric approach ([PERSON] and [PERSON] [29]), which can be easily tested on a simulator.