GAMS  1.4.0
gams::pose::simple_rotate Namespace Reference

For internal use. More...

Functions

double calc_angle (const ReferenceFrameType *self, double rx1, double ry1, double rz1, double rx2, double ry2, double rz2)
 Calculates smallest angle between two AngularVectors. More...
 
void orient_linear_vec (double &x, double &y, double &z, double rx, double ry, double rz, bool reverse=false)
 Rotates a LinearVector according to a AngularVector. More...
 
void transform_angular_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place from its origin frame. More...
 
void transform_angular_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double orx, double ory, double orz, double &rx, double &ry, double &rz)
 Transform AngularVector in-place into its origin frame from this frame. More...
 
void transform_pose_from_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place from its origin frame Simply applies linear and angular transforms independantly. More...
 
void transform_pose_to_origin (const ReferenceFrameType *origin, const ReferenceFrameType *self, double ox, double oy, double oz, double orx, double ory, double orz, double &x, double &y, double &z, double &rx, double &ry, double &rz, bool fixed)
 Transform pose in-place into its origin frame from this frame. More...
 

Detailed Description

For internal use.

Provides implementation of angular and pose transforms for frames where angular transformation is independant of linear. This applies to, for example, Cartesian and GPS frames, but not UTM frames. Inherit from this to use this implementation.

Function Documentation

◆ calc_angle()

double gams::pose::simple_rotate::calc_angle ( const ReferenceFrameType self,
double  rx1,
double  ry1,
double  rz1,
double  rx2,
double  ry2,
double  rz2 
)

Calculates smallest angle between two AngularVectors.

Parameters
selfthe current reference frame
rx1the starting angular on x axis
ry1the starting angular on y axis
rz1the starting angular on z axis
rx2the ending rotatation on x axis
ry2the ending angular on y axis
rz2the ending angular on z axis
Returns
the difference in radians

◆ orient_linear_vec()

void gams::pose::simple_rotate::orient_linear_vec ( double &  x,
double &  y,
double &  z,
double  rx,
double  ry,
double  rz,
bool  reverse = false 
)

Rotates a LinearVector according to a AngularVector.

Parameters
xthe x coordinate to orient (in-place)
ythe y coordinate to orient (in-place)
zthe z coordinate to orient (in-place)
rxthe angular x to apply, axis-angle notation
rythe angular y to apply, axis-angle notation
rzthe angular z to apply, axis-angle notation
reverseif true, apply angular in opposite direction

◆ transform_angular_from_origin()

void gams::pose::simple_rotate::transform_angular_from_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  orx,
double  ory,
double  orz,
double &  rx,
double &  ry,
double &  rz 
)

Transform AngularVector in-place from its origin frame.

Parameters
originthe origin frame
selfthe current reference frame
orxthe x component of the origin axis-angle representation
orythe y component of the origin axis-angle representation
orzthe z component of the origin axis-angle representation
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation

◆ transform_angular_to_origin()

void gams::pose::simple_rotate::transform_angular_to_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  orx,
double  ory,
double  orz,
double &  rx,
double &  ry,
double &  rz 
)

Transform AngularVector in-place into its origin frame from this frame.

Parameters
originthe origin frame
selfthe current reference frame
orxthe x component of the origin axis-angle representation
orythe y component of the origin axis-angle representation
orzthe z component of the origin axis-angle representation
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation

◆ transform_pose_from_origin()

void gams::pose::simple_rotate::transform_pose_from_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  ox,
double  oy,
double  oz,
double  orx,
double  ory,
double  orz,
double &  x,
double &  y,
double &  z,
double &  rx,
double &  ry,
double &  rz,
bool  fixed 
)

Transform pose in-place from its origin frame Simply applies linear and angular transforms independantly.

Parameters
originthe origin frame
selfthe current reference frame
xthe x axis for the coordinate to translate
ythe y axis for the coordinate to translate
zthe z axis for the coordinate to translate
oxthe x axis for the coordinate to translate
oythe y axis for the coordinate to translate
ozthe z axis for the coordinate to translate
orxthe x component of the origin axis-angle representation
orythe y component of the origin axis-angle representation
orzthe z component of the origin axis-angle representation
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation

◆ transform_pose_to_origin()

void gams::pose::simple_rotate::transform_pose_to_origin ( const ReferenceFrameType origin,
const ReferenceFrameType self,
double  ox,
double  oy,
double  oz,
double  orx,
double  ory,
double  orz,
double &  x,
double &  y,
double &  z,
double &  rx,
double &  ry,
double &  rz,
bool  fixed 
)

Transform pose in-place into its origin frame from this frame.

Simply applies linear and angular transforms independantly

Parameters
originthe origin frame
selfthe current reference frame
oxthe x axis for the coordinate to translate
oythe y axis for the coordinate to translate
ozthe z axis for the coordinate to translate
orxthe x component of the origin axis-angle representation
orythe y component of the origin axis-angle representation
orzthe z component of the origin axis-angle representation
rxthe x component of the axis-angle representation
rythe y component of the axis-angle representation
rzthe z component of the axis-angle representation