## 4 Non-Coaxial Image Motion Compensation Method
### Image Motion Compensation Vector Model  
The vector relationship for image motion compensation is illustrated in Figure 6. The axes \(Bx\), \(By\), and \(Bz\) correspond to the three axes of the aircraft coordinate system. In the camera coordinate system, the LOS vector \(\overrightarrow{v_{LOS_{c}}}\) and the equivalent compensation rotation axis vector \(\overrightarrow{v_{Comp_{c}}}\) correspond to the \(Cz\) and \(Cx\) directions. Thus, \(\overrightarrow{v_{LOS_{c}}}=(0,0,1)^{T}\), \(\overrightarrow{v_{Comp_{c}}}=(1,0,0)^{T}\). The LOS vector and the equivalent compensation rotation axis vector are transformed into the aircraft coordinate system using the rotation matrix \(R_{B}^{C}\) as follows:  
Figure 5: Imaging system under backward-squint conditions. Figure 6: LOS vector relationship for image motion compensation. \[\overrightarrow{v_{LOS_{b}}} =R_{B}^{C}\cdot\overrightarrow{v_{LOS_{c}}}=\left[ \begin{array}{c} \sin\theta\\ -\cos\theta\sin\phi\\ \cos\theta\cos\phi\end{array} \right] \tag{9}\] \[\overrightarrow{v_{Comp_{b}}} =R_{B}^{C}\cdot\overrightarrow{v_{Comp_{c}}}=\left[ \begin{array}[] {c}\cos\theta\\ \sin\theta\sin\phi\\ -\sin\theta\cos\phi\end{array} \right]\]  
When exposure starts, the initial roll and pitch angles of the camera system are \(\phi_{\text{start}}\) and \(\theta_{\text{start}}\). During the exposure, the roll angle rotates by \(\Delta\phi\), changing to \(\phi+\Delta\phi\), while the pitch mirror simultaneously adjusts to the pitch angle \(\theta\). The expressions for the initial LOS vector \(\overrightarrow{v_{LOS_{start}}}\), the real-time LOS vector \(\overrightarrow{v_{LOS}}\), and the compensation rotation axis vector \(\overrightarrow{v_{Comp}}\) are given as follows:  
\[\overrightarrow{v_{LOS_{start}}} =\left[ \begin{array}{c}\sin\theta_{start}\\ -\cos\theta_{start}\sin\phi_{start}\\ \cos\theta_{start}\cos\phi_{start}\end{array} \right] \tag{10}\] \[\overrightarrow{v_{LOS}} =\left[ \begin{array}{c}\sin\theta\\ -\cos\theta\sin(\phi_{start}+\Delta\phi)\\ \cos\theta\cos(\phi_{start}+\Delta\phi)\end{array} \right]\] \[\overrightarrow{v_{Comp}} =\left[ \begin{array}{c}\cos\theta\\ \sin\theta\sin(\phi_{start}+\Delta\phi)\\ -\sin\theta\cos(\phi_{start}+\Delta\phi)\end{array} \right]\]  
The compensation encoding angle \(\kappa\) is fed back by its corresponding encoder. According to the double-angle relationship, the actual compensation angle is \(2\kappa\). The corrected LOS direction after a \(2\kappa\) rotation by the compensation mirror can be calculated using Rodrigues' rotation formula:  
\[\overrightarrow{v_{rot}}=\cos(2\kappa)\cdot\overrightarrow{v_{LOS}}+(1- \cos(2\kappa))\cdot(\overrightarrow{v_{Comp}}\cdot\overrightarrow{v_{ LOS}})\cdot\overrightarrow{v_{Comp}}+\sin(2\kappa)\cdot\overrightarrow{v_{Comp}}\times \overrightarrow{v_{LOS}} \tag{11}\]  
Substituting Equation (10) into Equation (11) yields:  
\[\overrightarrow{v_{rot}}=\left[ \begin{array}{c}\sin\theta\cos(2\kappa)\\ -\sin(\phi_{start}+\Delta\phi)\cos\theta\cos(2\kappa)-\cos(\phi_{start}+ \Delta\phi)\sin(2\kappa)\\ cos(\phi_{start}+\Delta\phi)\cos\theta\cos(2\kappa)-\sin(\phi_{start}+\Delta \phi)\sin(2\kappa)\end{array} \right] \tag{12}\]  
After the combined action of the compensation mirror rotation and the pitch mirror adjustment, the LOS should return to its initial position, which gives \(\overrightarrow{v_{rot}}=\overrightarrow{v_{LOS_{start}}}\). This constraint can be expressed by the following equations:  
\[\sin\theta\cos(2\kappa)=\sin\theta_{start} \tag{13}\]  
\[\sin(\phi_{start}+\Delta\phi)\cos\theta\cos(2\kappa)+\cos(\phi_{start}+\Delta \phi)\sin(2\kappa)=\cos\theta_{start}\sin\phi_{start} \tag{14}\]  
\[cos(\phi_{start}+\Delta\phi)\cos\theta\cos(2\kappa)-\sin(\phi_{start}+\Delta \phi)\sin(2\kappa)=\cos\theta_{start}\cos\phi_{start} \tag{15}\]  
At this point, the compensation problem is transformed into an angle-solving problem, where \(\theta_{start}\), \(\phi_{start}\), and \(\Delta\phi\) are known parameters in the constraint equations.