# Localization of GNSS Spoofing Interference Source Based on a Moving Array Antenna
## 3 Proposed Methods
### Spoofing Interference Direct Location Based on Carrier Phase Single-Difference
\begin{array}{l}u_{j,i}\approx g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v_{j,i}})+ \frac{\partial g(x_{k-1},y_{k-1}z_{k-1},\mathbf{v_{j,i}})}{\partial x}(x-x_{k-1})+ \\ \frac{\partial g(x_{k-1},y_{k-1}z_{k-1},\mathbf{v_{j,i}})}{\partial y}(y-y_{k-1})+ \frac{\partial g(x_{k-1},y_{k-1}z_{k-1},\mathbf{v_{j,i}})}{\partial z}(z-z_{k-1}) \end{array}  \tag{10}\]  
where \(\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v_{j,i}})/\partial x\) is calculated as follows. \[\frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v_{j,i}})}{\partial x}=\left. \begin{aligned} \frac{\partial g(x,y,z,\mathbf{v_{j,i}})}{\partial x}\end{aligned} \right|_{ x}=\left. \begin{aligned} \frac{\partial g(x,y_{k-1},z_{k-1},\mathbf{v_{j,i}})}{\partial x}\end{aligned}  \right|_{x=x_{k-1}} \tag{11}\]  
Therefore, the iterative calculation formula for equation system (9) can be provided as follows:  
\[\mathbf{H\delta p}=\mathbf{b} \tag{12}\]  
in which \[\mathbf{H}=\left[ \begin{array}{ccc}\frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{1,1})}{\partial x}&\frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{1,1})}{ \partial y}&\frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{1,1})}{\partial z} \\ \vdots&\vdots&\vdots&\vdots\\ \frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{k,i})}{\partial x}&\frac{ \partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{i,i})}{\partial y}&\frac{\partial g (x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{i,i})}{\partial z}\\ \vdots&\vdots&\vdots&\vdots\\ \frac{\partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{k,i})}{\partial x}&\frac{ \partial g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{k,i})}{\partial y}&\frac{\partial g (x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{k,i})}{\partial z}\end{array} \right] \tag{13}\]  
\[\mathbf{\delta}\mathbf{p}=\mathbf{p_{t}}-\mathbf{p_{t,k-1}}=\left[ \begin{matrix}x\\ y\\ z\end{matrix} \right]-\left[ \begin{matrix}x_{k-1}\\ y_{k-1}\\ z_{k-1}\end{matrix} \right] \tag{14}\]  
\[\mathbf{b}=\left[ \begin{matrix}u_{1,1}-g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{\mathbf{11}} )\\ \vdots\\ u_{j,i}-g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{i})\\ \vdots\\ u_{M,6}-g(x_{k-1},y_{k-1},z_{k-1},\mathbf{v}_{\mathbf{M6}})\end{matrix} \right] \tag{15}\]  
Among them, \(\mathbf{p_{t,k-1}}\) represents the spoofer's location after \(k-1\) iterations, while \(\mathbf{H}\) denotes the Jacobian matrix. In order to achieve an iterative solution, solve \(\mathbf{\delta}\mathbf{p}\) in Equation (12). By adopting a least-squares solution approach, we formulate the cost function as follows. \[F(\mathbf{\delta}\mathbf{p})\equiv\|\mathbf{H}\mathbf{\delta}\mathbf{p}-\mathbf{b}\|^{2}=(\mathbf{H}\mathbf{ \delta}\mathbf{p}-\mathbf{b})^{T}(\mathbf{H}\mathbf{\delta}\mathbf{p}-\mathbf{b}) \tag{16}\]  
By expanding the cost function, we obtain Equation (17). \[ \begin{array}{l}F(\mathbf{\delta}\mathbf{p})=\mathbf{\delta}\mathbf{p}^{T}\mathbf{H}^{T}\mathbf{H} \mathbf{\delta}\mathbf{p}-\mathbf{\delta}\mathbf{p}^{T}\mathbf{H}^{T}\mathbf{b}-\mathbf{b}^{T}\mathbf{H}\mathbf{ \delta}\mathbf{p}+\mathbf{b}^{T}\mathbf{b}\\ \phantom{F(\mathbf{\delta}\mathbf{p})=\mathbf{\delta}\mathbf{p}^{T}\mathbf{H}^{T}\mathbf{H}\mathbf{\delta} \mathbf{p}-2\mathbf{\delta}\mathbf{p}^{T}\mathbf{H}^{T}\mathbf{b}+\mathbf{b}^{T}\mathbf{b}}\end{array}  \tag{17}\]  
Due to the symmetric positive definiteness and invertibility of the matrix \(\mathbf{H}^{T}\mathbf{H}\), the minimum of \(F(\mathbf{\delta}\mathbf{p})\) is guaranteed. By computing the derivative of \(F(\mathbf{\delta}\mathbf{p})\) with respect to \(\mathbf{\delta}\mathbf{p}\), we can derive the following equation. \[\frac{dF(\mathbf{\delta}\mathbf{p})}{d(\mathbf{\delta}\mathbf{p})}=\mathbf{2}\mathbf{H}^{T}\mathbf{H}\mathbf{ \delta}\mathbf{p}-\mathbf{H}^{T}\mathbf{b} \tag{18}\]  
The value of \(\mathbf{\delta}\mathbf{p}\), when the above derivative value equals 0, is the desired iterative solution, which is formulated as follows.