# A Location and Velocity Prediction-Assisted FANET Networking Scheme for Highly Mobile Scenarios
## 3 Location and Velocity Prediction
### Kalman-Filter-Based Trajectory Prediction  
The trajectories of network nodes are pivotal to further system optimization and routing protocol design. However, the movement of nodes is easily influenced by external  
Figure 3: The diagram of the group mobility. disturbances such as noise, airflow interference, etc., which causes deviations from the intended paths. Specifically, all nodes need to broadcast messages periodically to exchange position information with surrounding nodes. In highly mobile scenarios, this procedure is frequently conducted, creating quantities of overheads consequently. To handle this issue, we adopt the Kalman filter to predict the node trajectories, aiming to reduce the overheads with aid of predicted location and velocity. Kalman filter is a recursive solution to the discrete data linear filtering problem [18]. With high prediction accuracy and low computational complexity, it has been used in extensive research and applications, such as control, navigation, filtering, etc. Some works have implemented it in the ad hoc network, e.g., the authors in [19] used the Kalman filter to estimate the cooperative awareness messages (CAMs). The main procedure of the Kalman filter contains two phases, i.e., time updation and measurement updation. The time updation contains two formulas, which are  
\[\hat{\kappa}_{k}^{-}=\mathbf{A}\hat{x}_{k-1}+\mathbf{B}\mathbf{u}_{k-1}, \tag{7}\]  
\[\mathbf{P}_{k}^{-}=\mathbf{A}\mathbf{P}_{k-1}\mathbf{A}^{T}+\mathbf{Q}, \tag{8}\]  
where the superscript \"\(-\)\" indicates that vectors are obtained before the measurement, symbol hat notation \"\(\cdots\)\" indicates the estimated results. Hence, \(\hat{\kappa}_{k}^{-}\) is the estimated state at the \(k\)-th step based on the prior process to the current step. \(\hat{x}_{k}\) means the estimated posterior state at the \(k\)-th step based on the current measured result \(z_{k}\). State transfer matrix \(\mathbf{A}\) relates two adjacent states of previous and current steps, and input matrix \(\mathbf{B}\) relates the control input \(\mathbf{u}_{k-1}\) to state \(\mathbf{x}\). \(\mathbf{P}_{k}^{-}\) and \(\mathbf{P}_{k}\) denote the prior and posterior estimated error covariances, respectively. \(\mathbf{Q}\) is the process noise covariance matrix. As for the measurement updation, it includes the following three equations, i.e.,  
\[\mathbf{K}_{k}=\mathbf{P}_{k}^{-}\mathbf{H}^{T}\Big{(}\mathbf{H}\mathbf{P}_{k}^{-}\mathbf{H}^{T}+\mathbf{R }\Big{)}^{-1}, \tag{9}\]  
\[\hat{\mathbf{x}}_{k}=\hat{\kappa}_{k}^{-}+\mathbf{K}_{k}\big{(}\mathbf{z}_{k}-\mathbf{H}\hat{ \kappa}_{k}^{-}\big{)}, \tag{10}\]  
\[\mathbf{P}_{k}=(\mathbf{I}-\mathbf{K}_{k}\mathbf{H})\mathbf{P}_{k}^{-}, \tag{11}\]  
where \(\mathbf{K}_{k}\) means the Kalman gain at the \(k\)-th step, measurement matrix \(\mathbf{H}\) relates the state \(\mathbf{x}_{k}\) to the measured value \(\mathbf{z}_{k}\) and \(\mathbf{R}\) is the measurement noise covariance matrix. The time-updating procedure aims to predict states, whereas the measurement updating procedure tries to correct the state based on current measurement results. By using these two recursive procedures, the Kalman filter can realize high-precision prediction with low computational cost. In this paper, the Kalman filter is utilized to predict the velocities and positions of all nodes in highly mobile scenarios. Consequently, we take these two key variables into account and combine them into a state \(\mathbf{x}\) with an expression of \(\mathbf{x}=[p_{x},p_{y},p_{z},\mathbf{v}_{x},v_{y},p_{z}]^{\mathsf{T}}\). As for the input matrix \(\mathbf{B}\), it is set to \(\mathbf{0}\) since no external input is considered for this case. Based on the relationship between position and velocity, the state transfer matrix \(\mathbf{A}\) can be presented as  
\[\mathbf{A}= \begin{pmatrix}\mathbf{I}_{3\times 3}&\Delta t\mathbf{I}_{3\times 3}\\ \mathbf{0}_{3\times 3}&\mathbf{I}_{3\times 3}\end{pmatrix} _{6\times 6}.