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 // SimEntity.h: interface for the CSimEntity class. 00033 // 00035 00036 #if !defined(AFX_SIMENTITY_H__73AEBFEA_E3FA_46D9_91E9_DCA62067F15A__INCLUDED_) 00037 #define AFX_SIMENTITY_H__73AEBFEA_E3FA_46D9_91E9_DCA62067F15A__INCLUDED_ 00038 00039 #if _MSC_VER > 1000 00040 #pragma once 00041 #endif // _MSC_VER > 1000 00042 00043 #include "SimBase.h" 00044 #include "SimLoggable.h" 00045 #include "AcousticNode.h" 00046 #include "AcousticSignal.h" 00047 #include "SimEnvironment.h" 00048 00049 #include <list> 00050 using namespace std; 00051 00052 typedef list<CAcousticNode *> ACOUSTIC_NODE_LIST; 00053 00054 class CSimEnvironment; 00055 00056 class CSimEntity : public CSimLoggable 00057 { 00058 public: 00059 virtual bool SetParams(CSimParams* pParams); 00060 bool SolveAcoustics(double dfTime,double dfDT); 00061 void SetEnvironment(CSimEnvironment * pEnv); 00062 virtual bool GetNodePosition(CAcousticNode & Node, double dfDT,Matrix & Result); 00063 bool GetAcousticNodes(ACOUSTIC_NODE_LIST & List); 00064 virtual bool Iterate(double dfTimeNow,double dfDT); 00065 CSimEntity(); 00066 virtual ~CSimEntity(); 00067 00068 ACOUSTIC_NODE_LIST m_AcousticNodes; 00069 00070 Matrix m_Pos_e; 00071 Matrix m_Vel_e; 00072 00073 double m_dfLastLogState; 00074 double m_dfLogFrequency; 00075 00076 virtual bool LogState(double dfTimeNow); 00077 00078 std::string m_sInputPrefix; 00079 std::string m_sOutputPrefix; 00080 00081 00082 protected: 00083 double HeadingFromYaw(double dfYaw); 00084 CSimEnvironment* m_pEnvironment; 00085 bool IsLocalSource(std::string sSrc); 00086 00087 00088 00089 }; 00090 00091 #endif // !defined(AFX_SIMENTITY_H__73AEBFEA_E3FA_46D9_91E9_DCA62067F15A__INCLUDED_)