When the collimator is placed horizontally and installed obliquely, its optical parameters will be greatly different due to different stress states. In order to accurately evaluate the focal length of collimator, according to the mapping relationship between the point on the focal plane of the collimator and the angle of the total station, an accurate mathematical model of the relationship between the focal length and the angle of the total station under the condition of oblique installation is established, the principle projection error caused by the rotation of the vertical axis of the total station is corrected. Several groups of data are collected by total station and experimental verification is carried out. After correcting the distortion, the focal length calculated by each testing point when the line segment is parallel to the vertical wire are 1 980.03 mm, 1 983.45 mm, 1 982.79 mm, the average focal length, i.e. the true value, is 1 982.09 mm. When the distortion is corrected but the projection error is not corrected, the focal length calculated from each testing point when the line segment is parallel to the horizontal wire of the reticle is 996.42 mm, 995.23 mm, 995.22 mm, the relative error of the average focal length is 50.2%. The range of focal length calculated by each testing point when the line segment is located in different quadrants and parallel to the horizontal wire of the reticle is 4.74 mm after correcting the projection error and distortion, the average focal length of all testing points is 1982.69 mm, the difference between the average value and the true value is 0.6 mm. The maximum relative error between the extended uncertainty of the focal length calculated by different testing point and the true value of the focal length is 0.36%. This value is far less than the stipulation in GB/T 9917.1-2002 that the relative error between the measured focal length and the nominal focal length in the photographic lens does not exceed ±5%. The experimental results show that the model has universality and high accuracy, the phase of the target slit in the reticle is allowed to be a random value, there is no need to adjust the slit to be strictly parallel to the vertical wire of the total station, the model has great engineering application value for the in-situ detection of the focal length of the collimator under the condition of oblique installation.