This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_quaternion_from_tb

Function Documentation

int rc_quaternion_from_tb(rc_vector_t tb, rc_vector_t *q)

Calculates quaternion vector q from tait-bryan angles tb.

If q is already of length 4 then old contents are simply overwritten. Otherwise q’d existing memory is freed and new memory is allocated to aint memory leaks. tb angles are 321 Tait Bryan angles in array order XYZ with operation order 321(yaw-Z, pitch-Y, roll-x).

  • tb[in] input tait-bryan angles

  • q[out] output quaternion


Returns 0 on success or -1 on failure