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

CMGtest.cpp

Go to the documentation of this file.
00001 /////////////////////////////
00002 // CMGtest.cpp
00003 // test angle of CMG
00004 ////////////////////////////
00005 
00006 #include <Actuators/ControlMomentGyro.h>
00007 #include <Matrix.h>
00008 
00009 using namespace std;
00010 
00011 int main()
00012 {
00013 
00014         cout << "Start Program" << endl;
00015 
00016 sleep(10);
00017 
00018         ControlMomentGyro CMG;
00019         CMG.Initialize();
00020         sleep(13);
00021         CMG.SetWheelSpeed(20);
00022 
00023         CMG.SetAngle(5);
00024         sleep(25);
00025 
00026         CMG.SetWheelSpeed(0);
00027         CMG.SetAngle(0);
00028         sleep(7);
00029 
00030 //      cout << "Angle read(0.36652):  " << CMG.GetAngle() << endl;
00031 
00032 
00033 /*
00034         CMG.SetAngle(-0.36652);
00035         sleep(3);       
00036         cout << "Angle read(-0.36652):  " << CMG.GetAngle() << endl;
00037         
00038         CMG.SetAngle(0.0);
00039         sleep(3);       
00040         cout << "Angle read(0):  " << CMG.GetAngle() << endl;
00041         
00042         CMG.SetAngle(5.0);
00043         sleep(3);       
00044         cout << "Angle read(5.0):  " << CMG.GetAngle() << endl;
00045         
00046         CMG.SetAngle(6.0);
00047         sleep(3);       
00048         cout << "Angle read(6.0):  " << CMG.GetAngle() << endl;
00049 */      
00050         
00051         return 0;
00052 }

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