The invention relates to the technical field of unmanned aerial vehicles and discloses a pan-tilt attitude detection method and a pan-tilt attitude detection device. The method comprises the following steps: acquiring data of a pan-tilt
inertia measurement unit, wherein the data of the
inertia measurement unit includes
angular velocity data of a gyro and
accelerometer data; performing
quaternion integral operation on the data of the
inertia measurement unit; changing the data of the inertia measurement unit from
quaternion expression into
rotation matrix expression; and changing the data of the inertia measurement unit from the
rotation matrix expression into eulerian angle expression, wherein the step of performing the
quaternion integral operation on the data of the inertia measurement unit comprises the following sub-steps: by taking the
rotation matrix expression as feedback, performing feedback correction on the quaternion expression, acquiring pan-tilt attitude data through an attitude heading
system, performing pan-tilt attitude expression by adopting different algorithms and compensating and correcting the pan-tilt attitude. Therefore, the accuracy of the pan-tilt attitude detection is improved.