# Satellite Attitude Determination and Map Projection Based on Robust Image Matching
## 3 Method
### Satellite Attitude Determination from Images  
Given the position (latitude, longitude, and altitude) of a satellite and its attitude, we can uniquely determine the appearance of Earth from the satellite. This geometric fact indicates that, if the satellite position at an observation is well determined, the satellite attitude can be measured by matching a satellite image to the expected Earth appearance. In these matchings, we identify land feature locations in the satellite image by comparing feature points on Earth which can be extracted from base map images containing recognized geographical information. In this subsection, we formulate the geometrical relationship between the feature points extracted from a satellite image and their corresponding positions on Earth. Here, we assume that the images are already well matched; finding correct matchings is deferred until the next subsection (Section 3.2). We first define a feature-pointing vector representing the direction of each extracted land feature. We assume that all land features in a single image were observed at the same time. This assumption is realistic in observations by 2-D array detectors, which we target in this paper. For the \(i\)-th land feature extracted from a satellite image, we specify a unit vector \(V_{\text{E},i}=(x_{i},\ y_{i},\ z_{i})\) pointing from the satellite position \(S=(x_{s},\ y_{s},z_{s})\) to a land position \(P_{i}\). The planetographic longitude, latitude, and altitude of \(P_{i}\), denoted by \(\lambda_{i},\phi_{i}\), and \(h_{i}\), respectively, are described in Earth-centered coordinates (Figure 3a) as  
\[V_{\text{E},i}=\left( \begin{array}{c}x_{i}\\ y_{i}\\ z_{i}\end{array} \right)=\left(\begin{array}{c}(N_{\text{E},i}+h_{i})\cos\phi _{i}\cos\lambda_{i}-x_{s}\\ (N_{\text{E},i}+h  
As the vectors \(V_{\mathrm{E},i}\) and \(V_{\mathrm{C},i}\) point in the same direction but are expressed in different coordinate systems, we can rigorously describe their relationship. Given a rotation matrix that connects the Earth-centered coordinate to the camera-centered coordinate systems,  
\[\mathbf{M}=\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), \tag{4}\]  
then we can connect \(\boldsymbol{V}_{\mathrm{E},i}\) and \(\boldsymbol{V}_{\mathrm{C},i}\)directly through \(\mathbf{M}\) as follows:  
\[ \begin{array}{c}\boldsymbol{V}_{\mathrm{C},i}=\mathbf{M}\boldsymbol{V}_{ \mathrm{E},i}\\ \Leftrightarrow\left\{\begin{array}{l}X_{i}=m_{00}x_{i}+m_{01}y_{i}+m_{02} z_{i}\\ Y_{i}=m_{10}x_{i}+m_{11}y_{i}+m_{12}z_{i}\\ Z_{i}=m_{20}x_{i}+m_{21}y_{i}+m_{22}z_{i}\end{array}\right..\end{array}  \tag{5}\]  
Finding the rotation matrix \(\mathbf{M}\) is equivalent to finding the satellite attitude; \(\mathbf{M}\) rotates the Earth center coordinates onto the camera coordinates attached to the satellite. Theoretically, the parameters for solving Equation (5) could be determined from just three points. However, to improve the statistical accuracy of \(\mathbf{M}\), our scheme utilizes many (more than ten) matched pairs of vectors \(\boldsymbol{V}_{\mathrm{E},i}\) and \(\boldsymbol{V}_{\mathrm{C},i}\) generated from the feature detection and robust matching procedure described in Section 3.2. As Equation (5) is a linear system, the nine parameters \(m_{00}\) to \(m_{22}\) are easily estimated by the least squares method,  
\[\mathbf{\hat{M}}=\text{argmin}_{\mathbf{M}}\left\{ \begin{array}{l}L_{0}= \sum\limits_{i}\{(m_{00}x_{i}+m_{01}y_{i}+m_{02}z_{i})-X_{i}\}^{2}\\ L_{1}=\sum\limits_{i}\{(m_{10}x_{i}+m_{11}y_{i}+m_{12}z_{i})-Y_{i}\}^{2}\\ L_{2}=\sum\limits_{i}\{(m_{20}x+m_{21}y_{i}+m_{22}z_{i})-Z_{i}\}^{2}\end{array} \right.. \tag{6}\]  
The estimates from the least squares method do not necessarily form a rotation matrix, because the orthogonality and unit-norm conditions might be violated by errors in the measurements \((x_{i},y_{i},z_{i})\) and \((X_{i},~{}Y_{i},~{}Z_{i})\). Therefore, we constrain the matrix to be rotational by the following procedure:  
1.