32enum EulangSeq {ES_XYZ, ES_XZY, ES_YXZ, ES_YZX, ES_ZXY, ES_ZYX};
61void align(
const int n,
const double* v,
const int m,
const double* old,
62 const double*
new,
double* valigned);
128void quat_prod(
const double p[4],
const double q[4],
double pq[4],
144void quat_interpolate(
const double q1[4],
const double q2[4],
const double t,
183void quat_rotmat(
const double q[4],
double* rotmat);
214 const bool forward,
double* vshift);
226 const bool forward,
double* Ashift);
238 const bool forward,
double* Ashift);
245void quat_to_aa(
const double q[4],
double axis[3],
double* angle);
283void aa_fix(
double axis[3],
double* angle,
const bool normalize);
293void aa_rand(
double axis[3],
double* angle);
301void aa_rotmat(
const double axis[3],
const double angle,
309void aa_from_rotmat(
const double* rotmat,
double axis[3],
double* angle);
319 const double angle,
double* vrot);
329void aa_shiftmat(
const double axis[3],
const double angle,
330 const bool forward,
double* shiftmat);
344 const double axis[3],
const double angle,
const bool forward,
358 const double angle,
const bool forward,
double* Ashift);
371 const double angle,
const bool forward,
double* Ashift);
378void aa_to_quat(
const double axis[3],
const double angle,
double q[4]);
386void aa_to_dcm(
const double axis[3],
const double angle,
double* dcm);
397void aa_to_euler(
const double axis[3],
const double angle,
398 enum EulangSeq seq,
const bool world,
double euler[3]);
426void dcm_from_axes(
const double* A,
const double* B,
double* dcm);
433void dcm_rotmat(
const double* dcm,
double* rotmat);
442void dcm_shiftmat(
const double* dcm,
const bool forward,
double* shiftmat);
464 const bool forward,
double* vshift);
502void dcm_to_aa(
const double* dcm,
double axis[3],
double* angle);
549 const bool forward,
double* shiftmat);
562 enum EulangSeq seq,
const bool world,
double* vrot);
579 enum EulangSeq seq,
const bool world,
const bool forward,
596 enum EulangSeq seq,
const bool world,
const bool forward,
double* Ashift);
612 enum EulangSeq seq,
const bool world,
const bool forward,
double* Ashift);
635 double axis[3],
double* angle);
663 enum EulangSeq to_seq,
const bool to_world,
double to_euler[3]);
void aa_shift_tensor2(const double *A, const double axis[3], const double angle, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by axi...
Definition rotlib.c:1093
void aa_rand(double axis[3], double *angle)
Generates a random orientation in axis-angle representation.
Definition rotlib.c:934
void aa_to_dcm(const double axis[3], const double angle, double *dcm)
Converts an axis-angle representation to a direction cosine matrix.
Definition rotlib.c:1115
void aa_rotate_vectors(const int n, const double *v, const double axis[3], const double angle, double *vrot)
Rotates vectors about axis by angle.
Definition rotlib.c:1070
void aa_from_rotmat(const double *rotmat, double axis[3], double *angle)
Extracts axis and angle from a rotation matrix.
Definition rotlib.c:986
void aa_shift_vectors(const int n, const double *v, const double axis[3], const double angle, const bool forward, double *vshift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by an ...
Definition rotlib.c:1081
void aa_shift_tensor3(const double *A, const double axis[3], const double angle, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by axi...
Definition rotlib.c:1104
void aa_rotmat(const double axis[3], const double angle, double *rotmat)
Calculates the rotation matrix corresponding to an axis-angle representation.
Definition rotlib.c:963
void aa_to_euler(const double axis[3], const double angle, enum EulangSeq seq, const bool world, double euler[3])
Converts an axis-angle representation to an Euler angle sequence.
Definition rotlib.c:1123
void aa_fix(double axis[3], double *angle, const bool normalize)
Modifies axis and angle to ensure a right handed rotation with angle .
Definition rotlib.c:903
void aa_to_quat(const double axis[3], const double angle, double q[4])
Converts an axis-angle representation to a unit quaternion.
Definition rotlib.c:1134
void aa_shiftmat(const double axis[3], const double angle, const bool forward, double *shiftmat)
Calculates the shifter matrix corresponding to an axis-angle representation.
Definition rotlib.c:1046
void dcm_from_axes(const double *A, const double *B, double *dcm)
Returns the direction cosine matrix of axes(i.e. frame) B with respect to axes(i.e....
Definition rotlib.c:1163
bool mat_is_dcm(const double *mat)
Checks is a 3 x 3 array is a direction cosine matrix.
Definition rotlib.c:1156
void dcm_rotmat(const double *dcm, double *rotmat)
Returns the rotation matrix corresponding to a direction cosine matrix.
Definition rotlib.c:1173
void dcm_shift_vectors(const int n, const double *v, const double *dcm, const bool forward, double *vshift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a d...
Definition rotlib.c:1203
void dcm_to_aa(const double *dcm, double axis[3], double *angle)
Converts a direction cosine matrix to an axis-angle representation.
Definition rotlib.c:1249
void dcm_to_euler(const double *dcm, enum EulangSeq seq, const bool world, double euler[3])
Converts a direction cosine matrix to Euler angles.
Definition rotlib.c:1259
void dcm_shift_tensor2(const double *A, const double *dcm, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a d...
Definition rotlib.c:1214
void dcm_to_quat(const double *dcm, double q[4])
Converts a direction cosine matrix to a unit quaternion.
Definition rotlib.c:1236
void dcm_shift_tensor3(const double *A, const double *dcm, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a d...
Definition rotlib.c:1225
void dcm_shiftmat(const double *dcm, const bool forward, double *shiftmat)
Returns the shifter matrix corresponding to a direction cosine matrix.
Definition rotlib.c:1180
void dcm_rotate_vectors(const int n, const double *v, const double *dcm, double *vrot)
Rotates vectors by a direction cosine matrix.
Definition rotlib.c:1192
void euler_shift_tensor3(const double *A, const double euler[3], enum EulangSeq seq, const bool world, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by thr...
Definition rotlib.c:1332
void euler_to_quat(const double euler[3], enum EulangSeq seq, const bool world, double q[4])
Convert Euler angles to a unit quaternion.
Definition rotlib.c:1344
void euler_shift_tensor2(const double *A, const double euler[3], enum EulangSeq seq, const bool world, const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by thr...
Definition rotlib.c:1320
void euler_to_euler(const double euler[3], enum EulangSeq seq, const bool world, enum EulangSeq to_seq, const bool to_world, double to_euler[3])
Converts Convert one set of Euler angles to another.
Definition rotlib.c:1375
void euler_rotmat(const double euler[3], enum EulangSeq seq, const bool world, double *rotmat)
Calculates the rotation matrix for a set of Euler angles.
Definition rotlib.c:1272
void euler_to_dcm(const double euler[3], enum EulangSeq seq, const bool world, double *dcm)
Convert Euler angles to a direction cosine matrix.
Definition rotlib.c:1367
void euler_to_aa(const double euler[3], enum EulangSeq seq, const bool world, double axis[3], double *angle)
Convert Euler angles to an axis-angle representation.
Definition rotlib.c:1356
void euler_shiftmat(const double euler[3], enum EulangSeq seq, const bool world, const bool forward, double *shiftmat)
Calculates the shifter matrix for a set of Euler angles.
Definition rotlib.c:1280
void euler_rotate_vectors(const int n, const double *v, const double euler[3], enum EulangSeq seq, const bool world, double *vrot)
Rotates vectors with a set of Euler angles.
Definition rotlib.c:1297
void euler_shift_vectors(const int n, const double *v, const double euler[3], enum EulangSeq seq, const bool world, const bool forward, double *vshift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by thr...
Definition rotlib.c:1308
void quat_to_dcm(const double q[4], double *dcm)
Converts a unit quaternion to a direction cosine matrix.
Definition rotlib.c:882
void quat_shiftmat(const double q[4], const bool forward, double *shiftmat)
Calculates the shifter matrix corresponding to a unit quaternion.
Definition rotlib.c:795
void quat_shift_vectors(const int n, const double *v, const double q[4], const bool forward, double *vshift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a u...
Definition rotlib.c:823
void quat_interpolate(const double q1[4], const double q2[4], const double t, double q[4])
Interpolates between two unit quaternions.
Definition rotlib.c:693
void quat_conjugated(double q[4])
Performs in-place conjugation of a quaternion.
Definition rotlib.c:629
void quat_rand(double q[4])
Creates a unit quarternion with random orientation.
Definition rotlib.c:610
void quat_deriv_to_angvel_mat(const double q[4], double *mat)
Returns the matrix mapping the derivative of a unit quaternion to angular velocity.
Definition rotlib.c:708
void quat_shift_tensor2(const double *A, const double q[4], const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a u...
Definition rotlib.c:834
void quat_deriv_to_angvel(const double q[4], const double qdot[4], double angvel[3])
Calculates the angular velocity from a unit quaternion and its time derivative.
Definition rotlib.c:726
void quat_inverted(double q[4])
Performs in-place inversion of a quaternion.
Definition rotlib.c:637
void quat_identity(double q[4])
Creates an identity quarternion.
Definition rotlib.c:621
void quat_deriv_from_angvel_mat(const double q[4], double *mat)
Returns the matrix mapping the angular velocity to the time derivative of a unit quaternion.
Definition rotlib.c:737
void quat_deriv_from_angvel(const double q[4], const double angvel[3], double qdot[4])
Calculates the time derivative of a unit quaternion from angular velocity.
Definition rotlib.c:756
void quat_normalized(double q[4])
Performs in-place normalization of a quaternion.
Definition rotlib.c:646
bool quat_is_normalized(const double q[4])
Returns true if a quaternion is normalized, i.e. if it is a unit quaternion.
Definition rotlib.c:658
void quat_shift_tensor3(const double *A, const double q[4], const bool forward, double *Ashift)
Given two frames A and B such that the orientation of frame B with respect to frame A is given by a u...
Definition rotlib.c:845
void quat_prod(const double p[4], const double q[4], double pq[4], bool normalize)
Calculates the product of two unit quaternions.
Definition rotlib.c:673
double quat_angle_between(const double p[4], const double q[4])
Returns the angle between two unit quaternions.
Definition rotlib.c:686
void quat_rotmat(const double q[4], double *rotmat)
Calculates the rotation matrix corresponding to a unit quaternion.
Definition rotlib.c:767
void quat_rotate_vectors(const int n, const double *v, const double q[4], double *vrot)
Rotates vectors by a unit quaternion.
Definition rotlib.c:812
void quat_to_euler(const double q[4], enum EulangSeq seq, const bool world, double euler[3])
Converts a unit quaternion to an Euler angle sequence.
Definition rotlib.c:889
void quat_to_aa(const double q[4], double axis[3], double *angle)
Converts a unit quaternion to an axis-angle representation.
Definition rotlib.c:856
bool mat_is_rotmat(const double *mat)
Checks whether a 2D array is a rotation matrix.
Definition rotlib.c:587
void align(const int n, const double *v, const int m, const double *old, const double *new, double *valigned)
Rotates vectors such that a set of mutually orthogonal unit vectors aligns with another set of mutual...
Definition rotlib.c:523
EulangSeq
Euler angle sequences. ES_ABC signifies first rotation about the A axis, second rotation about the B ...
Definition rotlib.h:32