1 Introduction

Research on Unmanned Aerial Vehicles (UAVs) has seen a significant surge in interest lately and has gained popularity among various scholars. UAVs, as a novel form of wireless communication equipment, offer numerous advantages, including robust durability, exceptional mobility, ease of deployment, and no risk of loss. One common application for UAVs is in Flying Ad Hoc Networks (FANETs), where they are used for monitoring areas through sensors, capturing photos, or recording videos. This necessitates maintaining Quality of Experience (QoE) measures to ensure consistent video streaming and efficient data transfer [1]. To establish communication routes, it is essential to select alternative paths using routing information. These routes may involve multiple hops through intermediary nodes. In essence, communication should not be limited to the range of each device but should encompass the combined range of all devices. UAV mobility plays a crucial role in determining contact paths and their spatial arrangement. These paths are typically reconstructed to ensure continuous movement and connectivity among UAVs. Therefore, dynamic routing processes are crucial to enhance UAV autonomy and minimize the delay between a source and target node [2, 3]. UAVs need to broadcast their anticipated future trajectories to predict potential collisions with other objects or humans. In real-world scenarios, communication disruptions, such as jamming or interference, may occur, rendering UAV contact unreliable. Thus, multiple UAVs need to navigate safely even without communication. Predicting the movements of other entities is a valuable strategy to prevent collisions without relying on communication [4]. Various trajectory prediction methods have been explored, leveraging intelligent electronics on UAVs to mimic real-time transport conditions, determine their positions, adjust their flight status, select optimal trajectory stages, and calculate secure routes. These are essential prerequisites for UAVs to effectively carry out their tasks and address uncertainties in UAV formation movements. Consequently, selecting an appropriate method for UAV formation trajectory planning is of paramount importance [5]. The research problem addressed in the study revolves around the need to develop an energy-efficient trajectory prediction solution for Unmanned Aerial Vehicles (UAVs) in the context of a three-dimensional (3D) environment.

The main concern is creating an energy-optimizing trajectory prediction system that saves the use of energy as well as ensures to prediction of the UAV flight paths. This is important so that the complete performance and efficiency of the UAV networks are enhanced; mainly in the situations where UAVs fly dynamically in uncertain environments.

The research problem envelopes the following pivotal points:

  • Energy Efficiency The demand to have minimum consumption of energy is preeminent since the operational power resources of UAVs are often limited. A trajectory prediction system can be considered efficient only if it can cut down unneeded energy expenses while flying.

  • Trajectory Prediction Accurate prediction of UAV flight trajectories is crucial to make sure that UAVs can plan their pathways effectively, bypass the barriers, and achieve targeted aims.

  • Three-Dimensional Environment The research problem specifically focuses on addressing the challenges presented by UAVs operating in a 3D space, which includes accounting for altitude variations in trajectory prediction.

  • Optimization The study seeks to optimize the trajectory prediction process through the proposed "3D Improvised Protocol," which implies the development of a protocol or algorithm that enhances the prediction accuracy while conserving energy.

In summary, the research problem aims to find an energy-efficient solution for predicting UAV trajectories in a 3D environment, The manuscript contributes to the field in the following ways:

  • It introduces a 3D node mobility model, enabling the calculation of UAV node speed and direction.

  • Node location information is predicted by considering node movement distance, node degree, and node density.

  • The manuscript calculates residual energy, node fitness functions, and distance thresholds for all UAV nodes.

  • The selection of the next hop forwarding node is based on choosing the candidate node with the lowest metric.

  • Comparative results are provided by comparing the proposed approach with other clustering routing protocols like RATP, EORBTP, and LEPR.

The manuscript's structure can be summarized as follows:

  • Section 2 reviews related research papers on UAV routing protocols, trajectory schemes, and 3-dimensional aspects.

  • Section 3 covers problem formulation, network assumptions, and mathematical representations.

  • Section 4 delves into the details of the proposed 3D trajectory prediction method.

  • Section 5 presents simulation results, including graphs illustrating various performance metrics.

  • Section 6 analyzes and interprets the results.

  • Section7 concludes the inquiry and outlines future directions.

2 Related Work

Paper [6] provides a comprehensive overview of the latest technological advancements in satellite communications, encompassing standardized, industrial, and academic research. The paper highlights various key applications and uses of satellite communications technology. One notable concept discussed in the manuscript [7] is the Space-Terrestrial Integrated Network (STIN), a complex network that integrates the Internet, mobile wireless networks, and the broader space network. This innovative idea explores the potential of STIN for diverse applications, including monitoring and data transmission via sensors. In the paper [8], a study investigates the user spectral efficiency of single-tier drone networks compared to multi-tier drone configurations. The research explores how different urban environments impact multi-tier drone networks and identifies an optimal drone distribution that balances line-of-sight (LoS) probability and route loss to enhance user spectral efficiency. Manuscript [9] presents a two-stage approach for a three-tier mixed network, designed to facilitate IoT applications while reducing power consumption in UAV networks. This approach significantly improves UAV networking performance. To address the dynamic topology and unreliable connections in FANETs, a study [10] introduces an adaptive routing system. This routing protocol employs a Gaussian mixture model to predict node movement in the future and calculates a trajectory metric value to prevent edge effects and routing gaps. Meanwhile, the RATP technique in [11] focuses on the node's historical trajectory and uses a Gaussian process to determine node characteristics and potential temporal velocity. It selects the data forwarding node with the lowest metric value to reduce packet loss at the network's border and minimize edge node usage. In [12], the author presents a bio-inspired approach that combines glow-warm swarm optimization and krill herd techniques to optimize UAV node positions. This approach enhances connectivity, coverage, area, and energy efficiency. Additionally, the manuscript [13] explores the integration of contemporary technologies with IoT, providing insights into design considerations for IoT networks. Manuscript [14] introduces the DREMA routing algorithm, wherein network nodes broadcast their updated position information, reducing network overhead with improved accuracy. However, it may not be suitable for large networks. In the context of source node selection, a clustering-based discrete particle swarm optimization algorithm is proposed in [15] to find the nearest neighboring node within the angle range. Energy-efficient cluster-based routing methods, such as those presented in [16], aim to minimize energy consumption during node clustering cycles. Authors in [17] introduce a clustering strategy with location and mobility awareness for enhanced UAV network security but acknowledge its limitations at high speeds. Trajectory prediction-based routing protocols, as discussed in [18], calculate node movements and create node mobility models to reduce potential interference. The HD4M technique proposed in [19] optimizes UAV heights and IoT device power consumption for interference reduction.

In [20], the author addresses the challenges of UAV-BS deployment in both upward and diagonal dimensions, focusing on orbital positioning and navigation. Multi-UAV wireless networks are explored in [21], considering user scheduling, UAV flight paths, and transmit power to achieve optimal user rates.

Paper [22] introduces a technique that surpasses previous energy protocols in network lifespan and consistency, considering various parameters. In [23], the Leach protocol is used for cluster head selection, with a focus on cluster head selection threshold values. Manuscript [24] discusses the potential applications of IoT clustering in contemporary technologies integrated with IoT. It provides insights into design issues for IoT networks. The advantages and disadvantages of LEACH-variant protocols are covered in the paper [25]. In the context of HSVN, [26] presents a distributed mechanism for ensuring WSN connectivity and coverage. The proposed protocol can detect road events and maintain integration between sensor nodes in the event of sensor node failures. Paper [27] addresses the power consumption issue of the Leach Routing Protocol in WSN, while [28] conducts a comparative study of different variants of Leach routing protocols. The MG Leach protocol, presented by the author of [29], combines multi-hop simulated annealing and a LEACH-derived method for node selection. In [30], K-Means is employed before cluster head selection to conserve energy and communication costs, with a focus on its effects on various performance metrics. The challenges of creating new routing protocols for UAVs and flying ad-hoc networks are summarized in [31]. Manuscripts [32] and [33] explore fully connected hop field networks, addressing network performance and weight slip. Meanwhile, [34] recommends using the goal-biased PF-RRT* algorithm for UAV trajectory planning in congested environments. The use of self-attention is discussed in [35] to calculate UAV states efficiently, simplifying information processing in UAV swarm scenarios. This method is also employed in [36] to facilitate information processing for UAV swarm situations. In [37], an Attention-based Interaction-aware Trajectory Prediction (AI-TP) model is proposed for traffic controllers in near-autonomous vehicles. The AI-TP model employs advanced techniques like Graph Attention Networks (GAT) and Convolution Gated Recurrent Units (ConvGRU) for predictions.

Manuscript [38] focuses on advanced computational methods for 4D trajectory resolution and conflict detection. In [39], the recommended model detects human-contextual connections and path risk, contributing to autonomous video analysis and behavioral evaluation. To forecast heterogeneous multi-agent trajectories, [40] employs a gate mechanism and a directed edge-featured heterogeneous graph. It helps in minimizing inter-agent communication in congestion scenarios. In [41], the Deep-PANTHER trajectory planner for dynamic situations, combining learning-based and perception-aware algorithms, is presented. The author of [42] employed a hybrid phantom technique that blends the use of phantom nodes with multi-path routing. This approach enhances privacy and lowers energy consumption within the routing process. In the manuscript [43], Co-DLSA is presented as an extension of the DLSA routing scheme, offering a novel routing approach designed to minimize transmission delays. Manuscript [44] provides an extensive survey on TCAs (Traffic Control Algorithms) for FANETs (Flying Ad-Hoc Networks). These algorithms aim to enhance mission and communication performance by regulating the mobility and transmission power of Unmanned Aerial Vehicles (UAVs). The author of [45] explores methods to prolong drone flight duration through the deployment of charging stations, while also optimizing the capability to accomplish multiple deliveries within a single mission. In the manuscript [46], a fresh approach known as the Q-learning-based Topology-Aware Routing (QTAR) protocol is introduced for FANETs, aiming to establish dependable connections between source and destination points. The QTAR protocol enhances routing decisions by considering two-hop neighbor nodes, thereby expanding the network's local topology awareness. [47] manuscript provides an in-depth examination of UAVs, including their various classifications, applications in crop monitoring and health assessment, use of agricultural sensors, remote sensing capabilities when combined with UAVs, animal tracking, pesticide distribution, and other potential agricultural applications, all within the context of Precision Agriculture. [48], This research provided an improved Particle Swarm Optimization (PSO)-based placement method for determining the smallest number of drones equipped with a small cellular BS (DBSs) and their best placements. To boost performance, a K-means clustering-based strategy is used in the PSO algorithm to estimate the starting value of the number of DBSs. This manuscript [49] focuses on area coverage as well as a dynamic technique for designing a collision-free path to cover the target area with several UAVs. This paper [50] explores a communication system that leverages unmanned aerial vehicles (UAVs) for both transmitting data and transferring power simultaneously, known as SWIPT (Simultaneous Wireless Information and Power Transfer). The modeling of the overall communication channel incorporates factors such as the probability of having a direct line-of-sight (LoS) path versus a non-line-of-sight (non-LoS) path, as well as the impact of log-normal shadowing.

3 Network Assumption

Most trajectory algorithms for FANETs proposed previously derived from a simple neighborhood equation that simply considers communication range to be a needed and acceptable criterion for two nodes to be neighbors. This is true in most cases involving Ad-Hoc, MANET, and VANET networks since the neighborhood can only exist if a safe distance between UAVs is maintained; nevertheless, with UAVs, this assumption is frequently wrong and inconsistent. This section describes the approach of node trajectory prediction; it is separated into two parts: acceleration forecasting using the Gaussian Mixture Model (GMM) and three-dimensional in-form location calculation. The position of every single UAV node in the links, velocity, and direction are accessible through the BeiDou satellite network. Based on the nodes' location information, build an appropriate node movement model using analysis. The first step is to determine the node's average movement speed, which may be determined by viewing the node's moving speed over an extensive period.

3.1 UAVs Speed Prediction

The first step is to determine the node’s average movement speed, which may be determined by watching the node’s moving speed over an extended period.

$$ avgspeed = \lim_{t \to \infty } \left( {\frac{{^{\sum_{t = 0}^\infty {Vi} } }}{t}} \right) $$
(1)

Based on the features of the trajectory of the UAV vertices are thought to follow a Gaussian distribution (bell curve) in FANETs. Equation (2) can be used to calculate the normal distribution's probability density.

$$ f(x_n |\mu ,\sigma^2 ) = \frac{1}{{\sqrt {2\sigma^2 \prod } }}e^{ - (x_n - u)^2 } /2\sigma^2 $$
(2)

\(\mu\) = means of distribution.\(\sigma\) = standard deviation\(\sigma^2 = Variance\)

The \(\sigma\) standard deviation of data can be computed as describes the degree of variation of dispersion of a set.

$$ \sigma = \sqrt {{\frac{1}{x_n }}} \sum_{i = 1}^{x_n } {(di)^2 } $$
(3)
$$ \mu = \frac{1}{x_n }\sum_{i = 1}^{x_n } {mi} $$
(4)

\(x_n\) is several m measurements of the sample. Future prediction of the UAV’s node:—The status of the UAV node in the future can be represented by Eq. (5).

$$ \delta = \frac{{e^{\frac{{ - x_{n^2 } }}{2\Pi^2 }} }}{{\sqrt {2\Pi \lambda } }} $$
(5)

\(\lambda\) is the state constant that values 0 or 1. This is a representation of the node's movement efficiency; this measures the degree of node speed variation.

3.2 Mobility Model

This model computes the speed and direction of movement for each Mobility model and then goes in that direction for a certain amount of time. The duration spent in movement in each interval before changing speed and direction is constant. The following equation compares the current velocity and trajectory to the previous trajectory and velocity.

$$ {\text{S}}_{{\text{dn}}}\, { = }\,\alpha S_{dn - 1} + (1 - \alpha )\overline{S_d } + (1 - \alpha^2 )\sqrt {{S_{_d } x_{n - 1} }} $$
(6)
$$ D_{{\text{tn}}}\, { = }\,\alpha D_{tn - 1} + (1 - \alpha )\overline{D_t } + (1 - \alpha^2 )\sqrt {{D_t x_{n - 1} }} $$
(7)

As \({\text{S}}_{{\text{dn}}}\) and \(D_{{\text{tn}}}\) are speed and direction values for movement over time n. \(S_{dn - 1}\) and \(D_{tn - 1}\) are speed and direction values for movement in time n-1. \(\alpha\) is a constant with a value between 0 and 1. \(S_d\) and \(D_t\) are constant that reflects the average speed and direction. The variables \(D_{tn - 1}\) are Gaussian distribution variables. \(\alpha\) is a single tuning parameter that specifies different levels of randomness or unpredictability. The degree of unpredictability affects the movement of UAV nodes. To obtain the maximum speed \({\text{S}}_{{\text{dn}}}\) and direction \(D_{tn}\), the value of \(\alpha\) is set to zero.

If.

\(\alpha\) = 0.

then

$$ S_{{\text{dn}}} { = }\overline{{{\text{S}}_{\text{d}} }} + \sqrt {{S_d x_{n - 1} }} $$
(8)
$$ D_{{\text{tn}}} { = }\overline{D_t } + \sqrt {{D_t x_{n - 1} }} $$
(9)

In the opposite case, the value is adjusted to one to get the lowest speed and direction as in Eqs. (10) and (11).

If.

\(\alpha\) = 1.

Then

$$ S_{{\text{dn}}} {\text{ = S}}_{\text{dn - 1}} $$
(10)
$$ D_{tn} = D_{\text{tn - 1}} $$
(11)

Probabilistic Velocity of UAV Nodes: -Assume that every data point may be formed by changing the data point with \(\rho \lambda j + \mu\) (\(\rho\) is a matrix). As older GPS track data typically contains noise, assume throughout this article that the noise data likewise follows the Gauss distribution, i.e., so the anticipated data follows the Gauss distribution that is equal to \((\mu + \rho \lambda + \kappa )\). Equation (12) is the model of trajectory uncertainty.

$$ P_t (V|\lambda ) = \Pi_{N = 1}^k \sum_{N = 1}^k {w_{tN} } \phi (V_j |\mu_j + \rho \lambda_j ,\varepsilon ) $$
(12)

where \(w_{tN}\) = the weight of the Gaussian process \(w_{tN} \ge 0\).

The probabilistic density function of the Gaussian process is denoted by \(\phi\), whereas the number of Gaussian processes is represented by \(k\).

3.3 Node Location

Predict the node's future position to determine its speed at the next time. In this manuscript, \((x_{t1} ,y_{t1} ,z_{t1} )\) the node's location at a given point in time is t. The node's location at a future time \((t_1 + \Delta t_x )\) may be calculated using the velocity \(v_{t1}\), position \((x_{t1} ,y_{t1} ,z_{t1} )\), and orientation \((\phi_x ,\phi_y ,\phi_z )\) (The velocity scalar alteration degree) of the UAV’s mobility at time t and time \((t_1 + \Delta t_x )\). During a temporal modification, the geographic position is determined as illustrated in Eq. (13):

$$ x_{t1 + \Delta tx} ,y_{t1 + \Delta tx} ,z_{t1 + \Delta tx} = \left\{ \begin{gathered} x_{t1 + \Delta tx} = x_{t1} + v_{t1 + \Delta t} \Delta t_x \cos \phi_x \hfill \\ y_{t1 + \Delta tx} = y_{t1} + v_{t1 + \Delta t} \Delta t_x \cos \phi_y \hfill \\ z_{t1 + \Delta tx} = z_{t1} + v_{t1 + \Delta t} \Delta t_x \cos \phi_z \hfill \\ \end{gathered} \right\} $$
(13)

If the node's traveling direction has not changed in time, the coordinate position is computed as in Eq. (14).

$$ x_{t1 + \Delta tx} ,y_{t1 + \Delta tx} ,z_{t1 + \Delta tx} = \left\{ \begin{gathered} x_{t1 + \Delta t} = x_{t1} + v_{t1 + \Delta t} \Delta t_x \hfill \\ y_{t1 + \Delta t} = y_{t1} + v_{t1 + \Delta t} \Delta t_x \hfill \\ z_{t1 + \Delta t} = z_{t1} + v_{t1 + \Delta t} \Delta t_x \hfill \\ \end{gathered} \right\} $$
(14)

3.4 Distance of Moving UAVS Node

The node's moving distance is the node's length as it progresses from instant \((t_1 + \Delta t)\), which is indicated by \(\delta D_s\). If the node's motion in steady movement is only somewhat approximated by a brief period, the range may be determined using the physics displaced formula (1517):

$$ \delta D_s = D_{s_{(t1 + \Delta t)} } - D_{st1} $$
(15)

\(D_{s_{t1} }\) represents the total UAV travel distance in t times. \( D_{s_{t1 + \Delta t} } \) is the total distance reached by UAVs in \((t_1 + \Delta t)\) time.

$$ \delta D_s = \sqrt {{(x_{t1 + \Delta t} - x_{t1)}^2 + (y_{t1 + \Delta t} - y_{t1} )^2 + (Z_{t1 + \Delta t} - Z_{t1} )^2 }} $$
(16)
$$ \delta D_s = 3(v_{t1 + \Delta t} + \Delta t) + \cos^2 \phi x + \cos^2 \phi y + \sin^2 \phi z $$
(17)

Figure 1 represents UAV’s node movement in this figure A’ represents the expected position of UAV node A in the future.

Fig. 1
figure 1

Deflection angle of UAV nodes

(18) And (19) are used to calculate the angle deflection between nodes A' and A.

$$ \sin \beta = \frac{{DA^{\prime} - DA}}{{DAA^{\prime}}} $$
(18)
$$ \beta = \,\sin^{ - 1} \frac{{DA^{\prime} - DA}}{{DAA^{\prime}}} $$
(19)

The specified value of the trajectory metric for the UAV sensor is (20).

$$ \partial j = \left( {\tau _{ax} \frac{d}{{d_0 }} + \tau _{by} \frac{{4\beta }}{\pi } + \tau _{cz} \left( {1 - \frac{n}{N}} \right)} \right) $$
(20)

\(\tau_{ax}\) = Distance factor,\(\tau_{by}\) = Angle factor,\(\tau_cz\) = Factor of a neighbour node,\(d\) = Distance in Euclid between neighbours and destination nodes,\(d_0\) = Distance between the present vertex and the desired vertex in Euclid,\(n\) = Neighbour nodes of present vertex, \(N\) = Total numbers of all nodes in the networks.

The bigger the value \(\partial j\), the more likely it is that the UAV will be selected as the next hop. The UAV node selected gives the following benefits, according to the metric value calculation method:

  1. 1.

    Choose the next hop to reduce the routing hops, use the nearest node to the destination.

  2. 2.

    To avoid the boundary effect choose the next node that has a small amount of displacement.

3.5 Residual Energy

In FANET, energy is lost during UAV-to-UAV communication \(\left( {U_{Ec} } \right)\), UAV-to-UAV flight time energy \(\left( {U_{Fc} } \right)\), and the combined energy lost during sensor-mounted UAV operation \((U_{ES} )\). The energy used for PKT transmission and PKT received accounts for most of the energy consumed in communication. So, we calculated the total residual energy of the UAV \(\left( {U_{ETr} } \right)\) by using Eq. (21) and energy lost during UAV–to–UAV communication \(\left( {U_{Ec} } \right)\) by using Eq. (22)

$$ U_{ETr \, } = U_{Ec} + \, U_{Ef} + \, U_{Es} $$
(21)
$$ U_{EC \, } = U_{EPtx \, + } U_{EPrx} $$
(22)

The energy used for PKT transmission \(\left( {U_{EPtx} } \right)\) and PKT received is \(\left( {U_{EPrx} } \right)\) calculated by using Eqs. (23), and (24).

\(U_{Eamp}\) Denotes the energy of the transmitter amplifier, and n denotes the number of bits per PKT.

$$ U_{EPtx} = \, U_{Ee} * \, n \, + \, U_{Eamp} *n \, * \, \left( {distance} \right)^{2 } $$
(23)
$$ U_{EPrx} = \, U_{Ee} * \, n $$
(24)

where \(U_{EPtx}\) and \(U_{EPrx}\) the energy used to operate the transmitter and receiver.

3.6 Node Fitness Function \(\alpha_i\) , Delta_ Difference, Distance Threshold \(l_{th}\), Fading Variable \(I_0\)

The node fitness is a key component of an algorithm. It specifies the algorithm’s accuracy. The best cluster head (CH) is selected by employing an accurate node fitness function ⍺i which is not influenced by any parameter and yields more accurate results. Each node computes and broadcasts its fitness value to the nodes surrounding it. After obtaining 3D position data and determining the broadcast range.

$$ \alpha_i = \frac{{w_1 *U_{ETr} }}{{\left( {w_2 *avg Dist} \right)*\left( {w_3 *delta\_diff} \right)}} $$
(25)

In Eq. (25) the weights w1, w2, and w3 represent total residual energy, Average Distance (avg Dist.), and delta diff. The load balancing factor is represented by delta diff. The difference between the degrees of two UAVs is called Delta_ difference and this is represented by Δ. This is calculated by Eq. (26).

$$ \Delta = \, Ideal \, degree - \, Node \, degree $$
(26)

Each UAV in the network may keep track of all selection indices linked with all its surrounding UAVs. While Hello PKTs are being transmitted between the UAVs. A list of all nodes’ fitness function ⍺i is stored in Ui, represented in Eq. (27).

$$ U_i \, = \, \{ \, \alpha_i |for \, all \, i \, \in \, ndi\} $$
(27)

UAV nodes frequently shift locations, which alters the neighborhoods’ degree. According to estimates, using a predetermined ideal degree value without a clear justification will result in the formation of multiple cluster heads, which could increase energy consumption owing to an increase in communication overhead with the CHs and an increase in the complexity of cluster administration. \(l_{th}\) is the distance threshold that is calculated by using the Eq. (28).

$$ l_{th} = \frac{{2f_c h_{tx} h_{rx} }}{kv} $$
(28)

where, \(k\) = threshold constant,\(f_c\) = frequency of the transmission,\(v\) = connectivity velocity,\(h_{tx}\) = sensor node antenna altitude transmission, \(h_{rx}\) = sensor node antenna altitude receiving.

\(I_0\) is a large-scale fading variable that is affected by the transmitter's and receiver's line of sight (LoS) and non-line of sight (NLoS) connections that calculated by Eq. (29). \(\Pr_{LoS}\) and \(\Pr_{NLoS}\) are denoted by the likelihood probability of LoS and NLoS respectively. \(E_{LoS}\) and \(E_{NLoS}\) are exponents of both cases. \(PL_{FS}\) is the path loss for free space and is the path loss of NLoS, this path loss is represented by Eqs. (3033).

$$ I_o = 10^{\frac{{ - \left( {(1 - \Pr_{NLos} )({\text{P}} L_{FS} \left( {d_o } \right) + 10E_{Los} \log (d)) + (1 - \Pr_{Los} )({\text{P}} L_{FS} \left( {d_o } \right) + 1E_{NLos} \log (d))} \right)}}{10}} $$
$$ I_0 = 10^{\frac{{ - 2{\text{P}} L_{FS} \left( {d_o } \right) - 20E_{Los} \log (d) + {\text{P}} L_{FS} \left( {d_o } \right)(\Pr_{Los} + \Pr_{NLos} ) + 10E_{Los} \log (d)(\Pr_{Los} + \Pr_{NLos} )}}{10}} $$
$$ I_0 = 10^{\frac{{ - 2{\text{P}} L_{FS} \left( {d_o } \right) - 20E_{Los} \log (d) + {\text{P}} L_{FS} \left( {d_o } \right) + 10E_{Los} \log (d)}}{10}} $$
$$ I_o = 10^{\frac{{ - \left( {\Pr_{Los} {\text{P}} L_{Los} + \Pr_{NLos} {\text{P}} L_{NLos} } \right)}}{10}} $$
(29)

In the equation of (29)

$$ {\text{P}} L_{Los} = {\text{P}} L_{FS} \left( {d_o } \right) + 10E_{Los} \log (d) $$
(30)
$$ {\text{PL}}_{{\text{NLos}}} {\text{ = PL}}_{{\text{FS}}} \left( {{\text{d}}_{\text{o}} } \right){\text{ + 10E}}_{{\text{NLos}}} {\text{log(d)}} $$
(31)
$$ {\text{P}} L_{Fs} = 20\log (d_0 f\frac{4\pi }{c}) - G_t - G_r $$
(32)

Gt and Gr represent the transmitter and reception station gains, respectively.

$$ \Pr_{Los} + \Pr_{NLos} = 1 $$
(33)

4 Algorithm Complexity Analysis

In this approach, each node is aware of its position, and all UAV nodes have an informational table with their ID, the node’s trajectory metric value \(\partial j\), residual energy \(\left( {U_{ETr} } \right)\), node fitness function \(\alpha_i\), and distance threshold for UAVi, and UAVj.

figure d

The technical or time cost that dictates how long it takes a system to run an algorithm is the time complication. If each fundamental process takes a specific amount of time, the timing complexity of an algorithm is usually calculated by counting the number of elementary operations done by the algorithm.

4.1 Performance Evaluation

The technical or time cost that dictates how long it takes a system to run an algorithm is the time complication. If each fundamental process takes a specific amount of time, the timing complexity of an algorithm is usually calculated by counting the number of elementary operations done by the algorithm. Computational Time—Complexity of Algorithms is o (n).

5 Simulation Results and Investigation

The selection of parameter values in meta-heuristic algorithms is a crucial aspect of optimizing routing protocols. It requires a combination of domain expertise, experimentation, and careful analysis to determine the values that yield the best results for a specific problem and dataset. The manuscript starts by conducting a thorough literature review to understand the existing research on 3D trajectory routing protocols and related meta-heuristic algorithms. This helps them gather insights into commonly used parameter values and best practices. To ensure the robustness of parameter values, authors often employ techniques like cross-validation or k-fold validation to test parameter configurations on different datasets or scenarios. MATLAB simulations are utilized to compare the proposed 3DITA against the RATP, EORBTP, and LEPR algorithms. The evaluation considers Packet delivery ratio, energy consumption, end-to-end latency, and reliability. The simulations are carried out in MATLAB with different densities of UAV nodes and different simulation times. The remaining parameters are shown in Table 1.

Table 1 Simulation Parameter

5.1 Performance Metrics

The presentation measurements thought about for the assessment of our three dynamic routing protocols are as follows:

  • Packet delivery ratioPDR can be estimated as the proportion of delivered several packets at the destination altogether to transmit PKTs from the source in the network. The greatest number of data PKTs must be delivered to the destination. As the value of PDR increases, the performance of the network is directly dependent on the PDR of the network in Eq. (34).

    $$ {\text{Delivery}}\;{\text{ ratio }} = {\text{ Total }}\;{\text{Delivered}}\;{\text{ data }}\;{\text{packet}}/{\text{Total }}\;{\text{Transmitted}}\;{\text{ data }}PKT $$
    (34)
  • End to End delay- End-to-end delay is the total amount of time it takes for PKT to go from source to destination over the network in Eq. (35). So, this metric somewhat relies upon the PDR. As the distance increases between the source and the goal, the Packet drop probability also increases.

    $$ {\text{E\_D = 1/N}}\sum_{i = 1}^N {\text{(Rti - Sti)*1000(ms)}} \, $$
    (35)

    where, E_D = End-to-End Delay, N = Successfully delivered packets, i = Packet identifier, Rti = Received Time, Sti = Send time,

  • ReliabilityA reliable wireless network can carry out a set of functions under predetermined conditions for certain operational periods. The qualities of measuring scales and the items that comprise the scales may be studied using reliability analysis.

  • Energy ConsumptionAll the energy needed to complete an action is referred to as energy consumption. The wireless interfaces of UAV nodes consume a considerable amount of the overall energy consumption demonstrated in Eq. (36).

    $$ {\text{Energy}}\;{\text{ consumption}} = \left( {{\text{Energy }}\;{\text{lost}}\;{\text{ during }}\;\left( {{\text{communication}} + {\text{ sensor}}\;{\text{ mounted}}\;{\text{ operation}}} \right) + {\text{UAV}}\;{\text{ flight}}\;{\text{ time}}\;{\text{ energy}}} \right) $$
    (36)

5.2 Evaluation Result

Following the simulation, we obtained the following results, which reveal the diversity of the beginning-to-end concede PKT loss ratio, PDR, End-to-end delay, throughput, and jitter in the different speeds of UAVs and various node densities.

5.3 Performance of 3DITA, RATP, EORBTP, LEPR

  • Case 1 In the first case, the No. of UAVs connected in a FANET network vary from 20 UAVs to 100 UAV nodes, resulting in modifying the number of connections.

  • Case 2 In the second case, the simulation time of the network is changed from 20 to 100 s, leading the network's multiple routing algorithms to perform differently.

In both cases, the UAV moving speed is fixed to 40 m/sec.

5.4 Graphs After Simulation

Both Cases are simulated, and the requisite trace file is generated, as illustrated in Figs. 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11. The UAV nodes were simulated in this scenario using 3DITA, RATP, EORBTP, and LEPR protocols, and various metrics such as packet delivery ratio, end-to-end delay, energy usage, and dependability are being evaluated. The x-axis represents a different number of UAV nodes in case 1 (Figs. 2, 3, 4, 5 and 6). In case 2 (Fig. 7 through Fig. 11), the x-axis shows simulation time, and the y-axis reflects various performance parameters.

Fig. 2
figure 2

Packet delivery ratio versus Number of UAV nodes

Fig. 3
figure 3

End to End-to-end delay versus Number of UAV nodes

Fig. 4
figure 4

Energy consumption versus Number of UAV nodes

Fig. 5
figure 5

Reliability versus Number of UAV nodes

Fig. 6
figure 6

Jitter Delay versus Number of UAV nodes

Fig. 7
figure 7

Packet Delivery Ratio versus simulation time

Fig. 8
figure 8

End to End delay versus simulation time

Fig. 9
figure 9

Energy Consumption versus simulation time

Fig. 10
figure 10

Reliability versus simulation time

Fig. 11
figure 11

Jitter Delay versus Simulation Time

6 Analysis and Result

To construct the various scenarios, MATLAB was employed. We simulate for 20–100 s before creating the trace file, which we utilize to save the graphs for analysis and calculation, as seen above. These visuals substantially enhance the statistical analysis of the performance of these routing protocols. The necessary graphs were saved as a bitmap graphic for statistical analysis.

6.1 Case 1:—Speed of UAVs Nodes Varied

  • PKT delivery ratio The Packet Delivery Ratio (PDR) is the percentage of packets successfully transported from source to destination nodes. Figure 2 demonstrates that the 3DITA system achieves significantly greater PDR than competing techniques due to the chosen maintenance mechanism, which enhances total network stability and therefore enables more effective packet exchange among UAVs. Furthermore, as the quantity of UAVs grows, the system becomes more interconnected, enabling more effective data packet transfer. 3DITA is a scalable routing protocol that can handle many nodes and network growth without degrading performance, which is essential for maintaining a high packet delivery ratio.

  • End-to-End delay Congestion arises because of UAVs' high mobility and density. This may result in packet loss. Consequently, packets will take longer on average to arrive at their destinations, resulting in greater end-to-end delays (EED). Figure 3 shows that the average EED of the 3DITA method is significantly smaller than that of the RATP, EORBTP, and LEPR algorithms. This is because of the suggested criterion for overall security degree and median best distance, which ensure safe distances between the UAVs, resulting in fewer packet collisions and, as a result, reduced EEDs. Additionally, the 3DITA contributes to decreasing EEDs by forming better permanent clusters.

  • Energy Consumption Above and beyond that, the 3DITA assures the safety of UAVs in flight in a trajectory manner, Thus, the FANET considers a variable number of UAVs and computes their related energy usage. Figure 4 shows that the suggested 3DITA consumes less power than the other three clustering techniques. 3DITA accomplishes considerable energy savings by implementing a novel method of establishing trajectory metrics. As a result, trajectory metrics are preserved while the energy required for retransmission is reduced. Above that, the 3DICA protects the FANET framework by ensuring the safety of UAVs in flight.

  • Reliability Fig. 5 shows a graphical overview of the situation. 3DITA has the most reliable routing protocol among other routing protocols when the number of nodes increases because 3DITA takes up a significant amount of bandwidth.

  • Jitter Delay In Fig. 6, as the number of UAV nodes increases, RATP demonstrates a significantly higher jitter delay compared to the two other routing protocols. This can be attributed to the substantial bandwidth consumption associated with RATP.

6.2 Case 2: Different Simulation Times

  • PKT delivery Ratio The scenario is presented visually in Fig. 6. 3DTIA beats RATP, EORBTP, and LEPR routing protocols because even for nodes in continual motion, 3DTIA can handle both unicast and multicast packet transfers.

  • End-to-end delay Fig. 7 effectively shows the case scenario where EORBTP has the greater value for the parameter End-to-end delay than others. 3DITA performs much better on this parameter because the messages are transmitted regularly and do not have to be delivered sequentially, the 3DTIA protocol does not require that the link be trustworthy for the control messages.

  • Energy Consumption Fig. 8 represents the situation effectively. In this scenario, 3DITA performs better than the three routing protocols because the 3DITA protocol is a flat routing mechanism. It does not require a centralized administration system to conduct the routing operation.

  • Reliability Fig. 9 represents the case scenario effectively. The reliability of 3DITA increases as the density of UAV nodes increases because of the source routing technique used in 3DITA because there is less routing overhead. This routing overhead is proportional to the path length and data load.

  • Jitter Delay Fig. 11 illustrates that 3DITA exhibits consistently low jitter delay as the simulation time increases. This can be attributed to 3DITA's comprehensive consideration of network traffic patterns and characteristics, which is crucial for achieving and sustaining minimal jitter in the network.

The simulation results affirm that the proposed algorithm's scalability and applicability extend across various UAV scenarios, effectively meeting the precise demands of the intended applications.

6.3 Scalability

  • Network Size Assess the algorithm's scalability concerning the number of UAVs within the network. 3DITA can handle a growing or large number of UAVs effectively without a significant degradation in performance.

  • Computational Resources Analyze the algorithm's resource requirements as the network scales. 3DITA can run efficiently on UAVs with limited computational capabilities and memory.

  • Communication Overhead Investigate how the 3DITA algorithm scales in terms of communication overhead. Assess whether the increased number of UAVs results in excessive data exchange, potentially burdening the network.

  • Trajectory Prediction Accuracy Evaluate the 3DITA algorithm's accuracy in predicting UAV trajectories in diverse real-world scenarios. Consider factors like obstacles, wind conditions, and dynamic airspace.

  • Reliability Assess the 3DITA algorithm's robustness and reliability in maintaining trajectory prediction accuracy over extended periods or in the presence of unexpected disturbances.

  • Energy Savings Measure the 3DITA algorithm's effectiveness in conserving energy, which is critical for UAVs with limited battery capacity. Assess how it optimizes energy consumption during trajectory prediction.

  • Real-Time Processing Examine whether the 3DITA algorithm can provide trajectory predictions in real-time or if it incurs significant latency. Real-time performance is crucial for mission-critical applications.

  • Data Security Ensure that the 3DITA algorithm incorporates security measures to protect trajectory and mission data from unauthorized access or cyberattacks.

6.4 Applicability

  • Environmental Conditions 3DITA algorithm's suitability for different environmental conditions and terrains, including urban, rural, or remote areas. Evaluate its adaptability to various scenarios.

  • Mission Types The proposed 3DITA algorithm is flexible enough that it can support a vast range of UAV surveillance, missions, explorations, delivery services, or disaster response.

  • UAV Types The proposed 3DITA algorithm can be applied to various UAV types, including multi-rotor and fixed-wing UAVs, each bearing one-of-a-kind flight features and potentials.

  • Communication Technologies Analyze the consonance of the proposed 3DITA algorithm with contrasting communication technologies and protocols regularly employed in the UAV networks.

  • Dynamic Environments Regulate how smoothly the 3DITA algorithm acclimates to dynamic environmental conditions, like weather alterations or rapid hindrances in the track of the UAV.

  • Ease of Implementation Assess the ease with 3DITA algorithm can be implemented and integrated into existing UAV systems.

  • User-Friendly Interface Consider whether the 3DITA algorithm provides a user-friendly interface for operators and mission planners.

Through a comprehensive evaluation of these factors, one can effectively assess how well the proposed algorithm 3DITA scales and adapts to diverse UAV scenarios, thereby ensuring its alignment with the precise needs of the intended applications.

6.5 State of Art Comparison

Based on analysis, 3DITA Trajectory routing protocols with RATP, EORBTP, and LAPR routing protocols. Table 2 presents a comparative study that distinguishes between performance metrics categorized as Low (L), High (H), and Medium (M) rates.

  • Because each node spends considerable time processing and managing the received data before collecting full routing information the 3DITA method provides a high packet delivery ratio.

  • The 3DITA helps to reduce end-to-end delay. This is because the proposed criterion for overall security degree and median best distance offers safe distances between UAVs, less packet collisions, and hence lower End-to-End time.

  • 3DITA routing protocols are designed to be aware of the network's topology and adapt to changes. This awareness allows the network to dynamically reroute traffic in the event of link failures or congestion, avoiding unnecessary data packet transmission and energy consumption associated with retransmissions.

  • 3DITA's reliability is greater and more consistent than the other ways since it uses less energy and improves network lifespan with less End-to-End latency.

  • 3DITA routing protocols can take advantage of multiple paths to a destination, which can provide network traffic with alternative routes in case of congestion or link failures. This path diversity can help reduce both jitter and delay by offering redundancy and options for packet transmission.

Table 2 Observations of protocols

7 Conclusion

To address the challenges posed by the unpredictable flight behaviors of UAVs and ensure network security, novel clustering algorithms have been developed. However, managing many UAVs flying in formation, each with its dynamic characteristics presents significant challenges that can impact the stability and reliability of Flying Ad-Hoc Networks (FANETs). This manuscript introduces a novel FANET clustering approach aimed at enhancing network security and reducing power consumption in three-dimensional environments. The 3D Improvised Trajectory Algorithm (3DITA) focuses on improving overall system consistency and security by incorporating mobility and safety distance monitoring components. This approach results in more accurate trajectory predictions and greater energy savings in three-dimensional scenarios. Simulation results demonstrate that the 3DITA approach outperforms RATP, EORBTP, and LEPR algorithms in terms of Packet Delivery Ratio, End-to-End Latency, Energy Consumption, and Reliability, particularly in terms of trajectory stability. The successful utilization of UAVs in forestry applications relies on various UAV characteristics, including adaptability in flight planning, cost-effectiveness, reliability, autonomy, and the capability to deliver high-quality data promptly. The integration of 3DITA's strengths, including security, monitoring, reliability, and UAV autonomy, along with the unique capabilities of the sensors, enables the effective use of remote sensing in forestry applications.

In the future, our goal is to expand the protocol's applicability by considering variations in UAV altitude when estimating UAV locations. Additionally, we propose a solution based on copy control strategies to manage the number of message duplicates in the network, thereby reducing network overhead.