## 3 Methodology  
The Generative Adversarial Network (GAN) can generate new aircraft trajectory data that are statistically the same as those of the given training dataset. The concept behind the GAN relies on training a prediction model indirectly through a discriminator [49]. In this process, another supportive neural network criticizes the predicted data and updates itself accordingly. The generator network is not supposed to minimize the loss corresponding \begin{table}
\begin{tabular}{l l} \hline \hline
**Specification** & **Value** \\ \hline Wing area & 2.3 m\({}^{2}\) \\ Wingspan & 4.2 m \\ Mean aerodynamic chord & 0.57 m \\ Total length & 2.5 m \\ Empty weight & 50 kg \\ Maximum take-off weight & 80 kg \\ Loitering airspeed & 35 knots \\ Maximum speed & 135 knots \\ Operational range & 120 km \\ Service ceiling & 15,000 ft \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The UAS-S4 Geometrical and Flight Data Specification. Figure 3: Hydra Technologies UAS-S4 Ehecatl. Figure 2: Off-line Training and Real-Time Testing of the Deep Neural Network Designed for the ATP. to a specific trajectory, but rather to mislead the discriminator. Therefore, the GAN can be trained while remaining robust, even when dealing with adversarial data [50]. For the mathematical representation of the GAN model concept, we consider a probability space \(\left(\omega,\mu_{ref}\right)\), where \(\omega\) is the sample space and \(\mu\) is the event space. In addition, the \"Generator\" is considered an actor, while the \"Discriminator\" is considered a critic. Both contest each other. The generator network tactic, denoted by \(P_{G}(\omega)\), is composed of measured probabilities \(\mu_{G}\) over \(\omega\). In contrast, the discriminator's tactic is based on Markov kernels such that \(\mu_{D}\ :\omega\to P[0,\ 1]\). The GAN is supposed to solve a zero-sum game according to the following objective function [51]. \[\min_{G}\max_{D}\ V(D,G)=E_{x\sim P_{\text{data}}(x)}\left[\log D(x)\right]+E_{ z\sim P_{z}(z)}[\ \log(1-D(G(z)))] \tag{1}\]  
\(D\) and \(G\) are Discriminator and Generator neural network functions, respectively. \(E\) is the logarithm probability of \(D\) and \(G\) predictions associated with the GPS data, whether is genuine or not. By applying input noise \(P_{z}\), the GAN prediction model learns the distribution of the Generator network \(P_{G}\) over trajectory data \(x\). Therefore, mapping to the data space is achieved through \(G\ (z;\ \theta_{G})\) by relying on the generator's weighing parameters \(\theta_{G}\). The GAN is trained while updating the discriminator's weighting parameters. The training process continues until when the discriminator cannot differentiate between the \(G\) and \(D\) distributions, and \(D(x)=1/2\). The following Algorithm 1 is employed for training the GAN model based on gradient descent [51]. ```
for\(k\) steps do \(\bullet\) Pick a batch of \(h\) number of noise samples \(\{z_{1},\ \ldots,\ z_{h}\}\) from the prior noise \(P_{G}(z)\). \(\bullet\) Pick a batch of \(h\) number of samples \(\{x_{1},\ \ldots,\ x_{h}\}\) from the data generating  distribution \(P_{\text{data}}(x)\). \(\bullet\) Update the discriminator's weighting parameters by ascending gradient as: \(\
abla_{\theta_{G}}\frac{1}{h}\sum\limits_{l=1}^{h}=\left[\log D\Big{(}x_{(l )}\Big{)}+\log\Big{(}1-D\Big{(}G\Big{(}z_{(l)}\Big{)}\Big{)}\Big{)}\right]\) endfor \(\bullet\) Pick a batch of \(h\) number of noise samples \(\{z_{1},\ \ldots,\ z_{h}\}\) from the prior noise \(P_{G}(z)\). \(\bullet\) Update the discriminator's weighting parameters by ascending gradient as: \(\
abla_{\theta_{G}}\frac{1}{h}\sum\limits_{l=1}^{h}=\left[1-\log\Big{(}1-D \Big{(}G\Big{(}z_{(l)}\Big{)}\Big{)}\Big{)}\right]\) endfor  there is no restriction for utilizing the gradient descent algorithm. ```  
**Algorithm 1**GAN's Gradient Descent Training. We designed the trajectory prediction model based on GANs to address the issue of Adversarial Attacks targeting Neural Networks.