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

testOrbitController.cpp

Go to the documentation of this file.
00001 //////////////////////////////////////////////////////////////////////////////////////////////////
00002 /*! \file testOrbitController.cpp
00003  *  \brief Template file for implenting orbit control law
00004  *  \author $Author: jayhawk_hokie $
00005  *  \version $Revision: 1.1 $
00006  *  \date    $Date: 2007/08/31 15:58:35 $
00007 *//////////////////////////////////////////////////////////////////////////////////////////////////
00008 /*!
00009 */
00010 //////////////////////////////////////////////////////////////////////////////////////////////////
00011 
00012 #include "testOrbitController.h"
00013 
00014 /* Constructor */
00015 testOrbitController::testOrbitController(  Whorl* ptr_whorl )
00016 {
00017         m_whorl = ptr_whorl;
00018  
00019         Initialize( );
00020 }
00021 
00022 /* Deconstructor */
00023 testOrbitController::~testOrbitController() 
00024 { }
00025 
00026 int testOrbitController::Initialize( ) 
00027 {
00028         /* Control Acceleratin Gains */
00029         m_Gains.initialize(6);
00030         m_Gains(1) = 0;
00031         m_Gains(2) = 0;
00032         m_Gains(3) = 0;
00033         m_Gains(4) = 0;
00034         m_Gains(5) = 0;
00035         m_Gains(6) = 0;
00036 
00037         /* Space Vehicle Id */
00038         m_vehicleID = 1;
00039 
00040         /* Acceleration Duration [s] */
00041         m_duration = 2;
00042 
00043         /* Space Vehicle Mass [kg] */
00044         m_mass = 100;   
00045 
00046         /* Current Time */
00047         m_vehicleTime = Now( );
00048 
00049         /* Reset delta V time history from orbit propagator */
00050         m_accelerationVector.ResetValues( );
00051 
00052         return( 0 );
00053 }
00054 
00055 int testOrbitController::Run( )
00056 {
00057         /* Get Classical Orbital Elements */
00058         m_whorl->GetCOE( );
00059 
00060         /* Radial, In-Track, Cross-Track control acceleration [m/s^2] */
00061         u(1) = 0;
00062         u(2) = 0;
00063         u(3) = 0;
00064 
00065         /* Current Time */
00066         m_vehicleTime = Now( );
00067 
00068         /* Set Orbit Control Acceleration */
00069         m_whorl->SetOrbitControl( u );  
00070 
00071         /* Send control accleration to GPS simulator propagator (running on Severian) */
00072         m_accelerationVector.SendAccelerationMessage( m_vehicleID, m_vehicleTime.GetSeconds( ), m_duration, u, m_mass );
00073 
00074         return( 0 );
00075 }
00076 
00077 
00078 
00079 // Do not change the comments below - they will be added automatically by CVS
00080 /*****************************************************************************
00081 *       $Log: testOrbitController.cpp,v $
00082 *       Revision 1.1  2007/08/31 15:58:35  jayhawk_hokie
00083 *       Initial Submission.
00084 *       
00085 *       
00086 *       
00087 *
00088 ******************************************************************************/

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