Abstract:Due to factors such as construction technology and pipeline design, the three-dimensional trajectory of the general pipeline is usually partially offset from the design trajectory, and it is very important to accurately understand the spatial position of the pipeline. This paper presents a six-axis gyro attitude reconciliation and fusion algorithm and pipeline trajectory visualization algorithm based on Arduino platform. Firstly, accelerometer data and angular velocity data of the six-axis gyroscope are collected, and the attitude angles are respectively calculated, and the sliding angle-weighted filtering is performed on the attitude angles calculated by the accelerometer, and the attitude angles of the filtered attitude angle and the angular velocity are calculated. Filtering is carried out to obtain a high-precision roll angle, yaw angle and pitch angle. Finally, the coordinates of the sampling point are obtained from the fused data, and a three-dimensional trajectory is drawn. The experimental results show that the algorithm can not only effectively eliminate the error of the gyro sensor, but also the measured three-dimensional trajectory curve is basically consistent with the actual pipeline trajectory, and has high accuracy. It can be seen that the algorithm studied in this paper has a strong practicality.