# A Robust Routing Protocol in Cognitive Unmanned Aerial Vehicular Networks
## 4 Proposed Routing Protocol
### Central Node Resolution Factor  
This part of this section introduces the Routing metric Central Node Resolution Factor (CNRF), total cumulative CNRF \((N_{P})\)is calculated considering the path P is expressed as follows,  
\[N_{P}=\sum\
olimits_{i,j\in P_{\text{fn}}(s,d)}N_{i,j} \tag{1}\]  
The source node sends an RREQ to nearby UAVs for data transmission, and neighboring nodes calculate their distance using Received Signal Strength Indication (RSSI) to determine their positions. RSSI is chosen because it is a simple and cost-effective method that can be implemented with existing hardware on commercial wireless devices. While RSSI can vary due to environmental factors such as interference and obstacles, it offers a practical balance between cost and complexity. To mitigate some of the variability and improve accuracy, it employ techniques such as averaging multiple RSSI readings and filtering. \[d=10^{\frac{k-20 log\frac{k+\pi_{1}}{k}}{10\omega}} \tag{2}\]  
Here, \(k\) is inspected as path loss, \(\omega\) is the exponent of signal loss, \(v\) is the received signal's wavelength and \(l_{0}\) is reference distance. When a UAV receives a signal, it saves its current coordinates and timestamps \(T_{1}\). It then waits for a certain amount of time before responding with its coordinates and sending time \(T_{2}\). This paper discusses the UAV node's transmission-related speed \((s)\) may be calculated as follows:  
\[s=\frac{\sqrt{(\chi_{t}-\chi_{r})^{2}+(\varphi_{t}-\varphi_{r})^{2}+(\zeta_{t} -\zeta_{r})^{2}}}{(T_{2}+\Delta)-T_{1}} \tag{3}\]  
Here, the coordinates for UAVs are \(\eta_{r}(\chi_{r},\varphi_{r},\zeta_{r})\) receiving and sending individually. \(\Delta\) indicates the transmission time. Consequently, the direction between neighbor and destination nodes is defined during packet reception and transmission. \[\theta=\cos^{-}1(\frac{(\chi_{t}\chi_{r})+(\varphi_{t}\varphi_{r})+(\zeta_{t} \zeta_{r})}{(\sqrt{\chi_{r}^{2}+\varphi_{r}^{2}+\zeta_{r}^{2}})\times(\sqrt{( \chi_{s}^{2}+\varphi_{s}^{2}+\zeta_{s}^{2})}}) \tag{4}\]  
The displacement between two nodes in the time of sending packets at the time \(T_{2}\) is measured as (\(T_{v}\)),  
\[T_{v}=\int\partial\theta \tag{5}\]  
So, the weighted value during data transmission \((\xi_{T})\) between two nearby nodes is calculated by every other UAV and may shown as follows,  
\[\xi_{t}=\frac{\phi_{t}}{T_{V}*\partial_{P}^{t}*s} \tag{6}\]  
In this case, \(\phi_{t}\) represents the data transmission range between two UAV nodes, \(T_{v}\) represents the displacement of two UAV nodes, \(\partial_{P}^{L}\) is the total of connection delays when routing and \(s\) is UAV speed during transmission. The proposed protocol assesses network failure using back-off, switching, and queuing delays. It also handles traffic density issues in congested areas, considering the number of nearby nodes (\(UNi\)), \(DRi\) data rate of \(N_{i}\), and \(S\) as the size of sending packets, so the queuing delay \(\partial_{Q}^{D}\) of \(N_{i}\) is calculated as follows,  
\[\partial_{Q}^{D}=\frac{SU_{i}}{DRi} \tag{7}\]UAV nodes use random back-off time for collision reduction, by using the following equation:  
\[\partial_{D}^{B}=\frac{1}{((1-P_{c})(1-(1-P_{c}))U_{i}-1)}W \tag{8}\]  
Here, \(P_{c}\) is symbolized as the probability of collision \(UN_{i}\) is the nearby UAV nodes on the channel \(CH_{i}\) and \(w\) is the window size. Intermediate nodes may switch channels during discovery with minimal time spent, typically considered as zero time. Switching delay (\(\partial_{D}^{S}\)) is the time needed to change channels within a channel group if a drone \(UN_{i}\) is required to switch channel \(p\) to \(q\) in its channel group whilst forwarding the message to next-hop \(UN_{j}\). \[\partial_{i,j}^{S}=a*|p-q| \tag{9}\]  
where \(a\) is a positive real number and the tuning delay of two UAVs is regarded to have a specified step size \(a\). let's consider step size 5 MHz, a is 5 ms [24].