# Sensors and Communication Simulation for Unmanned Traffic Management
## 5 Proposed Simulation Models for Key Elements
### Drone Control, Navigation, and Trajectory. The drone's trajectory is simulated from the flight plan defined in the pre-simulation phase. This trajectory is completely generated before starting the simulation and it is only  
Figure 5: Example of automatically generated simulation environment (**a**) and flights (**b**). in case of modifications on the trajectory (due to pilot actions or reactions to contingencies) that new requests to the trajectory prediction service are made at simulation time. We focused our efforts on the simulation of multirotor drones using the trajectory calculation engine presented in [30]. This engine uses as a basis a formal language for defining intentions for quadcopters (the so called QR-AIDL, quadrotor aircraft intent description language) presented in [31]. It consists of a series of differential equations that model drone dynamics and that are constrained using the flight plan decomposition with QR-AIDL language. To model the drone, it requires the following input information: minimum, maximum, and average speed, aircraft mass, maximum power, maximum thrust, and battery endurance. This information is included in all drone model instances (DroneModel data type). Additionally, it also considers weather effect on the trajectory. To do so, the weather service provides the required information either using a user-provided weather model or querying external services to retrieve real data in the flight area. The trajectory obtained from this service is sampled and consists of a set of points that completely define the dynamic state vector of the drone: timestamp (referenced to the beginning of the flight), 3D position and speed, altitude, and remaining battery. Taking this predicted trajectory as a starting point, we then considered the effect of the control drift either by the pilot or by drone's autopilot and the navigation error. Control error (particularly in the manual control case) is time correlated. We modeled it by generating a random path that will allow us to slightly deviate from the original trajectory. By applying a linear transformation similar to the one of a constant acceleration linear movement to a Gaussian random walk, we obtained the following model Equation (1) that allows updating simultaneously both position and speed:  
\[\left[ \begin{array}{c}\Delta x[n]\\ \Delta v[n]\end{array} \right]=f\left[ \begin{array}{cc}1&T\\ 0&1\end{array} \right]\left[ \begin{array}{c}\Delta x[n-1]\\ \Delta v[n-1]\end{array} \right]+\sqrt{1-f^{2}}\left[ \begin{array}{c}\frac{T ^{2}}{2}\\ T\end{array} \right]a_{x} \tag{1}\]  
where \(\Delta x\) and \(\Delta v\) are position and speed drifts, \(T\) is the time between two consecutive trajectory points, \(a_{x}\) is the noise acceleration that causes the deviation modeled as \(a_{x}\sim N\big{(}0,\sigma_{xx}^{2}\big{)}\), and \(f\) is the correlation factor. These two last constants would depend on whether the control is automatic and manual and should be defined in their corresponding models (DroneModel or PilotModel) in the model definition service. Drone positioning using GNSS (global navigation satellite system) systems is subject to multiple sources of error: multipath propagation, clock errors, atmospheric propagation disturbances, etc. The drone control system (either pilot or autopilot) uses the position obtained from GNSS systems in a closed-loop feedback system that allows it to guide maneuver execution. These control systems smooth high frequency navigation noise components but have no observability of low frequency errors (such as biases or slow drifts). If we neglect high frequency errors, the kinematic state we calculate after applying the drone control error model in (1) would not correspond to the actual state of the drone, but to an estimate of the state already including this low frequency navigation error. This estimate would become the basis for the drone telemetry calculation, as well as for the simulation of the rest of cooperative sensors.