def propagate_mrps(t, state, true_inertia):
    mrps = state[0:3]
    omega = state[3:6]

    d_mrps = CF.mrp_derivative(mrps, omega)
    d_omega = inv(true_inertia)@(-cross(omega, true_inertia@omega))

    return hstack([d_mrps, d_omega])
def propagate_mrps_inertia(t, state):
    mrps = state[0:3]
    omega = state[3:6]

    est_inertia = diag([1, abs(state[6]), abs(state[7])])

    d_mrps = CF.mrp_derivative(mrps, omega)
    d_omega = inv(est_inertia)@(-cross(omega, est_inertia@omega))

    return hstack([d_mrps, d_omega, 0, 0])
예제 #3
0
def propagate_mrps(t, state, inertia):
    mrps = state[0:3]
    omega = state[3:6]
    #inertia = diag([1, state[6], state[7]])

    #dcm_eci2body = CF.mrp2dcm(mrps).T
    d_mrps = CF.mrp_derivative(mrps, omega)
    d_omega = inv(inertia) @ (-cross(omega, inertia @ omega))

    #print(d_mrps, d_omega)
    return hstack([d_mrps, d_omega])