Abstract:When the attitude of a satellite or a flight vehicle is to be controlled, attitude measurement should be carried out by a sensor. Infrared earth sensors can obtain the attitude information by measuring local vertical lines. According to the characteristics of a linear-array infrared earth sensor, an algorithm is designed. In the algorithm, the measurement accuracy is improved through the subdivision of pixels and the application environment is expanded through the selection of multi operating modes. Software design and test are implemented on the product. The test results show that the algorithm has the characteristics of improving measurement accuracy and enhancing the adaptability to operating environment. It has an important promotion function for adapting earth sensors to the development of microsatellites, providing high accuracy attitude and implementing celestial navigation etc.