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_REPORT_GLOBAL_POSE__H 00041 #define __JAUS_MOBILITY_REPORT_GLOBAL_POSE__H 00042 00043 #include <cxutils/math/point3d.h> 00044 #include "jaus/core/message.h" 00045 #include "jaus/mobility/mobilitycodes.h" 00046 00047 namespace JAUS 00048 { 00060 class JAUS_MOBILITY_DLL ReportGlobalPose : public Message 00061 { 00062 public: 00070 class JAUS_MOBILITY_DLL PresenceVector : public JAUS::PresenceVector 00071 { 00072 public: 00073 const static UShort Latitude = 0x0001; 00074 const static UShort Longitude = 0x0002; 00075 const static UShort Altitude = 0x0004; 00076 const static UShort PositionRMS = 0x0008; 00077 const static UShort Roll = 0x0010; 00078 const static UShort Pitch = 0x0020; 00079 const static UShort Yaw = 0x0040; 00080 const static UShort AttitudeRMS = 0x0080; 00081 const static UShort TimeStamp = 0x0100; 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 MinPositionRMS; 00099 const static double MaxPositionRMS; 00100 const static double MinAngle; 00101 const static double MaxAngle; 00102 const static double MinAttitudeRMS; 00103 const static double MaxAttitudeRMS; 00104 }; 00105 ReportGlobalPose(const Address& dest = Address(), const Address& src = Address()); 00106 ReportGlobalPose(const ReportGlobalPose& message); 00107 ~ReportGlobalPose(); 00108 bool SetLatitude(const double degrees); 00109 bool SetLongitude(const double degrees); 00110 bool SetAltitude(const double value); 00111 bool SetPositionRMS(const double value); 00112 bool SetRoll(const double radians); 00113 bool SetPitch(const double radians); 00114 bool SetYaw(const double radians); 00115 bool SetAttitudeRMS(const double radians); 00116 bool SetTimeStamp(const JAUS::Time& time); 00117 bool SetPose(const Wgs& position, 00118 const Point3D& orientation, 00119 const Time& time = Time(true)); 00120 bool SetPosition(const Wgs& position, const Time& time = Time(true)); 00121 bool SetOrientation(const Point3D& orientation, const Time& time = Time(true)); 00122 inline double GetLatitude() const { return mLatitude; } 00123 inline double GetLongitude() const { return mLongitude; } 00124 inline double GetAltitude() const { return mAltitude; } 00125 inline double GetPositionRMS() const { return mPositionRMS; } 00126 inline double GetRoll() const { return mRoll; } 00127 inline double GetPitch() const { return mPitch; } 00128 inline double GetYaw() const { return mYaw; } 00129 inline double GetAttitudeRMS() const { return mAttitudeRMS; } 00130 inline Time GetTimeStamp() const { return mTimeStamp; } 00131 Wgs GetPosition() const; 00132 Point3D GetOrientation() const; 00133 virtual bool IsCommand() const { return false; } 00134 virtual int WriteMessageBody(Packet& packet) const; 00135 virtual int ReadMessageBody(const Packet& packet); 00136 virtual Message* Clone() const { return new ReportGlobalPose(*this); } 00137 virtual UInt GetPresenceVector() const { return mPresenceVector; } 00138 virtual UInt GetPresenceVectorSize() const { return USHORT_SIZE; } 00139 virtual UInt GetPresenceVectorMask() const { return 0x01FF; } 00140 virtual UShort GetMessageCodeOfResponse() const { return 0; } 00141 virtual std::string GetMessageName() const { return "Report Global Pose"; } 00142 virtual void ClearMessageBody(); 00143 virtual void PrintMessageBody() const; 00144 virtual bool IsLargeDataSet(const unsigned int maxPayloadSize = 1437) const { return false; } 00145 virtual int RunTestCase() const; 00146 ReportGlobalPose& operator=(const ReportGlobalPose& message); 00147 protected: 00148 UShort mPresenceVector; 00149 double mLatitude; 00150 double mLongitude; 00151 double mAltitude; 00152 double mPositionRMS; 00153 double mRoll; 00154 double mPitch; 00155 double mYaw; 00156 double mAttitudeRMS; 00157 Time mTimeStamp; 00158 00159 }; 00160 } 00161 00162 #endif 00163 /* End of File */