Quaternion

class loas.Quat(a, b, c, d)

Allows a simple use of quaternion object to represent object’s attitude

Can be used directly as loas.Quaternion

R2V(vec)

Changes vec frame of reference from reference to vehicle

Parameters

vec (loas.Vec) – Input vector

V2R(vec)

Changes vec frame of reference from vehicle to reference

Parameters

vec (loas.Vec) – Input vector

a

first element of the Quaternion q_0

angle()

Returns the rotation angle of the quaternion

axis()

Return the normalized rotation axis of the quaternion

b

second element of the Quaternion q_1

c

third element of the Quaternion q_2

d

forth element of the Quaternion q_3

derivative(W)

Get the time derivative of the quaternion with the rotation vector

Parameters

W (loas.Vec) – Rotation vector

euler()

Returns euler angle of the rotation defined by the quaternion

It is bad to use euler angles.

inv()

Returns quaternion conjugate

tm()

Returns the transfer matrix from reference frame to vehicle frame

tminv()

Returns the transfer matrix from vehicle frame to reference frame

vec()

Returns a numpy array representation of the quaternion