Abstract:The sun angle, which has a great influence on optical observation, is studied. First, the definition and the calculating equation of sun angle are given. Then, focusing on the sun visual position algorithm, a few method to compute declination angle are compared, and an improved method to compute hour angle is proposed, with its accuracy is analyzed. Finally, sun angle algorithm, which is used in optical observation, is put forward. Test results shows that the accuracy of sun angle algorithm is an order of magnitude higher than the traditional methods, thus satisfying the illumination analysis demand in optical observation.