Learn R Programming

RSpincalc (version 1.0.2)

Conversion Between Attitude Representations of DCM, Euler Angles, Quaternions, and Euler Vectors

Description

Conversion between attitude representations: DCM, Euler angles, Quaternions, and Euler vectors. Plus conversion between 2 Euler angle set types (xyx, yzy, zxz, xzx, yxy, zyz, xyz, yzx, zxy, xzy, yxz, zyx). Fully vectorized code, with warnings/errors for Euler angles (singularity, out of range, invalid angle order), DCM (orthogonality, not proper, exceeded tolerance to unity determinant) and Euler vectors(not unity). Also quaternion and other useful functions. Based on SpinCalc by John Fuller and SpinConv by Paolo de Leva.

Copy Link

Version

Install

install.packages('RSpincalc')

Monthly Downloads

126

Version

1.0.2

License

GPL (>= 3)

Maintainer

Last Published

July 17th, 2015

Functions in RSpincalc (1.0.2)

DCMrandom

Generate uniform random direction cosine matrices
DCM2Q

Convert from Direction Cosine Matrix to rotation Quaternions
EA2Q

Convert from Euler Angles to rotation Quaternions
Qnorm

Norm of a quaternion
EA2EV

Convert from Euler Angles to Euler Vectors
Qinv

Quaternion inverse
EA2DCM

Convert from Euler Angles to Direction Cosine Matrix
EV2Q

Convert from Euler Vectors to rotation Quaternions
Qconj

Quaternion conjugate
EV2DCM

Convert from Euler Vectors to Direction Cosine Matrix
Qzero

Generate zero-valued quaternions
Q2EA

Convert from rotation Quaternions to Euler Angles
Q2DCM

Convert from rotation Quaternions to Direction Cosine Matrix
z3

Quaternion subtraction
DCM2EA

Convert from Direction Cosine Matrix to Euler Angles
z5

Quaternion dot product
EVrandom

Generate uniform random Euler Vectors
vectQrot

Rotate a vector by a quaternion
Q2GL

Convert from rotation Quaternions to OpenGL rotation matrix
EV2EA

Convert from Euler Vectors to Euler Angles
EArandom

Generate uniform random Euler Angles
Qrot

Updates current attitude quaternion
DCM2EV

Convert from Direction Cosine Matrix to Euler Vectors
Qrandom

Generate uniform random unit quaternions
QangularDifference

Angular difference between 2 quaternions
z1

Quaternion multiplication
Qlerp

Linear quaternion interpolation
z4

Quaternion addition
Qnormalize

Quaternion normalization
isPureRotationMatrix

Determine if the variable is a pure rotation matrix
z2

Quaternion division
EA2EA

Convert from Euler Angles to Euler Angles
Q2EV

Convert from rotation Quaternions to Euler Vectors
Qlog

Quaternion logarithm