Go to the documentation of this file.
30 #ifdef _CMT_DLL_EXPORT
31 #include "xsens_math.h"
35 #define PACKETLOG CMTLOG
37 #define PACKETLOG(...)
276 totalOffset += 3 * ds;
286 totalOffset += 3 * ds;
296 totalOffset += 3 * ds;
327 totalOffset += 3 * ds;
332 totalOffset += 4 * ds;
337 totalOffset += 9 * ds;
377 totalOffset += 3 * ds;
390 totalOffset += 3 * ds;
565 for (
uint16_t i = 0; i < 10; ++i, ++sh, ++bare)
852 double* bare = (
double*)&
buffer;
888 double* bare = (
double*)&
data;
998 for (
int32_t i = 0; i < 3; ++i)
999 for (
int32_t j = 0; j < 3; ++j, k += ds)
1031 for (
int32_t i = 0; i < 3; ++i)
1032 for (
int32_t j = 0; j < 3; ++j, k += ds)
1291 PACKETLOG(
"Create new packet from Packet %p\n", &pack);
1301 PACKETLOG(
"Copy packet from Packet %p\n",
this);
1318 #ifdef _CMT_DLL_EXPORT
1335 Quaternion qa, qb, qc;
1393 dc =
g * da + f * db;
1450 qc.isSlerp(qa, qb, f);
1471 m.isArray(&mf.
m_data[0][0]);
1475 m.isArray(&mf.
m_data[0][0]);
1478 qc.isSlerp(qa, qb, f);
1481 m.setArray(&mf.
m_data[0][0]);
1492 dc = f * (double)sc;
1493 sc = sa + (
uint16_t)doubleToLong(dc);
bool updateAccG(const CmtVector &g, const uint16_t index=0)
Add/update XKF-3 Acc-G data for the item.
CmtVector getPositionLLA(const uint16_t index=0) const
Return the Position Lat Lon Alt component of a data item.
Packet(uint16_t items, bool xbus)
bool setDataFormat(const CmtDataFormat &format, const uint16_t index=0)
bool updateStatus(const uint8_t data, const uint16_t index=0)
Add/update Status information for the item.
struct xsens::Packet::PacketInfo * m_infoList
bool updateOriEuler(const CmtEuler &data, const uint16_t index=0)
Add/update Euler Orientation data for the item.
void operator=(const Packet &pack)
bool containsRawGyr(const uint16_t index=0) const
Check if data item contains Raw Gyroscope data.
GLenum GLsizei GLenum format
#define CMT_OUTPUTSETTINGS_ORIENTMODE_MATRIX
CmtAnalogInData getAnalogIn1(const uint16_t index=0) const
Return the AnalogIn 1 component of a data item.
bool containsRawGpsData(const uint16_t index=0) const
Check if data item contains Raw GpsPrint Data.
void resizeData(const uint16_t newSize)
Resize the data area to the given size.
#define CMT_OUTPUTMODE_RAWGPSPRINT
double m_pitch
The pitch (rotation around y-axis / right-left-line)
uint32_t getDataLong(const uint16_t offset=0) const
Return the current value of the data as an uint32_t (32 bits).
bool containsRawTemp(const uint16_t index=0) const
Check if data item contains Raw Temperature data.
#define CMT_OUTPUTSETTINGS_DATAFORMAT_FP1632
void insertData(uint16_t size, uint16_t offset=0)
Insert a number of bytes into the message (this will increase the message size)
unsigned __int16 uint16_t
uint8_t getStatus(const uint16_t index=0) const
Return the Status component of a data item.
bool containsAccG(const uint16_t index=0) const
Check if data item contains XKF-3 Acc-G data.
CmtShortVector getRawGyr(const uint16_t index=0) const
Return the Raw Gyroscope component of a data item.
uint16_t getDataSize(void) const
Return the length of the data part of the message.
bool containsCalGyr(const uint16_t index=0) const
Check if data item contains Calibrated Gyroscope data.
#define CMT_OUTPUTSETTINGS_CALIBMODE_GYR_MASK
bool updateSampleCounter(uint16_t counter, const uint16_t index=0)
Add/update Sample Counter for all items.
bool updateCalAcc(const CmtVector &vec, const uint16_t index=0)
Add/update Calibrated Accelerometer data for the item.
#define CMT_OUTPUTMODE_AUXILIARY
#define CMT_OUTPUTSETTINGS_ORIENTMODE_MASK
CmtQuat getOriQuat(const uint16_t index=0) const
Return the Orientation component of a data item as a Quaternion.
T interpolate(const T &x, const VECTOR &ys, const T &x0, const T &x1)
Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximat...
void setDataFPValue(const uint64_t outputSettings, const double data, const uint16_t offset=0)
Write a floating/fixed point value into to the data buffer, conversion depends on outputSettings.
CmtRawGpsData getRawGpsData(const uint16_t index=0) const
Return the Raw GpsPrint Data component of a data item. TODO: Implement in COM interface!...
CmtAnalogInData getAnalogIn2(const uint16_t index=0) const
Return the AnalogIn 2 component of a data item.
#define CMT_OUTPUTMODE_STATUS
bool updateCalData(const CmtCalData &data, const uint16_t index=0)
Add/update Calibrated Data for the item.
bool updateCalGyr(const CmtVector &vec, const uint16_t index=0)
Add/update Calibrated Gyroscope data for the item.
#define MRPT_UNUSED_PARAM(a)
Determines whether this is an X86 or AMD64 platform.
void setXbus(bool xbus, bool convert=false)
#define CMT_OUTPUTSETTINGS_DATAFORMAT_DOUBLE
CmtRawData getRawData(const uint16_t index=0) const
Return the Raw Data component of a data item.
#define CMT_OUTPUTSETTINGS_DATAFORMAT_FLOAT
bool updatePositionLLA(const CmtVector &data, const uint16_t index=0)
Add/update Position Lat Lon Alt for the item.
bool updateCalMag(const CmtVector &vec, const uint16_t index=0)
Add/update Calibrated Magnetometer data for the item.
double getTemp(const uint16_t index=0) const
Return the Temperature component of a data item.
TimeStamp m_toa
Time of arrival.
uint64_t TimeStamp
A real-time timestamp (ms)
Contains information about data in the packet and the format of that data.
CmtVector getCalGyr(const uint16_t index=0) const
Return the Calibrated Gyroscope component of a data item.
bool m_xm
Indicates that xbus-formatting is used.
bool containsRawAcc(const uint16_t index=0) const
Check if data item contains Raw Accelerometer data.
bool updateRawMag(const CmtShortVector &vec, const uint16_t index=0)
Add/update Raw Magnetometer data for the item.
CmtMatrix getOriMatrix(const uint16_t index=0) const
Return the Orientation component of a data item as an Orientation Matrix.
#define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN2_MASK
CmtDataFormat getDataFormat(const uint16_t index=0) const
TimeStamp m_rtc
Sample time in ms, based on the sample counter.
#define CMT_OUTPUTSETTINGS_POSITIONMODE_LLA_WGS84
bool containsRawMag(const uint16_t index=0) const
Check if data item contains Raw Magnetometer data.
uint16_t getDataShort(const uint16_t offset=0) const
Return the current value of the data as an uint16_t (16 bits).
#define CMT_OUTPUTMODE_CALIB
uint16_t m_rawGpsPressureAge
uint16_t m_itemCount
The number of data items in the message.
bool containsAnalogIn1(const uint16_t index=0) const
Check if data item contains AnalogIn 1.
bool updateRawAcc(const CmtShortVector &vec, const uint16_t index=0)
Add/update Raw Accelerometer data for the item.
#define CMT_OUTPUTSETTINGS_VELOCITYMODE_NED
#define CMT_OUTPUTSETTINGS_TIMESTAMP_MASK
CmtVector getVelocity(const uint16_t index=0) const
Return the Velocity component of a data item.
uint16_t m_rawGpsPressure
#define CMT_OUTPUTSETTINGS_ORIENTMODE_EULER
CmtDataFormat * m_formatList
A list of the formats of the data items.
#define CMT_OUTPUTSETTINGS_AUXILIARYMODE_AIN1_MASK
void setDataLong(const uint32_t data, const uint16_t offset=0)
Write an uint32_t (32 bits) into the data buffer.
#define CMT_DATA_ITEM_NOT_AVAILABLE
Indicates that a data item is not available in the packet.
GLsizei GLsizei GLenum GLenum const GLvoid * data
bool updateAnalogIn1(const CmtAnalogInData &data, const uint16_t index=0)
Add/update AnalogIn 1 for the item.
bool containsPositionLLA(const uint16_t index=0) const
Check if data item contains Position Lat Lon Alt.
bool containsSampleCounter(const uint16_t index=0) const
Check if data item contains Sample Counter.
bool containsOriMatrix(const uint16_t index=0) const
Check if data item contains Matrix Orientation data.
#define CMT_OUTPUTSETTINGS_ORIENTMODE_QUATERNION
bool updateOriMatrix(const CmtMatrix &data, const uint16_t index=0)
Add/update Matrix Orientation data for the item.
CmtEuler getOriEuler(const uint16_t index=0) const
Return the Orientation component of a data item as Euler angles.
double m_roll
The roll (rotation around x-axis / back-front-line)
#define CMT_OUTPUTSETTINGS_DATAFORMAT_MASK
uint8_t * getDataBuffer(const uint16_t offset=0)
Return a pointer to the data buffer.
CmtVector getCalAcc(const uint16_t index=0) const
Return the Calibrated Accelerometer component of a data item.
#define CMT_OUTPUTMODE_ORIENT
bool updateRawGpsData(const CmtRawGpsData &data, const uint16_t index=0)
Add/update Raw GpsPrint Data for the item.
bool updateOriQuat(const CmtQuat &data, const uint16_t index=0)
Add/update Quaternion Orientation data for the item.
CmtVector getCalMag(const uint16_t index=0) const
Return the Calibrated Magnetometer component of a data item.
uint16_t m_rawGpsLatitude
bool updateTemp(const double &temp, const uint16_t index=0)
Add/update Calibrated Accelerometer data for the item.
CmtVector getAccG(const uint16_t index=0) const
Return the XKF-3 Acc-G component of the packet.
#define swapEndian16(src)
bool updateRawGyr(const CmtShortVector &vec, const uint16_t index=0)
Add/update Raw Gyroscope data for the item.
uint16_t getRawTemp(const uint16_t index=0) const
Return the Raw Temperature component of a data item.
CmtShortVector getRawAcc(const uint16_t index=0) const
Return the Raw Accelerometer component of a data item.
#define CMT_OUTPUTSETTINGS_TIMESTAMP_SAMPLECNT
uint32_t CmtOutputMode
An output mode bit-field.
uint16_t m_rawGpsLongitude
#define CMT_OUTPUTSETTINGS_POSITIONMODE_MASK
#define CMT_OUTPUTMODE_VELOCITY
bool updateAnalogIn2(const CmtAnalogInData &data, const uint16_t index=0)
Add/update AnalogIn 2 for the item.
bool containsCalMag(const uint16_t index=0) const
Check if data item contains Calibrated Magnetometer data.
bool updateRawTemp(uint16_t temp, const uint16_t index=0)
Add/update Raw Temperature data for the item.
bool containsCalAcc(const uint16_t index=0) const
Check if data item contains Calibrated Accelerometer data.
CmtTimeStamp getRtc(const uint16_t index=0) const
Return the RTC of the packet.
uint8_t getDataByte(const uint16_t offset=0) const
Return the current value of the data as an unsigned byte (8 bits).
bool containsVelocity(const uint16_t index=0) const
Check if data item contains Velocity.
uint16_t getSampleCounter(const uint16_t index=0) const
Return the Sample Counter component of the packet.
#define CMT_OUTPUTMODE_TEMP
bool containsRawData(const uint16_t index=0) const
Check if data item contains Raw Data.
A structure containing MT data + timestamp and formatting information.
bool updateRawData(const CmtRawData &data, const uint16_t index=0)
Add/update Raw Data for the item.
bool containsStatus(const uint16_t index=0) const
Check if data item contains Velocity.
uint16_t getFPValueSize(const uint16_t index) const
Return the floating/fixed point value size.
#define CMT_OUTPUTSETTINGS_DATAFORMAT_F1220
uint16_t getDataSize(const uint16_t index=0) const
Return the data size.
#define CMT_OUTPUTSETTINGS_VELOCITYMODE_MASK
uint64_t CmtOutputSettings
An output settings bit-field.
double m_yaw
The yaw (rotation around z-axis / down-up-line)
bool containsOriQuat(const uint16_t index=0) const
Check if data item contains Quaternion Orientation data.
bool updateVelocity(const CmtVector &data, const uint16_t index=0)
Add/update Velocity for the item.
#define CMT_OUTPUTMODE_POSITION
Message m_msg
The message.
CmtCalData getCalData(const uint16_t index=0) const
Return the Calibrated Data component of a data item.
bool m_autoUpdateChecksum
bool containsAnalogIn2(const uint16_t index=0) const
Check if data item contains AnalogIn 2.
The namespace of all Xsens software since 2006.
#define CMT_OUTPUTSETTINGS_CALIBMODE_ACCGYRMAG
double getDataFPValue(const uint64_t outputSettings, const uint16_t offset=0) const
Return current data value as double, conversion depends on outputSettings.
void setDataShort(const uint16_t data, const uint16_t offset=0)
Write an uint16_t (16 bits) into the data buffer.
unsigned __int32 uint32_t
uint16_t CmtMtTimeStamp
An MT timestamp (sample count)
#define CMT_OUTPUTSETTINGS_CALIBMODE_ACC_MASK
CmtShortVector getRawMag(const uint16_t index=0) const
Return the Raw Magnetometer component of a data item.
void deleteData(uint16_t size, uint16_t offset=0)
Remove a number of bytes from the message (this will reduce the message size)
bool containsCalData(const uint16_t index=0) const
Check if data item contains Calibrated Data.
void setDataByte(const uint8_t data, const uint16_t offset=0)
Write an unsigned byte (8 bits) into the data buffer.
#define CMT_OUTPUTMODE_RAW
bool containsTemp(const uint16_t index=0) const
Check if data item contains Temperature data.
bool containsOriEuler(const uint16_t index=0) const
Check if data item contains Euler Orientation data.
#define CMT_OUTPUTSETTINGS_CALIBMODE_MAG_MASK
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |