MOOS 0.2375
|
00001 00002 // 00003 // MOOS - Mission Oriented Operating Suite 00004 // 00005 // A suit of Applications and Libraries for Mobile Robotics Research 00006 // Copyright (C) 2001-2005 Massachusetts Institute of Technology and 00007 // Oxford University. 00008 // 00009 // This software was written by Paul Newman at MIT 2001-2002 and Oxford 00010 // University 2003-2005. email: pnewman@robots.ox.ac.uk. 00011 // 00012 // This file is part of a MOOS Utility Component. 00013 // 00014 // This program is free software; you can redistribute it and/or 00015 // modify it under the terms of the GNU General Public License as 00016 // published by the Free Software Foundation; either version 2 of the 00017 // License, or (at your option) any later version. 00018 // 00019 // This program is distributed in the hope that it will be useful, 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 // General Public License for more details. 00023 // 00024 // You should have received a copy of the GNU General Public License 00025 // along with this program; if not, write to the Free Software 00026 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 00027 // 02111-1307, USA. 00028 // 00030 00031 00032 // SixDOFAUV.h: interface for the CSixDOFAUV class. 00033 // 00035 00036 #if !defined(AFX_SIXDOFAUV_H__135C4976_AA4F_495D_AD96_0F91C579E194__INCLUDED_) 00037 #define AFX_SIXDOFAUV_H__135C4976_AA4F_495D_AD96_0F91C579E194__INCLUDED_ 00038 00039 #if _MSC_VER > 1000 00040 #pragma once 00041 #endif // _MSC_VER > 1000 00042 00043 #include <newmat.h> 00044 using namespace NEWMAT; 00045 00046 #include <MOOSGenLib/MOOSGenLib.h> 00047 //#include "SimEntity.h" 00048 #include "SimVehicle.h" 00049 00050 00051 class CSixDOFAUV : public CSimVehicle 00052 { 00053 public: 00054 double GetDepth(); 00055 00056 00057 00058 bool Initialise(); 00059 00060 double GetX(){ return m_Pos_e(1,1);}; 00061 double GetY(){ return m_Pos_e(2,1);}; 00062 double GetZ(){ return m_Pos_e(3,1);}; 00063 double GetPitch(){ return m_Pos_e(4,1);}; 00064 00065 double GetHeading(){ return m_dfHeading;}; 00066 double GetAltitude(){ return m_dfAltitude;}; 00067 double GetYaw(){return m_Pos_e(6,1);}; 00068 double GetZVel(){return m_Vel_e(3,1);}; 00069 double GetBodyVelY(){return m_Vel_v(2,1);}; 00070 double GetBodyVelX(){return m_Vel_v(1,1);}; 00071 double GetSpeed(){return m_dfSpeed;}; 00072 00073 void SetX(double dfVal){m_Pos_e(1,1) = dfVal;}; 00074 void SetY(double dfVal){m_Pos_e(2,1) = dfVal;}; 00075 void SetZ(double dfVal){m_Pos_e(3,1) = dfVal;}; 00076 void SetYaw(double dfVal){m_Pos_e(6,1) = dfVal;}; 00077 void SetDepth(double dfVal){m_dfDepth = dfVal;}; 00078 void SetAltitude(double dfVal){m_dfAltitude = dfVal;}; 00079 void SetInputPrefix(const std::string & sStr){m_sInputPrefix = sStr;}; 00080 void SetOutputPrefix(const std::string & sStr){m_sOutputPrefix = sStr;}; 00081 00082 bool FillVelJacobian(); 00083 bool Iterate(double dfTimeNow,double dfDTime); 00084 00085 CSixDOFAUV(); 00086 virtual ~CSixDOFAUV(); 00087 00088 double m_dfWeight; 00089 double m_dfMass; 00090 00091 double m_dfBuoyancy; 00092 00093 Matrix m_Vel_v; 00094 Matrix m_Acc_v; 00095 Matrix m_M; 00096 Matrix m_Mi; 00097 Matrix m_Uf; 00098 Matrix m_Drag; 00099 Matrix m_JacVel; 00100 Matrix m_KDrag; 00101 Matrix m_Hf; 00102 Matrix m_COG; 00103 Matrix m_COB; 00104 double m_dfAltitude; 00105 double m_dfDepth; 00106 double m_dfTideHeight; 00107 double m_dfSpeed; 00108 double m_dfHeading; //in degrees... 00109 00110 // double m_dfTimeNow; 00111 00112 00113 double m_dfRudder; 00114 double m_dfElevator; 00115 double m_dfThrust; 00116 00117 00118 00119 protected: 00120 bool DoModel(double dfDT); 00121 }; 00122 00123 #endif // !defined(AFX_SIXDOFAUV_H__135C4976_AA4F_495D_AD96_0F91C579E194__INCLUDED_)