# Satellite Attitude Determination and Map Projection Based on Robust Image Matching
## 3 Method
### Satellite Attitude Determination from Images
Calculate the cross product of \((m_{00},m_{10},m_{20})\) and \((m_{01},m_{11},m_{21})\) to form an orthogonal vector \((m^{\prime}_{02},m^{\prime}_{12},m^{\prime}_{22})\). 2. Calculate the cross product of \(\left(m^{\prime}_{02},m^{\prime}_{12},m^{\prime}_{22}\right)\) and \((m_{00},m_{10},m_{20})\) to form an orthogonal vector \((m^{\prime}_{01},m^{\prime}_{11},m^{\prime}_{21})\). 3. Normalize \((m_{00},m_{10},m_{20})\), \((m^{\prime}_{01},m^{\prime}_{11},m^{\prime}_{21})\), and \(\left(m^{\prime}_{02},m^{\prime}_{12},m^{\prime}_{22}\right)\) to unit vectors. 4. Construct \(\mathbf{\hat{M}}^{\prime}=\left( \begin{array}{ccc}m_{00}&m_{01}&m_{02}\\ m_{10}&m_{11}&m_{12}\\ m_{20}&m_{21}&m_{22}\end{array} \right)\). The new matrix \(\mathbf{\hat{M}}^{\prime}\) satisfies the mathematical requirements of a rotation matrix. The accuracy of the estimated rotation matrices will be experimentally verified in Section 4. When mapping a satellite image onto the latitude-longitude coordinate, we need to find the corresponding pixel position in the satellite image for each latitude-longitude position, following [19]. To find the pixel position for a point \(P(\phi,\lambda,h)\) on Earth's surface, we compute the projected position on the detector plane \((u_{P},v_{P},-f)\) as follows:  
\[\left( \begin{array}{c}u_{P}\\ v_{P}\\ -f\end{array} \right)=\left( \begin{array}{c}-fx_{P}/z_{P}\\ -fy_{P}/z_{P}\\ -f\end{array} \right), \tag{7}\]where \((x_{P},y_{P},z_{P})\) is the coordinates for the latitude-longitude position in the camera center coordinate system calculated as  
\[\left( \begin{array}{c}x_{P}\\ y_{P}\\ z_{P}\end{array} \right)=\mathbf{\hat{M}^{\prime}}\left( \begin{array}{c}\left(N _{\mathrm{E}}+h\right)\cos\phi\cos\lambda-x_{\mathrm{s}}\\ \left(N_{\mathrm{E}}+h\right)\cos\phi\sin\lambda-y_{\mathrm{s}}\\ \left(\frac{R_{\mathrm{E}}^{2}}{R_{\mathrm{E}}^{2}}N_{\mathrm{E}}+h\right) \sin\phi-z_{\mathrm{s}}\end{array} \right)\,, \tag{8}\]  
Based on Equations (7) and (8), we determine the brightness at \(P(\phi,\lambda,h)\) by interpolating between the values on the neighbor pixels around \((u_{P},v_{P},-f)\). Here we adopt a simple bilinear interpolation method. We can then draw a map projected image of the satellite image. Above, we supposed that the satellite position at each observation is accurately determined. In practice, we can use signals from the global positioning system (GPS) and/or trajectory predictions with the TLEs distributed by NORAD. For each VIS image, we have determined the observation time by GPS and the satellite position by TLE using the SPICE Toolkit distributed by NASA [20]. The accuracy of the satellite position determined by TLE is reported as 1 km [21]. It should be noted that optical distortion can affect the accuracy of satellite attitude estimation, because it changes the projected location of an object onto the detector plane, changing \(V_{\mathrm{C}}\). Since optical distortion can be calibrated by tracking land features, observing star positions, and observing planet limbs [22], the incorporation of such calibration techniques in satellite operations can be important to improve the accuracy of deriving satellite attitudes.