UavAutopilot.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //
00003 // $Id$
00004 //
00005 // Copyright 2008, 2009, 2010, 2011, 2012  Antonio Franchi and Paolo Stegagno    
00006 //
00007 // This file is part of MIP.
00008 //
00009 // MIP is free software: you can redistribute it and/or modify
00010 // it under the terms of the GNU General Public License as published by
00011 // the Free Software Foundation, either version 3 of the License, or
00012 // (at your option) any later version.
00013 //
00014 // MIP is distributed in the hope that it will be useful,
00015 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017 // GNU General Public License for more details.
00018 //
00019 // You should have received a copy of the GNU General Public License
00020 // along with MIP. If not, see <http://www.gnu.org/licenses/>.
00021 //
00022 // Contact info: antonio.franchi@tuebingen.mpg.de stegagno@diag.uniroma1.it
00023 //
00024 // ----------------------------------------------------------------------------
00025 
00031 
00032 #ifndef __UAV_AUTOPILOT_H__
00033 #define __UAV_AUTOPILOT_H__
00034 
00035 #ifdef MIP_HOST_APPLE
00036  #include <applePatch.h>
00037 #endif
00038 
00039 #include <Types.h>
00040 #include <baselib.h>
00041 
00042 using namespace std;
00043 using namespace MipBaselib;
00044  
00045 // /// \addtogroup uav_Module
00046 // /* @{ */
00047  
00048 class UavAutopilot{
00049 
00050  public:
00051   virtual void getRef(Position3D currPos,Time currTime,Position3D& desPos,Velocity3D& desVel,bool & done) = 0;
00052   virtual void getRef(Position3D currPos,Velocity3D& desVel,bool& done) = 0;
00053 };
00054  
00055  
00056 class Landing : public UavAutopilot{
00057  Position3D _finalPos;
00058  Position3D _interPos;
00059  Position3D _initPos;
00060  Decimal _toll;
00061 
00062  Position3D _initDispl;
00063  Velocity3D _initVel;
00064  Time _initTime;
00065  Decimal _maxSpeed;
00066  int _phase;
00067 
00068  public:
00069   Landing(Position3D finalPos,Position3D interPos,Decimal toll,Decimal speed);
00070  
00071   void getRef(Position3D currPos,Time currTime,Position3D& desPos,Velocity3D& desVel,bool & done);
00072   void getRef(Position3D currPos,Velocity3D& desVel,bool& done);
00073 };
00074 
00075 
00076 class Takeoff : public UavAutopilot{
00077  Position3D _finalPos;
00078  Position3D _interPos;
00079  Position3D _initPos;
00080  Decimal _toll;
00081  
00082  bool printDebug;
00083 
00084  Decimal _maxSpeed;
00085  int _phase;
00086 
00087  public:
00088   Takeoff(Position3D initialPos,Decimal toll,Decimal maxSpeed);
00089  
00090   void getRef(Position3D currPos,Time currTime,Position3D& desPos,Velocity3D& desVel,bool & done){};
00091   void getRef(Position3D currPos,Velocity3D& desVel,bool& done);
00092   bool getRef(Position3D currPos,Position3D desPos,Velocity3D& refVel);
00093 };
00094  
00095 
00096 
00097 #endif
00098 
00099 // /* @} */
00100 

Generated on Mon Feb 20 07:01:06 2017 for MIP by  doxygen 1.5.6