/home/laradmin/lar/utils/mit_darpa_logs_player/src/rotations.cpp File Reference

utilities for rotations math More...

#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "rotations.h"
Include dependency graph for rotations.cpp:

Go to the source code of this file.

Defines

#define FAIL_TEST

Functions

static int feq (double a, double b)
static int qeq (double *q, double a, double b, double c, double d)
void rot_angle_axis_to_quat (double theta, const double axis[3], double q[4])
void rot_angle_axis_to_roll_pitch_yaw (double theta, const double axis[3], double rpy[3])
int rot_matrix_to_quat (const double rot[9], double quat[4])
void rot_quat_mult (double c[4], const double a[4], const double b[4])
 rot_quat_mult
int rot_quat_pos_to_matrix (const double quat[4], const double pos[3], double mat[16])
void rot_quat_rotate (const double rot[4], double v[3])
 rot_quat_rotate
void rot_quat_rotate_rev (const double rot[4], double v[3])
 rot_quat_rotate_rev
void rot_quat_to_angle_axis (const double q[4], double *theta, double axis[3])
int rot_quat_to_matrix (const double quat[4], double rot[9])
void rot_quat_to_roll_pitch_yaw (const double q[4], double rpy[3])
int rot_quaternion_test ()
void rot_roll_pitch_yaw_to_angle_axis (const double rpy[3], double *theta, double axis[3])
void rot_roll_pitch_yaw_to_quat (const double rpy[3], double q[4])
static int rpyeq (double roll, double pitch, double yaw, double r, double p, double y)

Detailed Description

utilities for rotations math

Definition in file rotations.cpp.


Define Documentation

#define FAIL_TEST
Value:
{ fprintf(stderr, "rot_quaternion_test failed at line %d\n", \
        __LINE__); return 0; }

Function Documentation

static int feq ( double  a,
double  b 
) [inline, static]

Definition at line 41 of file rotations.cpp.

static int qeq ( double *  q,
double  a,
double  b,
double  c,
double  d 
) [inline, static]

Definition at line 46 of file rotations.cpp.

void rot_angle_axis_to_quat ( double  theta,
const double  axis[3],
double  q[4] 
)

Definition at line 134 of file rotations.cpp.

void rot_angle_axis_to_roll_pitch_yaw ( double  theta,
const double  axis[3],
double  rpy[3] 
)

Definition at line 218 of file rotations.cpp.

int rot_matrix_to_quat ( const double  rot[9],
double  quat[4] 
)

Definition at line 289 of file rotations.cpp.

void rot_quat_mult ( double  c[4],
const double  a[4],
const double  b[4] 
)

rot_quat_mult

Multiplies quaternion a with quaternion b and stores the result in c. Arguments a and b must be double-precision floating point arrays of length 4.

Parameters:
c Array where the result of the multiplication is stored. Must be at least 4 elements long.
a Input quaternion to be multiplied (left-side).
b Input quaternion to be multiplied (right-side).

Definition at line 68 of file rotations.cpp.

int rot_quat_pos_to_matrix ( const double  quat[4],
const double  pos[3],
double  mat[16] 
)

Definition at line 260 of file rotations.cpp.

void rot_quat_rotate ( const double  rot[4],
double  v[3] 
)

rot_quat_rotate

Rotates a vector v from one coordinate system to another as specified by a unit quaternion rot.

Parameters:
rot Unit quaternion that specifies the rotation.
v 3-vector that is rotated according to the quaternion and modified in place with the result.

Definition at line 87 of file rotations.cpp.

void rot_quat_rotate_rev ( const double  rot[4],
double  v[3] 
)

rot_quat_rotate_rev

Rotates a vector v from one coordinate system to another as specified by a unit quaternion rot, but performs the rotation in the reverse direction of rot_quat_rotate().

Parameters:
rot Unit quaternion that specifies the rotation.
v 3-vector that is rotated according to the quaternion rot and modified in place with the result.

Definition at line 116 of file rotations.cpp.

void rot_quat_to_angle_axis ( const double  q[4],
double *  theta,
double  axis[3] 
)

Definition at line 153 of file rotations.cpp.

int rot_quat_to_matrix ( const double  quat[4],
double  rot[9] 
)

Definition at line 228 of file rotations.cpp.

void rot_quat_to_roll_pitch_yaw ( const double  q[4],
double  rpy[3] 
)

Definition at line 194 of file rotations.cpp.

int rot_quaternion_test (  ) 

Definition at line 320 of file rotations.cpp.

void rot_roll_pitch_yaw_to_angle_axis ( const double  rpy[3],
double *  theta,
double  axis[3] 
)

Definition at line 209 of file rotations.cpp.

void rot_roll_pitch_yaw_to_quat ( const double  rpy[3],
double  q[4] 
)

Definition at line 171 of file rotations.cpp.

static int rpyeq ( double  roll,
double  pitch,
double  yaw,
double  r,
double  p,
double  y 
) [inline, static]

Definition at line 52 of file rotations.cpp.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


mit_darpa_logs_player
Author(s): Miguel Oliveira
autogenerated on Wed Jul 23 04:34:16 2014