Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
threat.hpp
00001 #ifndef RIDE_THREAT_HPP
00002 #define RIDE_THREAT_HPP
00003 
00004 #include <map>
00005 #include <vector>
00006 #include <list>
00007 #include "ride/globalConst.hpp"
00008 #include "ride/mathVect.hpp"
00009 //#include "kernel/jafarException.hpp"
00010 //#include "ride/rideException.hpp"
00011 
00012 
00013 namespace jafar {
00014 
00015     namespace ride {
00016 
00024         enum ThreatType {
00025             EW,TF
00026         };
00027 
00032         class Threat {
00033             private :
00034                 int id;
00035                 ThreatType type;
00036                 std::vector<double> position;
00037                 double range;
00038                 double maxRange;
00039                 bool jammed;
00040             public :
00041                 Threat(int id_, ThreatType type_, std::vector<double> pos, double range_);
00042                 Threat(int id_, ThreatType type_, double x, double y, double z, double range_);
00043                 ~Threat();
00044                 bool operator == (Threat const& th) const;
00045                 int getId() const;
00046                 ThreatType getType() const;
00047                 std::vector<double> getPosition() const;
00048                 Vect getPosVect2D() const;
00049                 Vect getPosVect3D() const;
00050                 double getRange() const;
00051                 void setRange(double range_);
00052                 double getMaxRange() const;
00053                 bool isJammed() const;
00054                 void setJammed(bool jammed_);
00055         };
00056 
00061         class GlobalThreat {
00062             private :
00063                 std::list<Threat> ewThreat;
00064                 std::list<Threat> tfThreat;
00065             public :
00066                 GlobalThreat();
00067                 ~GlobalThreat();
00068                 void addThreat(Threat threat);
00069                 ThreatType removeThreat(int id);
00070                 Threat getThreat(int id);
00071                 void clearThreat();
00072                 std::list<Threat> getEWlist();
00073                 std::list<Threat> getTFlist();
00074                 // threat whose id is in the map are jammed with the associated range
00075                 void updateEWlist(std::map<int,double> const& jammedList);
00076         };
00077 
00078     }
00079 
00080 }
00081 
00082 #endif
00083 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:26 for Jafar by doxygen 1.7.6.1
LAAS-CNRS