Utility header file. More...


Go to the source code of this file.
| Macros | |
| #define | GRAVITY 9.81 | 
| #define | M_PI 3.14159265358979 | 
| #define | WANT_FSTREAM /* include.h will get fstream fns */ | 
| #define | WANT_MATH /* include.h will get math fns */ | 
| #define | WANT_STREAM /* include.h will get stream fns */ | 
| #define | WANT_STRING /* include.h will get string fns */ | 
| Functions | |
| double | deg2rad (const double angle_deg) | 
| ReturnMatrix | eulzxz (const ColumnVector &a) | 
| Euler ZXZ rotation.  More... | |
| ReturnMatrix | ieulzxz (const Matrix &R) | 
| Obtain Roll, Pitch and Yaw from a rotation matrix.  More... | |
| ReturnMatrix | Integ_Trap (const ColumnVector &present, ColumnVector &past, const Real dt) | 
| Trapezoidal integration.  More... | |
| ReturnMatrix | irotk (const Matrix &R) | 
| Obtain axis from a rotation matrix.  More... | |
| ReturnMatrix | irpy (const Matrix &R) | 
| Obtain Roll, Pitch and Yaw from a rotation matrix.  More... | |
| bool | isZero (const double x) | 
| void | odeint (ReturnMatrix(*xdot)(Real time, const Matrix &xin), Matrix &xo, Real to, Real tf, Real eps, Real h1, Real hmin, int &nok, int &nbad, RowVector &tout, Matrix &xout, Real dtsav) | 
| Integrate the ordinary differential equation xdot from time to to time tf using an adaptive step size strategy.  More... | |
| ReturnMatrix | pinv (const Matrix &M) | 
| Matrix pseudo inverse using SVD.  More... | |
| double | rad2deg (const double angle_rad) | 
| ReturnMatrix | rotd (const Real theta, const ColumnVector &k1, const ColumnVector &k2) | 
| Rotation around an arbitrary line.  More... | |
| ReturnMatrix | rotk (const Real theta, const ColumnVector &k) | 
| Rotation around arbitrary axis.  More... | |
| ReturnMatrix | rotx (const Real alpha) | 
| Rotation around x axis.  More... | |
| ReturnMatrix | roty (const Real beta) | 
| Rotation around x axis.  More... | |
| ReturnMatrix | rotz (const Real gamma) | 
| Rotation around z axis.  More... | |
| ReturnMatrix | rpy (const ColumnVector &a) | 
| Roll Pitch Yaw rotation.  More... | |
| void | Runge_Kutta4 (ReturnMatrix(*xdot)(Real time, const Matrix &xin), const Matrix &xo, Real to, Real tf, int nsteps, RowVector &tout, Matrix &xout) | 
| Fixed step size fourth-order Runge-Kutta integrator.  More... | |
| void | Runge_Kutta4_Real_time (ReturnMatrix(*xdot)(Real time, const Matrix &xin), const Matrix &xo, Real to, Real tf, int nsteps) | 
| void | Runge_Kutta4_Real_time (ReturnMatrix(*xdot)(Real time, const Matrix &xin, bool &exit, bool &init), const Matrix &xo, Real to, Real tf, int nsteps) | 
| Fixed step size fourth-order Runge-Kutta integrator.  More... | |
| ReturnMatrix | sign (const Matrix &x) | 
| Sign of a matrix.  More... | |
| short | sign (const Real x) | 
| Sign of real.  More... | |
| ReturnMatrix | trans (const ColumnVector &a) | 
| Translation.  More... | |
| ReturnMatrix | x_prod_matrix (const ColumnVector &x) | 
| Cross product matrix.  More... | |
| Variables | |
| const double | epsilon = 0.0000001 | 
| Real | fourbyfourident [] | 
| Used to initialize a  matrix.  More... | |
| static const char | header_utils_rcsid [] = "$Id: utils.h,v 1.10 2006/05/16 16:11:15 gourdeau Exp $" | 
| RCS/CVS version.  More... | |
| Real | threebythreeident [] | 
| Used to initialize a  matrix.  More... | |
Utility header file.
Definition in file utils.h.
| ReturnMatrix eulzxz | ( | const ColumnVector & | a | ) | 
Euler ZXZ rotation.
Definition at line 211 of file homogen.cpp.
| ReturnMatrix ieulzxz | ( | const Matrix & | R | ) | 
Obtain Roll, Pitch and Yaw from a rotation matrix.
Definition at line 294 of file homogen.cpp.
| ReturnMatrix Integ_Trap | ( | const ColumnVector & | present, | 
| ColumnVector & | past, | ||
| const Real | dt | ||
| ) | 
| ReturnMatrix irotk | ( | const Matrix & | R | ) | 
Obtain axis from a rotation matrix.
Definition at line 253 of file homogen.cpp.
| ReturnMatrix irpy | ( | const Matrix & | R | ) | 
Obtain Roll, Pitch and Yaw from a rotation matrix.
Definition at line 271 of file homogen.cpp.
| void odeint | ( | ReturnMatrix(*)(Real time, const Matrix &xin) | xdot, | 
| Matrix & | xo, | ||
| Real | to, | ||
| Real | tf, | ||
| Real | eps, | ||
| Real | h1, | ||
| Real | hmin, | ||
| int & | nok, | ||
| int & | nbad, | ||
| RowVector & | tout, | ||
| Matrix & | xout, | ||
| Real | dtsav | ||
| ) | 
Integrate the ordinary differential equation xdot from time to to time tf using an adaptive step size strategy.
adapted from: Numerical Recipes in C, The Art of Scientific Computing, Press, William H. and Flannery, Brian P. and Teukolsky, Saul A. and Vetterling, William T., Cambridge University Press, 1988.
| ReturnMatrix pinv | ( | const Matrix & | M | ) | 
| ReturnMatrix rotd | ( | const Real | theta, | 
| const ColumnVector & | k1, | ||
| const ColumnVector & | k2 | ||
| ) | 
Rotation around an arbitrary line.
Definition at line 240 of file homogen.cpp.
| ReturnMatrix rotk | ( | const Real | theta, | 
| const ColumnVector & | k | ||
| ) | 
Rotation around arbitrary axis.
Definition at line 149 of file homogen.cpp.
| ReturnMatrix rotx | ( | const Real | alpha | ) | 
Rotation around x axis.
Definition at line 87 of file homogen.cpp.
| ReturnMatrix roty | ( | const Real | beta | ) | 
Rotation around x axis.
Definition at line 107 of file homogen.cpp.
| ReturnMatrix rotz | ( | const Real | gamma | ) | 
Rotation around z axis.
Definition at line 127 of file homogen.cpp.
| ReturnMatrix rpy | ( | const ColumnVector & | a | ) | 
Roll Pitch Yaw rotation.
Definition at line 182 of file homogen.cpp.
| void Runge_Kutta4_Real_time | ( | ReturnMatrix(*)(Real time, const Matrix &xin) | xdot, | 
| const Matrix & | xo, | ||
| Real | to, | ||
| Real | tf, | ||
| int | nsteps | ||
| ) | 
| ReturnMatrix sign | ( | const Matrix & | x | ) | 
| ReturnMatrix trans | ( | const ColumnVector & | a | ) | 
Translation.
Definition at line 68 of file homogen.cpp.
| ReturnMatrix x_prod_matrix | ( | const ColumnVector & | x | ) | 
| 
 | static |