def _derivatives(self, x, u):
    '\n        for the dynamics xdot = f(x, u), returns fdot(x, u)\n        '
    f_b = u[:3]
    m_b = u[3:]
    r_i = x[:3]
    v_b = x[3:6]
    q_ib = x[6:10]
    w_b = x[10:]
    q_ib = (q_ib / np.linalg.norm(q_ib))
    R_ib = Quaternion2Rotation(q_ib)
    rdot_i = (R_ib @ v_b)
    vdot_b = (((1 / MAV.mass) * f_b) - (skew(w_b) @ v_b))
    wq_ib = np.zeros((4, 1))
    wq_ib[1:] = w_b
    qdot_ib = (0.5 * quat_prod(wq_ib, q_ib))
    wt_b = skew(w_b)
    wdot_b = (np.linalg.inv(MAV.J) @ (m_b - (wt_b @ (MAV.J @ w_b))))
    x_out = np.concatenate([rdot_i, vdot_b, qdot_ib, np.array(wdot_b)], axis=0)
    return x_out
for the dynamics xdot = f(x, u), returns fdot(x, u)
def _derivatives(self, x, u):
    '\n        \n        '
    f_b = u[:3]
    m_b = u[3:]
    r_i = x[:3]
    v_b = x[3:6]
    q_ib = x[6:10]
    w_b = x[10:]
    q_ib = (q_ib / np.linalg.norm(q_ib))
    R_ib = Quaternion2Rotation(q_ib)
    rdot_i = (R_ib @ v_b)
    vdot_b = (((1 / MAV.mass) * f_b) - (skew(w_b) @ v_b))
    wq_ib = np.zeros((4, 1))
    wq_ib[1:] = w_b
    qdot_ib = (0.5 * quat_prod(wq_ib, q_ib))
    wt_b = skew(w_b)
    wdot_b = (np.linalg.inv(MAV.J) @ (m_b - (wt_b @ (MAV.J @ w_b))))
    x_out = np.concatenate([rdot_i, vdot_b, qdot_ib, np.array(wdot_b)], axis=0)
    return x_out