afry-south / dragonfly-fcb

ÅF Dragonfly Quadrotor UAV Project
Other
7 stars 3 forks source link

Gyroscope tilt-compensation #155

Closed stenbergd closed 8 years ago

stenbergd commented 8 years ago

Currently, the gyroscope output (angular rate, [rad/s]) is used to determine the roll, pitch, yaw angular rate under the assumption/approximation that the body axes and euler axes are equal or close to each other. This approximation quickly becomes too inaccurate at maintained attitudes deviating from zero.

Because of this, the performance of the attitude state estimation and the magnetometer tilt-compensation (depending on the attitude state estimation) is affected negatively.

In order to remedy this issue, a transformation of the gyroscope readings are needed based on the latest attitude states.

See: CH Robotics http://www.chrobotics.com/library/attitude-estimation and Stengel's lectures on flight dynamics http://www.princeton.edu/~stengel/MAE331Lecture9.pdf

stenbergd commented 8 years ago

NOTE: The transformation becomes singular at pitch = +/-90 deg so some kind of error handling is needed. A pitch of 90 degrees is highly undesirable at this stage of development anyway. So quadrotor should take safety actions well before this. See #158.

stenbergd commented 8 years ago

Done. Magnetometer tilt-compensation problems have been eliminated, which is good proof this works as intended.