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 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 #ifndef __JAUS_MOBILITY_DATA_GLOBAL_WAYPOINT__H 00041 #define __JAUS_MOBILITY_DATA_GLOBAL_WAYPOINT__H 00042 00043 #include "jaus/mobility/drivers/waypoint.h" 00044 #include "jaus/core/discovery/vehicle.h" 00045 #include <vector> 00046 00047 namespace JAUS 00048 { 00049 class ReportGlobalWaypoint; 00050 class SetGlobalWaypoint; 00051 00061 class JAUS_MOBILITY_DLL GlobalWaypoint : public Waypoint 00062 { 00063 public: 00064 typedef std::vector<GlobalWaypoint> List; 00065 00073 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00074 { 00075 public: 00076 const static Byte Altitude = 0x01; 00077 const static Byte Roll = 0x02; 00078 const static Byte Pitch = 0x04; 00079 const static Byte Yaw = 0x08; 00080 const static Byte WaypointTolerance = 0x10; 00081 const static Byte PathTolerance = 0x20; 00082 }; 00089 class JAUS_MOBILITY_DLL Limits : public JAUS::Limits 00090 { 00091 public: 00092 const static double MinLatitude; 00093 const static double MaxLatitude; 00094 const static double MinLongitude; 00095 const static double MaxLongitude; 00096 const static double MinElevation; 00097 const static double MaxElevation; 00098 const static double MinAngle; 00099 const static double MaxAngle; 00100 const static double MinWaypointTolerance; 00101 const static double MaxWaypointTolerance; 00102 const static double MinPathTolerance; 00103 const static double MaxPathTolerance; 00104 }; 00105 GlobalWaypoint(); 00106 GlobalWaypoint(const GlobalWaypoint& waypoint); 00107 GlobalWaypoint(const ReportGlobalWaypoint& waypoint); 00108 GlobalWaypoint(const SetGlobalWaypoint& waypoint); 00109 virtual ~GlobalWaypoint(); 00110 bool SetPosition(const Wgs& position); 00111 bool SetLatitude(const double degrees); 00112 bool SetLongitude(const double degrees); 00113 bool SetAltitude(const double value); 00114 bool SetRoll(const double radians); 00115 bool SetPitch(const double radians); 00116 bool SetYaw(const double radians); 00117 bool SetWaypointTolerance(const double value); 00118 bool SetPathTolerance(const double value); 00119 inline double GetLatitude() const { return mLatitude; } 00120 inline double GetLongitude() const { return mLongitude; } 00121 inline double GetAltitude() const { return mAltitude; } 00122 inline double GetRoll() const { return mRoll; } 00123 inline double GetPitch() const { return mPitch; } 00124 inline double GetYaw() const { return mYaw; } 00125 inline double GetWaypointTolerance() const { return mWaypointTolerance; } 00126 inline double GetPathTolerance() const { return mPathTolerance; } 00127 Wgs GetPosition() const; 00128 Point3D GetOrientation() const; 00129 virtual void Print() const; 00130 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00131 virtual bool IsSameAs(const Waypoint* waypoint, const double errorInMeters = 1.0) const; 00132 GlobalWaypoint& operator=(const GlobalWaypoint& waypoint); 00133 GlobalWaypoint& operator=(const ReportGlobalWaypoint& waypoint); 00134 GlobalWaypoint& operator=(const SetGlobalWaypoint& waypoint); 00135 protected: 00136 Byte mPresenceVector; 00137 double mLatitude; 00138 double mLongitude; 00139 double mAltitude; 00140 double mRoll; 00141 double mPitch; 00142 double mYaw; 00143 double mWaypointTolerance; 00144 double mPathTolerance; 00145 }; 00146 } 00147 00148 #endif 00149 00150 /* End of File */