Utility header file. More...
Go to the source code of this file.
Defines | |
#define | GRAVITY 9.81 |
#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. | |
ReturnMatrix | ieulzxz (const Matrix &R) |
Obtain Roll, Pitch and Yaw from a rotation matrix. | |
ReturnMatrix | Integ_Trap (const ColumnVector &present, ColumnVector &past, const Real dt) |
Trapezoidal integration. | |
ReturnMatrix | irotk (const Matrix &R) |
Obtain axis from a rotation matrix. | |
ReturnMatrix | irpy (const Matrix &R) |
Obtain Roll, Pitch and Yaw from a rotation matrix. | |
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. | |
ReturnMatrix | pinv (const Matrix &M) |
Matrix pseudo inverse using SVD. | |
double | rad2deg (const double angle_rad) |
ReturnMatrix | rotd (const Real theta, const ColumnVector &k1, const ColumnVector &k2) |
Rotation around an arbitrary line. | |
ReturnMatrix | rotk (const Real theta, const ColumnVector &k) |
Rotation around arbitrary axis. | |
ReturnMatrix | rotx (const Real alpha) |
Rotation around x axis. | |
ReturnMatrix | roty (const Real beta) |
Rotation around x axis. | |
ReturnMatrix | rotz (const Real gamma) |
Rotation around z axis. | |
ReturnMatrix | rpy (const ColumnVector &a) |
Roll Pitch Yaw rotation. | |
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. | |
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. | |
ReturnMatrix | sign (const Matrix &x) |
Sign of a matrix. | |
short | sign (const Real x) |
Sign of real. | |
ReturnMatrix | trans (const ColumnVector &a) |
Translation. | |
ReturnMatrix | x_prod_matrix (const ColumnVector &x) |
Cross product matrix. | |
Variables | |
const double | epsilon = 0.0000001 |
Real | fourbyfourident [] |
Used to initialize a matrix. | |
static const char | header_utils_rcsid [] = "$Id: utils.h,v 1.10 2006/05/16 16:11:15 gourdeau Exp $" |
RCS/CVS version. | |
Real | threebythreeident [] |
Used to initialize a matrix. |
Utility header file.
Definition in file utils.h.
#define WANT_FSTREAM /* include.h will get fstream fns */ |
#define WANT_STREAM /* include.h will get stream fns */ |
#define WANT_STRING /* include.h will get string fns */ |
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 | ) |
Rotation around an arbitrary line.
Definition at line 240 of file homogen.cpp.
Rotation around arbitrary axis.
Definition at line 149 of file homogen.cpp.
Rotation around x axis.
Definition at line 87 of file homogen.cpp.
Rotation around x axis.
Definition at line 107 of file homogen.cpp.
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 | ( | ReturnMatrix(*)(Real time, const Matrix &xin) | xdot, |
const Matrix & | xo, | ||
Real | to, | ||
Real | tf, | ||
int | nsteps, | ||
RowVector & | tout, | ||
Matrix & | xout | ||
) |
void Runge_Kutta4_Real_time | ( | ReturnMatrix(*)(Real time, const Matrix &xin) | xdot, |
const Matrix & | xo, | ||
Real | to, | ||
Real | tf, | ||
int | nsteps | ||
) |
void Runge_Kutta4_Real_time | ( | ReturnMatrix(*)(Real time, const Matrix &xin, bool &exit, bool &init) | xdot, |
const Matrix & | xo, | ||
Real | to, | ||
Real | tf, | ||
int | nsteps | ||
) |
ReturnMatrix trans | ( | const ColumnVector & | a | ) |
Translation.
Definition at line 68 of file homogen.cpp.
ReturnMatrix x_prod_matrix | ( | const ColumnVector & | x | ) |
const char header_utils_rcsid[] = "$Id: utils.h,v 1.10 2006/05/16 16:11:15 gourdeau Exp $" [static] |