Abstract. The working environment in hot dry rock boreholes, encountered in deep geothermal investigation drilling, and ultra-deep geological drilling (up to 5000 m), is very difficult at the present stage. We have developed a drilling trajectory measuring instrumentation (DTMI), which is based on the interference fiber optic gyro (FOG). This can work continuously, for 4 hours, in an environment where the ambient temperature does not exceed 270 °C and the pressure does not exceed 120 MPa. The DTMI is mainly divided into three parts: an external confining tube, a metal vacuum flask, and a FOG measurement probe. Here we focus on the mechanical design, strength, and pressure field simulation analysis for the external tube, the structural design and temperature field simulation analysis for the vacuum flask, and the FOG Shupe error analysis and compensation in the temperature field. Finally, through the engineering applications of SK-2 east borehole of the China Continental Scientific Drilling Project (CCSD) and the geothermal well of Xingreguan-2, the data measurements of the drilling trajectory were used to analyze the stability of the DTMI. The instrument realizes long-duration, high stability, work in the process of making trajectory measurements in an ultra-deep hole. The instrument has the characteristic of anti-electromagnetic interference, and enables work to be carried out in the blind-zone of existing technologies and instrumentation. Therefore, DTMI has great potential in the promotion and development of geological drilling technology.