You are currently using a corrected version of $\tau$, which is defined as $\tilde{\tau} = \tau\; \cos\phi \; \cos\theta $. This should be reported in the Overleaf document
Since we are using a quaternion-based model, it would be better (for the sake of consistency, but not only) to avoid having to compute the Euler angles. We can apply a rotation using the quaternion.
In the future, it would be interesting to see whether there is any benefit from using the acceleration measurements from the IMU; then, the output would be $y_t = (z_t, a_t) + \epsilon_t$. We cannot measure the acceleration too accurately, so the variance of the corresponding noise would have to be large. We can explore the possible benefits in simulation first.
Main Changes
New altitude dynamics model
$$\begin{aligned} z_{t+1} {}={}& z_t + T_s v_t + \tfrac{1}{2}T_s^2 a_t + w^zt, \\ v{t+1} {}={}& v_t + T_s a_t + w^v_t, \\ a_t {}={}& \alpha_t \tau_t + \betat, \\ \alpha{t+1} {}={}& \alpha_t + w^\alphat, \\ \beta{t+1} {}={}& \beta_t + w_t^\beta. \end{aligned}$$
The output is
$$y_t = z_t + \epsilon_t.$$
Link to Overleaf document: ...
Comments
Associated Issues
Tests