QuaternionDynamics.h

Go to the documentation of this file.
00001 
00002 
00008 
00010 
00011 
00012 #ifndef QUATERNIONDYNAMICS_H
00013 #define QUATERNIONDYNAMICS_H
00014 #include "../rotation/Rotation.h"
00015 
00016 static Vector QuaternionDynamics(const double &_time, const Vector &w_BI, const Matrix &_params)
00017 {
00018     Matrix MOI(3,3); 
00019     MOI = _params(_(MatrixIndexBase+0,MatrixIndexBase+2),_(MatrixIndexBase+0,MatrixIndexBase+2));
00020     Matrix Tmoment(3,1); 
00021     Tmoment = ~_params(MatrixIndexBase + 3, _);
00022     Tmoment = (MOI.inverse() * (Tmoment - skew(w_BI) * (MOI * w_BI)));
00023     Vector temp(3); 
00024     temp(_) = Tmoment(_,MatrixIndexBase);
00025     return temp;
00026 }
00027 
00028 #endif
00029 // Do not change the comments below - they will be added automatically by CVS
00030 /*****************************************************************************
00031 *       $Log: QuaternionDynamics.h,v $
00032 *       Revision 1.3  2003/04/23 16:30:58  nilspace
00033 *       Various bugfixes & uploading of all changed code for new programmers.
00034 *       
00035 *       Revision 1.2  2003/03/27 02:51:08  nilspace
00036 *       Fixed to prevent incorrect vector indexing.
00037 *       
00038 *       Revision 1.1  2003/03/25 02:29:56  nilspace
00039 *       initial submission. Needs to be verified.
00040 *
00041 ******************************************************************************/

Generated on Wed Aug 6 12:58:50 2003 for Open-Sessame Framework by doxygen1.3