Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

QuaternionDynamics.h

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file QuaternionDynamics.h
00003 *  \brief Rigid body dynamic equations of attitude motion in quaternion form.
00004 *  \author $Author: jayhawk_hokie $
00005 *  \version $Revision: 1.2 $
00006 *  \date    $Date: 2005/06/10 12:53:28 $
00007 //////////////////////////////////////////////////////////////////////////////////////////////////
00008 * \todo document the QuaternionDynamics function
00009 */
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.2  2005/06/10 12:53:28  jayhawk_hokie
00033 *       Changed header file format to make it easier to link to the spacecraft code by only having to specify dsacss/dep/spacecraft/src (ex. "file.h" changed to <dir/file.h> where dir is a folder in src).
00034 *       
00035 *       Revision 1.1.1.1  2005/04/26 17:40:56  cakinli
00036 *       Adding OpenSESSAME to DSACSS distrib to capture fixed version.
00037 *       
00038 *       Revision 1.3  2003/04/23 16:30:58  nilspace
00039 *       Various bugfixes & uploading of all changed code for new programmers.
00040 *       
00041 *       Revision 1.2  2003/03/27 02:51:08  nilspace
00042 *       Fixed to prevent incorrect vector indexing.
00043 *       
00044 *       Revision 1.1  2003/03/25 02:29:56  nilspace
00045 *       initial submission. Needs to be verified.
00046 *
00047 ******************************************************************************/

Generated on Wed Sep 5 12:54:24 2007 for DSACSS Operational Code by  doxygen 1.3.9.1