Glare is a key factor that influencing the visual performance in light conditions of flight deck, and glare source in flight deck is very complex. It is difficult to directly evaluate the complex glare source, such as non-uniform glare, irregular shape glare and indirect glare using current glare equations. In this paper, a novel method based on SPEOS simulation to predict several types of glare is proposed. Simulation of glare scene is carried out using SPEOS software. Glare source is detected by secondary development on SPEOS. Source luminance, background luminance, position index and solid angle of source are calculated by secondary development as well. And then, the desired glare index can be computed. Finally, Unified Glare Rating(UGR) equation is utilized as an example to predict the glare. The results indicate that the proposed method can compute glare index automatically and quickly, and is useful in illumination design of flight deck.