To analyze the errors in the optical axis of tracking and collimation system, a star tracking and collimation system model is established. Transformations among various coordinates and the error terms in the system are introduced and analyzed. Algorithms regarding the optical axis calibration are proposed and are verified by simulations. The effect of stochastic errors on the optical axis calibration is discussed, and the accuracy and validity of the algorithms with regard to the calibration of double star trackers are verified. The simulation results show that the accuracy of the two-star calibration method can reach 25 arcs, and the K can be controlled below 0.01. In-orbit calibration is achieved with both cameras and star trackers working simultaneously.