48 #error Must use C++ for the type Robot
58 #ifdef _MSC_VER // Microsoft
59 #pragma warning (disable:4786)
75 using namespace NEWMAT;
79 #define M_PI 3.14159265358979
89 inline double deg2rad(
const double angle_deg){
return angle_deg*M_PI/180; }
90 inline double rad2deg(
const double angle_rad){
return angle_rad*180/M_PI; }
96 ReturnMatrix
pinv(
const Matrix & M);
100 ReturnMatrix
Integ_Trap(
const ColumnVector & present, ColumnVector & past,
const Real dt);
102 void Runge_Kutta4(ReturnMatrix (*xdot)(Real time,
const Matrix & xin),
103 const Matrix & xo, Real to, Real tf,
int nsteps,
104 RowVector & tout, Matrix & xout);
107 const Matrix & xo, Real to, Real tf,
int nsteps);
110 bool & exit,
bool & init),
111 const Matrix & xo, Real to, Real tf,
int nsteps);
113 void odeint(ReturnMatrix (*xdot)(Real time,
const Matrix & xin),
114 Matrix & xo, Real to, Real tf, Real eps, Real h1, Real hmin,
115 int & nok,
int & nbad,
116 RowVector & tout, Matrix & xout, Real dtsav);
118 ReturnMatrix
sign(
const Matrix & x);
120 short sign(
const Real x);
122 const double epsilon = 0.0000001;
124 inline bool isZero(
const double x)
126 if ( fabs(x) < epsilon)
135 ReturnMatrix
trans(
const ColumnVector & a);
138 ReturnMatrix
rotx(
const Real alpha);
139 ReturnMatrix
roty(
const Real beta);
140 ReturnMatrix
rotz(
const Real gamma);
141 ReturnMatrix
rotk(
const Real theta,
const ColumnVector & k);
143 ReturnMatrix
rpy(
const ColumnVector & a);
144 ReturnMatrix
eulzxz(
const ColumnVector & a);
145 ReturnMatrix
rotd(
const Real theta,
const ColumnVector & k1,
const ColumnVector & k2);
149 ReturnMatrix
irotk(
const Matrix & R);
150 ReturnMatrix
irpy(
const Matrix & R);
151 ReturnMatrix
ieulzxz(
const Matrix & R);