## 4 Results and Discussion  
This section focuses on the measurement accuracy of roll and azimuth angles at different pitch angles from 60\({}^{\circ}\) to 89\({}^{\circ}\). The dual-axis position turntable shown in Figure 12 is employed to provide the attitude reference for comparing the accuracy of the near-vertical attitude method. The angular accuracy of the dual-axis turntable is \(\pm\)0.01\({}^{\circ}\), and the 0-degree scale of the azimuth axis points to the geographic north. The test equipment consists of a nine-axis inertial measurement unit and two accelerometers as shown in Figure 10. The sensor parameters are listed in Table 1. ARM of the STM32F4 series is utilized for data acquisition and synchronization. The UART interface connected to the PC is employed to calculate attitude and store data. To reduce magnetic interference from the electrical environment, the turntable was operated by a handle to prevent the motor from turning. Four sets of attitudes were designed to verify the proposed approach:  
1. The referenced azimuth and roll are 330\({}^{\circ}\) and 0\({}^{\circ}\), respectively. 2. The Y-axis of the instrument is rotated 90\({}^{\circ}\) making the reference azimuth and roll 330\({}^{\circ}\) and 90\({}^{\circ}\), respectively. 3. The outer axis of the turntable is rotated 180\({}^{\circ}\), and the reference azimuth and roll are 150\({}^{\circ}\) and 90\({}^{\circ}\), respectively. 4. The Y-axis of the instrument is rotated 90\({}^{\circ}\) making the reference azimuth and roll 150\({}^{\circ}\) and 90\({}^{\circ}\), respectively. The pitch error curves compared with the conventional algorithm at four referenced attitudes are depicted in Figure 13. The burgundy error curves representing the conven  
Figure 11: Schematic of near-vertical algorithm and well section types. tional method have less deviation from the gray curve representing the proposed algorithm. The maximum errors for the conventional and proposed methods are 0.25 and 0.2 degrees, respectively. The pitch errors are nearly close from 60 degrees to 89 degrees. The results of the pitch error validate the conclusions given in Section 2.2. The RMSE curves show that the near-vertical optimization method is more stable compared to the conventional method. The reason is that the near-vertical algorithm uses accelerometers with much lower noise levels. As shown in Figure 14, the blue curves are the roll errors of the conventional algorithm, and the red curves represent the proposed method. The roll angle error is under 5 degrees  
Figure 12: Turntable test of near-vertical wellbore attitude. Figure 13: Comparison of pitch errors at different attitudes. (**a**) Pitch error at azimuth 330\({}^{\circ}\) and roll 0\({}^{\circ}\). (**b**) Pitch error at azimuth 330\({}^{\circ}\) and roll 90\({}^{\circ}\). (**c**) Pitch error at azimuth 150\({}^{\circ}\) and roll 90\({}^{\circ}\). (**d**) Pitch error at azimuth 150\({}^{\circ}\) and roll 180\({}^{\circ}\). for pitch angles less than 84 degrees. However, the accuracy of the proposed method is obviously higher than the traditional method. For pitch angles above 85 degrees, the roll error calculated by the conventional method increases rapidly, with the maximum error exceeding 25 degrees. For the proposed method, the roll errors are less than 1 degree for all four positions. The RMSE of the roll at each position exceeded 4 degrees, affected by the noise of the horizontal accelerometer. Notably, the near-vertical optimization algorithm based on the redundant system makes the errors of the roll stable for all pitch angles. With the discussion in Section 2.2, the azimuth angle can be expressed as a function of the roll angle. Therefore, as shown in Figure 15, the azimuth and roll errors have a similar trend with the increase in pitch. The black curves marked with circles are the azimuth errors of the traditional method and the green curves marked with pentagrams are the azimuth errors of the proposed method.