Abstract:The key of quadrotor’s motion control is to the control of the attitude angle in real time when flying. In order to get more accurate attitude angle with the existing sensor data. In this article, quadrotor attitude calculation and filtering algorithm are analyzed at large through physical experiments. First, to gain the attitude angle expressed in quaternion by combining the Euler orientation cosine matrix and the Quaternion matrices. Then, to compensate the quaternion by complementary filter and Kalman filter with the data measured by accelerometers and magnetometers, and to analyze how to select the best parameters. Both of these two filtering methods can get more accurate attitude angle, but the Kalman filter has a better real-time characteristic than complementary filter.