Q2GL: Convert from rotation Quaternions to OpenGL rotation matrix

Description Usage Arguments Value Author(s) References See Also Examples

Description

DCM2EA converts from Quaternions (Q) to OpenGL rotation matrix.

Usage

1
Q2GL(Q)

Arguments

Q

rotation Quaternions (Q) vector [q1, q2, q3, q4].

Value

OpenGL rotation matrix 4x4xN.

Author(s)

Jose Gama

References

Python - IMU Brick 2012 http://www.tinkerforge.com/doc/Software/Bricks/IMU_Brick_Python.html

See Also

isPureRotationMatrix

Examples

1
2
Q <- c(-0.1677489, -0.7369231, -0.3682588, 0.5414703)
Q2GL(Q)

Example output

           [,1]       [,2]       [,3] [,4]
[1,] -0.6724915 -0.1515663 -0.7244189    0
[2,]  0.6460385  0.3573404 -0.6744939    0
[3,]  0.3610947 -0.9215940 -0.1423907    0
[4,]  0.0000000  0.0000000  0.0000000    1

RSpincalc documentation built on May 2, 2019, 10:59 a.m.

Related to Q2GL in RSpincalc...