startracker.py
def a2q(att):
    """Attitude (3x3 matrix) converted to a quaternion."""
    q4 = 0.5 * np.sqrt(1 + np.trace(A))
    q1 = 1 / (4 * q4) * (att[1, 2] - att[2, 1])
    q2 = 1 / (4 * q4) * (att[2, 0] - att[0, 2])
    q3 = 1 / (4 * q4) * (att[0, 1] - att[1, 0])

    return np.array([q1, q2, q3, q4])
Attitude (3x3 matrix) converted to a quaternion.
Attitude (3x3 matrix) converted to a quaternion.
Attitude ( 3x3 matrix ) converted to a quaternion .
def a2q(att):
    q4 = 0.5 * np.sqrt(1 + np.trace(A))
    q1 = 1 / (4 * q4) * (att[1, 2] - att[2, 1])
    q2 = 1 / (4 * q4) * (att[2, 0] - att[0, 2])
    q3 = 1 / (4 * q4) * (att[0, 1] - att[1, 0])
    return np.array([q1, q2, q3, q4])
def a2q ( att ) : q4 = 0.5 * np . sqrt ( 1 + np . trace ( A ) ) q1 = 1 / ( 4 * q4 ) * ( att [ 1 , 2 ] - att [ 2 , 1 ] ) q2 = 1 / ( 4 * q4 ) * ( att [ 2 , 0 ] - att [ 0 , 2 ] ) q3 = 1 / ( 4 * q4 ) * ( att [ 0 , 1 ] - att [ 1 , 0 ] ) return np . array ( [ q1 , q2 , q3 , q4 ] )
Attitude (3x3 matrix) converted to a quaternion.
Attitude ( 3x3 matrix ) converted to a quaternion .
"""Attitude (3x3 matrix) converted to a quaternion."""
att