# Radar Error Correction Method Based on Improved Sparrow Search Algorithm
## 2 Radar Measurement Error Model
The geographical location at time \(k\) that receives statistics from the cooperative target, including the latitude \(L_{G}(k)\), longitude \(\lambda_{G}(k)\), and altitude \(H_{G}(k)\), is converted into the ECEF coordinate system as follows:  
\[ \begin{cases}x_{EG}(k)=\left[C+H_{G}(k)\right]\cos L_{G}(k)\cos\lambda_{G}(k) \\ y_{EG}(k)=\left[C+H_{G}(k)\right]\cos L_{G}(k)\sin\lambda_{G}(k)\\ z_{EG}(k)=\left[C(1-e^{2})+H_{G}(k)\right]\sin L_{G}(k)\end{cases}  \tag{2}\]  
where \(C\) can be calculated using the following formula:  
\[C=\frac{E_{q}}{\left[1-e^{2}\sin^{2}L_{G}(k)\right]^{1/2}} \tag{3}\]  
where \(E_{q}\) is the equatorial radius and \(e\) is the eccentricity of the earth. The radar measurement at time \(k\) includes the radial distance \(r_{m}(k)\), azimuth angle \(\theta_{m}(k)\), and elevation angle \(\eta_{m}(k)\) of the target, which are then converted to the local Cartesian coordinate system with the radar position as the origin coordinate, as follows:  
\[ \begin{cases}x_{LR}(k)=r_{m}(k)\sin\theta_{m}(k)\cos\eta_{m}(k)\\ y_{LR}(k)=r_{m}(k)\cos\theta_{m}(k)\cos\eta_{m}(k)\\ z_{LR}(k)=r_{m}(k)\sin\eta_{m}(k)\end{cases}  \tag{4}\]  
Then, convert it to the ECEF coordinate system with the center of earth as the origin, as follows:  
\[ \begin{bmatrix}x_{ER}(k)\\ y_{ER}(k)\\ z_{ER}(k)\end{bmatrix} = \begin{bmatrix}x_{s}\\ y_{s}\\ z_{s}\end{bmatrix} +\mathbf{T}\times \begin{bmatrix}x_{LR}(k)\\ y_{LR}(k)\\ z_{LR}(k)\end{bmatrix}  \tag{5}\]  
where \((x_{s},y_{s},z_{s})\) is the coordinates of the radar geographic coordinate \((L_{s},\lambda_{s},H_{s})\) in the ECEF coordinate system, which can then be calculated using Equation (2). \(\mathbf{T}\) is the rotation matrix as follows:  
\[\mathbf{T}= \begin{bmatrix}-\sin\lambda_{s}&-\sin L_{s}\cos\lambda_{s}&\cos L_{s} \cos\lambda_{s}\\ \cos\lambda_{s}&-\sin L_{s}\sin\lambda_{s}&\cos L_{s}\sin\lambda_{s}\\ 0&\cos L_{s}&\sin L_{s}\end{bmatrix}  \tag{6}\]It takes \(\Delta t\) for the GNSS position information to be transmitted through the data link, so the position information received at time \(k\) is actually the coordinate information of the reference source at time \(k-\Delta t\), and, within time \(\Delta t\), the reference source moves some distance. Let the reference source be in uniform linear motion, and the relationship between its actual position \((x_{EGT}(k),y_{EGT}(k),z_{EGT}(k))\) at time \(k\) and the GNSS positioning \((x_{EG}(k),y_{EG}(k),z_{EG}(k))\) is as follows:  
\[ \begin{bmatrix}x_{EGT}(k)\\ y_{EGT}(k)\\ y_{EGT}(k)\end{bmatrix} = \begin{bmatrix}x_{EG}(k)\\ y_{EG}(k)\\ y_{EG}(k)\end{bmatrix} +\mathbf{T}\times \begin{bmatrix}v_{x}\Delta t\\ v_{y}\Delta t\\ v_{z}\Delta t\end{bmatrix}  \tag{7}\]  
where \(v_{x}\), \(v_{y}\), and \(v_{z}\) are, respectively, the velocity of the aircraft along the _xyz_ axis in the radar local coordinate system, which can be calculated from the aircraft's velocity to the ground using coordinate transformation. The radar systematic error is set as \(\mathbf{\beta}_{R}=\left[\Delta r,\Delta\theta,\Delta\eta\right]^{\top}\), \(\Delta r\) is the range systematic error, \(\Delta\theta\) is the azimuth systematic error, and \(\Delta\eta\) is the elevation systematic error. The radar measurement noise is \(\left[n_{m}(k),n\theta_{m}(k),n\eta_{m}(k)\right]^{\top}\). According to Formula (4), the actual position of the aircraft in the radar local coordinate system at time \(k\) is as follows:  
\[ \begin{cases}x_{LRT}(k)=\left[r_{m}(k)-\Delta r-n\eta_{m}(k)\right]\sin[\theta _{m}(k)-\Delta\theta-n\eta_{m}(k)]\cos[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]\\ y_{LRT}(k)=\left[r_{m}(k)-\Delta r-n\eta_{m}(k)\right]\cos[\theta_{m}(k)-\Delta \theta-n\eta_{m}(k)]\cos[\eta_{m}(k)-\Delta\eta-n\eta_{m}(k)]\\ z_{LRT}(k)=\left[r_{m}(k)-\Delta r-n\eta_{m}(k)\right]\sin[\eta_{m}(k)-\Delta \eta-n\eta_{m}(k)]\end{cases}  \tag{8}\]  
Convert to the ECEF coordinate system as follows:  
\[ \begin{bmatrix}x_{ERT}(k)\\ y_{ERT}(k)\\ z_{ERT}(k)\end{bmatrix} = \begin{bmatrix}x_{s}\\ y_{s}\\ z_{s}\end{bmatrix} +\mathbf{T}\times