##
Nowdays, I am trying to understand attitude control code.

But I can’t understand formula below which is in attitude control code description.

Can anyone explain how that formula is induced?

The axis angle can change the yaw as well (noticeable at higher tilt angles).

This is the formula by how much the yaw changes:|

let a := tilt angle, b := atan(y/x) (direction of maximum tilt)|

yaw = atan(-2 * sin(b) * cos(b) * sin^2(a/2) / (1 - 2 * cos^2(b) * sin^2(a/2))). |
---|