# A Semi-Random Elliptical Movement Model for Relay Nodes in Flying Ad Hoc Networks
## 3 SREM Model
### Implementation of SREM  
In the SREM model, the major axis of the ellipse is aligned with the relay path, and UAVs move in straight lines between randomly selected points along the ellipse boundary. This point-to-point movement pattern naturally produces a relay-centric node distribution, while the elliptical boundary serves as a structural constraint that defines the UAVs' operational space. To ensure uniform coverage of the entire area, the SREM model periodically adjusts the size of the ellipse after a fixed number of movements, preventing nodes from remaining confined to a single elliptical trajectory. This approach helps maintain a balance between randomness and structural constraints while enhancing spatial diversity. As outlined in Algorithm 1, each UAV begins by randomly selecting an initial angular position on the elliptical boundary, then it determines a new target angle and moves in a straight line toward the corresponding point. This procedure is repeated throughout the \begin{table}
\begin{tabular}{l l l} \hline \hline
**Feature** & **SRCM**[34] & **SREM (Proposed)** \\ \hline Trajectory shape & Circular path & Elliptical path \\ \hline Movement style & Curved movement along circular arc & Straight-line movement between random points on the ellipse \\ \hline Node speed & Constant angular velocity (\(\omega\)) & Constant linear velocity (\(v\)) \\ \hline Position bias & None & None \\ \hline Purpose & Uniform area surveillance & Relay alignment along the relay axis \\ \hline Flexibility & Limited control over spatial distribution & Directional density adjustable via ellipse parameters \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison between SRCM and SREM mobility models. simulation to maintain spatial diversity and prevent pattern stagnation. The algorithm incurs minimal computational overhead, as each UAV performs a small set of operations--namely, generating random angles and computing their corresponding coordinates via trigonometric functions. These steps are executed in constant time per UAV, yielding a per-node computational complexity of \(\mathcal{O}(1)\). Consequently, for a network of \(N\) UAVs operating concurrently, the total computational complexity per iteration scales linearly as \(\mathcal{O}(N)\), making the algorithm efficient and well-suited for simulating large-scale FANET scenarios. ```
Input:\(num\_nodes\): Number of UAV nodes \(O\): Coordinates of the ellipse center \((x,y)\) \(major\_axis\_base\): Base length of the major axis \(aspect\_ratio\): Minor-to-major axis ratio \(b/a\) \([min\_scale,max\_scale]\): Ellipse scaling range \(steps\_per\_node\): Number of discrete movements per node \(change\_scale\_every\): Frequency of ellipse scaling (in steps) \(angle\_step\_range\): Range of angular step \([\theta_{min},\theta_{max}]\) Output: Straight-line trajectories between random points on an ellipse
1 Initialize angle, scale, \(a\), \(b\); for\(i\gets 1\) to \(num\_nodes\)do
2 Randomly assign initial angle \(\theta_{current}\in[0,2\pi]\);
3 Randomly choose \(\mathrm{scale}\in[min\_scale,max\_scale]\);
4 Compute \(a=major\_axis\_base\times\mathrm{scale}\);
5 Compute \(b=a\times aspect\_ratio\);
6 for\(step\gets 1\) to\(steps\_per\_node\)do
7 Select angular increment \(\theta_{step}\in angle\_step\_range\);
8 Update \(\theta_{next}=(\theta_{current}+\theta_{step})\mod 2\pi\);
9 Compute current point: \(x_{1}=O_{x}+a\cos(\theta_{current}),\quad y_{1}=O_{y}+b\sin(\theta_{current})\);
10 Compute next point: \(x_{2}=O_{x}+a\cos(\theta_{next}),\quad y_{2}=O_{y}+b\sin(\theta_{next})\);
11 Move from \((x_{1},y_{1})\) to \((x_{2},y_{2})\);
12 Set \(\theta_{current}=\theta_{next}\);
13 if\((step+1)\) mod \(change\_scale\_every=0\)then
14 Randomly update \(\mathrm{scale}\in[min\_scale,max\_scale]\);
15 Recompute \(a\) and \(b\);
16
17 end if
18
19 end for
20
21 end for
```  
**Algorithm 1**SREM implementation algorithm. Figure 3 visualizes the distribution of node trajectories across different simulation steps under the proposed SREM model.