UavAutopilot.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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
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