Closed alphaville closed 1 year ago
Quick update: @gunturiCM is working on this now.
Firstly, let $\dot\psi^{\rm ref}$ be the yaw rate commanded by the stick on the RC. Then, the following transformation will be applied
$$\text{yaw rate} = \begin{cases}0, &\text{if} |\dot\psi^{\rm ref}| < \delta \\ \dot\psi^{\rm ref} - \delta, & \text{if } \dot\psi^{\rm ref} > \delta \\ \dot\psi^{\rm ref} + \delta, &\text{if } \dot\psi^{\rm ref} < -\delta \end{cases}$$
Secondly, if may (or may not) be a good idea to disregard the magnetometer measurements.
Thirdly, one idea is to have a controller that looks like:
$$u = K_p q^{\rm err} + K_d (\omega - \omega^{\rm ref}),$$
where $q^{\rm err}$ is the vector part of the quaternion error and $\omega^{\rm ref} = (0, 0, \omega^{\rm ref}_z)$ is an angular velocity reference.
I have opened another experimental branch to see if we can use the yawRateReference
to control the Yaw
and have the yawreference = currentYaw
.
This has been addressed and solved in #71. The code was tested and successfully merged. This issue is ready to be closed.
Let us re-introduce the following line in
main.src
But,
radio.yawRateReferenceRadSec()
is zero unless we move the left stick; equivalently,yawReferenceRad
doesn't drift unnecessarilyradio.yawRateReferenceRadSec()
are reasonable (experimentation will be needed)