xsens_imu
Classes | Public Member Functions | Public Attributes | Protected Attributes | Friends | List of all members
xsens::Packet Class Reference

A structure containing MT data + timestamp and formatting information. More...

#include <cmtpacket.h>

Classes

struct  PacketInfo
 Contains information about data in the packet and the format of that data. More...
 

Public Member Functions

 Packet (uint16_t items, bool xbus)
 
 Packet (const Packet &pack)
 
 ~Packet ()
 
void operator= (const Packet &pack)
 
bool setDataFormat (const CmtDataFormat &format, const uint16_t index=0)
 
bool setDataFormat (const CmtOutputMode outputMode, const CmtOutputSettings outputSettings, const uint16_t index=0)
 
CmtDataFormat getDataFormat (const uint16_t index=0) const
 
void setXbus (bool xbus, bool convert=false)
 
bool getXbus (void) const
 
uint16_t getDataSize (const uint16_t index=0) const
 Return the data size. More...
 
uint16_t getFPValueSize (const uint16_t index) const
 Return the floating/fixed point value size. More...
 
CmtShortVector getRawAcc (const uint16_t index=0) const
 Return the Raw Accelerometer component of a data item. More...
 
bool containsRawAcc (const uint16_t index=0) const
 Check if data item contains Raw Accelerometer data. More...
 
bool updateRawAcc (const CmtShortVector &vec, const uint16_t index=0)
 Add/update Raw Accelerometer data for the item. More...
 
CmtShortVector getRawGyr (const uint16_t index=0) const
 Return the Raw Gyroscope component of a data item. More...
 
bool containsRawGyr (const uint16_t index=0) const
 Check if data item contains Raw Gyroscope data. More...
 
bool updateRawGyr (const CmtShortVector &vec, const uint16_t index=0)
 Add/update Raw Gyroscope data for the item. More...
 
CmtShortVector getRawMag (const uint16_t index=0) const
 Return the Raw Magnetometer component of a data item. More...
 
bool containsRawMag (const uint16_t index=0) const
 Check if data item contains Raw Magnetometer data. More...
 
bool updateRawMag (const CmtShortVector &vec, const uint16_t index=0)
 Add/update Raw Magnetometer data for the item. More...
 
uint16_t getRawTemp (const uint16_t index=0) const
 Return the Raw Temperature component of a data item. More...
 
bool containsRawTemp (const uint16_t index=0) const
 Check if data item contains Raw Temperature data. More...
 
bool updateRawTemp (uint16_t temp, const uint16_t index=0)
 Add/update Raw Temperature data for the item. More...
 
CmtRawData getRawData (const uint16_t index=0) const
 Return the Raw Data component of a data item. More...
 
bool containsRawData (const uint16_t index=0) const
 Check if data item contains Raw Data. More...
 
bool updateRawData (const CmtRawData &data, const uint16_t index=0)
 Add/update Raw Data for the item. More...
 
CmtGpsPvtData getGpsPvtData (const uint16_t index=0) const
 Return the Gps PVT data component of a data item. More...
 
bool containsGpsPvtData (const uint16_t index=0) const
 Check if data item contains Gps PVT Data. More...
 
bool updateGpsPvtData (const CmtGpsPvtData &data, const uint16_t index=0)
 Add/update Gps PVT Data for the item. More...
 
CmtRawPressureData getRawPressureData (const uint16_t index=0) const
 Return the Raw Pressure Data component of a data item. More...
 
bool containsRawPressureData (const uint16_t index=0) const
 Check if data item contains Raw Pressure Data. More...
 
bool updateRawPressureData (const CmtRawPressureData &data, const uint16_t index=0)
 Add/update Raw Pressure Data for the item. More...
 
double getTemp (const uint16_t index=0) const
 Return the Temperature component of a data item. More...
 
bool containsTemp (const uint16_t index=0) const
 Check if data item contains Temperature data. More...
 
bool updateTemp (const double &temp, const uint16_t index=0)
 Add/update Calibrated Accelerometer data for the item. More...
 
CmtVector getCalAcc (const uint16_t index=0) const
 Return the Calibrated Accelerometer component of a data item. More...
 
bool containsCalAcc (const uint16_t index=0) const
 Check if data item contains Calibrated Accelerometer data. More...
 
bool updateCalAcc (const CmtVector &vec, const uint16_t index=0)
 Add/update Calibrated Accelerometer data for the item. More...
 
CmtVector getCalGyr (const uint16_t index=0) const
 Return the Calibrated Gyroscope component of a data item. More...
 
bool containsCalGyr (const uint16_t index=0) const
 Check if data item contains Calibrated Gyroscope data. More...
 
bool updateCalGyr (const CmtVector &vec, const uint16_t index=0)
 Add/update Calibrated Gyroscope data for the item. More...
 
CmtVector getCalMag (const uint16_t index=0) const
 Return the Calibrated Magnetometer component of a data item. More...
 
bool containsCalMag (const uint16_t index=0) const
 Check if data item contains Calibrated Magnetometer data. More...
 
bool updateCalMag (const CmtVector &vec, const uint16_t index=0)
 Add/update Calibrated Magnetometer data for the item. More...
 
CmtCalData getCalData (const uint16_t index=0) const
 Return the Calibrated Data component of a data item. More...
 
bool containsCalData (const uint16_t index=0) const
 Check if data item contains Calibrated Data. More...
 
bool updateCalData (const CmtCalData &data, const uint16_t index=0)
 Add/update Calibrated Data for the item. More...
 
CmtQuat getOriQuat (const uint16_t index=0) const
 Return the Orientation component of a data item as a Quaternion. More...
 
bool containsOriQuat (const uint16_t index=0) const
 Check if data item contains Quaternion Orientation data. More...
 
bool updateOriQuat (const CmtQuat &data, const uint16_t index=0)
 Add/update Quaternion Orientation data for the item. More...
 
CmtEuler getOriEuler (const uint16_t index=0) const
 Return the Orientation component of a data item as Euler angles. More...
 
bool containsOriEuler (const uint16_t index=0) const
 Check if data item contains Euler Orientation data. More...
 
bool updateOriEuler (const CmtEuler &data, const uint16_t index=0)
 Add/update Euler Orientation data for the item. More...
 
CmtMatrix getOriMatrix (const uint16_t index=0) const
 Return the Orientation component of a data item as an Orientation Matrix. More...
 
bool containsOriMatrix (const uint16_t index=0) const
 Check if data item contains Matrix Orientation data. More...
 
bool updateOriMatrix (const CmtMatrix &data, const uint16_t index=0)
 Add/update Matrix Orientation data for the item. More...
 
bool containsOri (const uint16_t index=0) const
 Check if data item contains Orientation Data of any kind. More...
 
CmtAnalogInData getAnalogIn1 (const uint16_t index=0) const
 Return the AnalogIn 1 component of a data item. More...
 
bool containsAnalogIn1 (const uint16_t index=0) const
 Check if data item contains AnalogIn 1. More...
 
bool updateAnalogIn1 (const CmtAnalogInData &data, const uint16_t index=0)
 Add/update AnalogIn 1 for the item. More...
 
CmtAnalogInData getAnalogIn2 (const uint16_t index=0) const
 Return the AnalogIn 2 component of a data item. More...
 
bool containsAnalogIn2 (const uint16_t index=0) const
 Check if data item contains AnalogIn 2. More...
 
bool updateAnalogIn2 (const CmtAnalogInData &data, const uint16_t index=0)
 Add/update AnalogIn 2 for the item. More...
 
CmtVector getPositionLLA (const uint16_t index=0) const
 Return the Position Lat Lon Alt component of a data item. More...
 
bool containsPositionLLA (const uint16_t index=0) const
 Check if data item contains Position Lat Lon Alt. More...
 
bool updatePositionLLA (const CmtVector &data, const uint16_t index=0)
 Add/update Position Lat Lon Alt for the item. More...
 
CmtVector getVelocity (const uint16_t index=0) const
 Return the Velocity component of a data item. More...
 
bool containsVelocity (const uint16_t index=0) const
 Check if data item contains Velocity. More...
 
bool updateVelocity (const CmtVector &data, const uint16_t index=0)
 Add/update Velocity for the item. More...
 
uint8_t getStatus (const uint16_t index=0) const
 Return the Status component of a data item. More...
 
bool containsStatus (const uint16_t index=0) const
 Check if data item contains Status. More...
 
bool updateStatus (const uint8_t data, const uint16_t index=0)
 Add/update Status information for the item. More...
 
uint16_t getSampleCounter (const uint16_t index=0) const
 Return the Sample Counter component of the packet. More...
 
bool containsSampleCounter (const uint16_t index=0) const
 Check if data item contains Sample Counter. More...
 
bool updateSampleCounter (const uint16_t counter, const uint16_t index=0)
 Add/update Sample Counter for all items. More...
 
CmtUtcTime getUtcTime (const uint16_t index=0) const
 Return the UTC Time component of the packet. More...
 
bool containsUtcTime (const uint16_t index=0) const
 Check if data item contains UTC Time. More...
 
bool updateUtcTime (const CmtUtcTime &data, const uint16_t index=0)
 Add/update UTC Time for all items. More...
 
CmtTimeStamp getRtc (const uint16_t index=0) const
 Return the RTC of the packet. More...
 
CmtVector getAccG (const uint16_t index=0) const
 Return the XKF-3 Acc-G component of the packet. More...
 
bool containsAccG (const uint16_t index=0) const
 Check if data item contains XKF-3 Acc-G data. More...
 
bool updateAccG (const CmtVector &g, const uint16_t index=0)
 Add/update XKF-3 Acc-G data for the item. More...
 

Public Attributes

uint16_t m_itemCount
 The number of data items in the message. More...
 
Message m_msg
 The message. More...
 
TimeStamp m_rtc
 Sample time in ms, based on the sample counter. More...
 
TimeStamp m_toa
 Time of arrival. More...
 

Protected Attributes

struct xsens::Packet::PacketInfom_infoList
 
CmtDataFormatm_formatList
 A list of the formats of the data items. More...
 
bool m_xm
 Indicates that xbus-formatting is used. More...
 

Friends

class Cmt4
 

Detailed Description

A structure containing MT data + timestamp and formatting information.

Constructor & Destructor Documentation

xsens::Packet::Packet ( uint16_t  items,
bool  xbus 
)
xsens::Packet::Packet ( const Packet pack)
xsens::Packet::~Packet ( )

Member Function Documentation

bool xsens::Packet::containsAccG ( const uint16_t  index = 0) const

Check if data item contains XKF-3 Acc-G data.

bool xsens::Packet::containsAnalogIn1 ( const uint16_t  index = 0) const

Check if data item contains AnalogIn 1.

bool xsens::Packet::containsAnalogIn2 ( const uint16_t  index = 0) const

Check if data item contains AnalogIn 2.

bool xsens::Packet::containsCalAcc ( const uint16_t  index = 0) const

Check if data item contains Calibrated Accelerometer data.

bool xsens::Packet::containsCalData ( const uint16_t  index = 0) const

Check if data item contains Calibrated Data.

bool xsens::Packet::containsCalGyr ( const uint16_t  index = 0) const

Check if data item contains Calibrated Gyroscope data.

bool xsens::Packet::containsCalMag ( const uint16_t  index = 0) const

Check if data item contains Calibrated Magnetometer data.

bool xsens::Packet::containsGpsPvtData ( const uint16_t  index = 0) const

Check if data item contains Gps PVT Data.

bool xsens::Packet::containsOri ( const uint16_t  index = 0) const

Check if data item contains Orientation Data of any kind.

bool xsens::Packet::containsOriEuler ( const uint16_t  index = 0) const

Check if data item contains Euler Orientation data.

bool xsens::Packet::containsOriMatrix ( const uint16_t  index = 0) const

Check if data item contains Matrix Orientation data.

bool xsens::Packet::containsOriQuat ( const uint16_t  index = 0) const

Check if data item contains Quaternion Orientation data.

bool xsens::Packet::containsPositionLLA ( const uint16_t  index = 0) const

Check if data item contains Position Lat Lon Alt.

bool xsens::Packet::containsRawAcc ( const uint16_t  index = 0) const

Check if data item contains Raw Accelerometer data.

bool xsens::Packet::containsRawData ( const uint16_t  index = 0) const

Check if data item contains Raw Data.

bool xsens::Packet::containsRawGyr ( const uint16_t  index = 0) const

Check if data item contains Raw Gyroscope data.

bool xsens::Packet::containsRawMag ( const uint16_t  index = 0) const

Check if data item contains Raw Magnetometer data.

bool xsens::Packet::containsRawPressureData ( const uint16_t  index = 0) const

Check if data item contains Raw Pressure Data.

bool xsens::Packet::containsRawTemp ( const uint16_t  index = 0) const

Check if data item contains Raw Temperature data.

bool xsens::Packet::containsSampleCounter ( const uint16_t  index = 0) const

Check if data item contains Sample Counter.

bool xsens::Packet::containsStatus ( const uint16_t  index = 0) const

Check if data item contains Status.

bool xsens::Packet::containsTemp ( const uint16_t  index = 0) const

Check if data item contains Temperature data.

bool xsens::Packet::containsUtcTime ( const uint16_t  index = 0) const

Check if data item contains UTC Time.

bool xsens::Packet::containsVelocity ( const uint16_t  index = 0) const

Check if data item contains Velocity.

CmtVector xsens::Packet::getAccG ( const uint16_t  index = 0) const

Return the XKF-3 Acc-G component of the packet.

Parameters
indexThe index of the item of which the data should be returned.
CmtAnalogInData xsens::Packet::getAnalogIn1 ( const uint16_t  index = 0) const

Return the AnalogIn 1 component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtAnalogInData xsens::Packet::getAnalogIn2 ( const uint16_t  index = 0) const

Return the AnalogIn 2 component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtVector xsens::Packet::getCalAcc ( const uint16_t  index = 0) const

Return the Calibrated Accelerometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtCalData xsens::Packet::getCalData ( const uint16_t  index = 0) const

Return the Calibrated Data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtVector xsens::Packet::getCalGyr ( const uint16_t  index = 0) const

Return the Calibrated Gyroscope component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtVector xsens::Packet::getCalMag ( const uint16_t  index = 0) const

Return the Calibrated Magnetometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtDataFormat xsens::Packet::getDataFormat ( const uint16_t  index = 0) const
uint16_t xsens::Packet::getDataSize ( const uint16_t  index = 0) const

Return the data size.

Parameters
indexThe index of the item of which the size should be returned.
uint16_t xsens::Packet::getFPValueSize ( const uint16_t  index) const

Return the floating/fixed point value size.

Parameters
indexThe index of the item whose fp size should be returned.
CmtGpsPvtData xsens::Packet::getGpsPvtData ( const uint16_t  index = 0) const

Return the Gps PVT data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtEuler xsens::Packet::getOriEuler ( const uint16_t  index = 0) const

Return the Orientation component of a data item as Euler angles.

Parameters
indexThe index of the item of which the data should be returned.
CmtMatrix xsens::Packet::getOriMatrix ( const uint16_t  index = 0) const

Return the Orientation component of a data item as an Orientation Matrix.

Parameters
indexThe index of the item of which the data should be returned.
CmtQuat xsens::Packet::getOriQuat ( const uint16_t  index = 0) const

Return the Orientation component of a data item as a Quaternion.

Parameters
indexThe index of the item of which the data should be returned.
CmtVector xsens::Packet::getPositionLLA ( const uint16_t  index = 0) const

Return the Position Lat Lon Alt component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtShortVector xsens::Packet::getRawAcc ( const uint16_t  index = 0) const

Return the Raw Accelerometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtRawData xsens::Packet::getRawData ( const uint16_t  index = 0) const

Return the Raw Data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtShortVector xsens::Packet::getRawGyr ( const uint16_t  index = 0) const

Return the Raw Gyroscope component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtShortVector xsens::Packet::getRawMag ( const uint16_t  index = 0) const

Return the Raw Magnetometer component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtRawPressureData xsens::Packet::getRawPressureData ( const uint16_t  index = 0) const

Return the Raw Pressure Data component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
uint16_t xsens::Packet::getRawTemp ( const uint16_t  index = 0) const

Return the Raw Temperature component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
TimeStamp xsens::Packet::getRtc ( const uint16_t  index = 0) const

Return the RTC of the packet.

Parameters
indexThe index of the item of which the data should be returned. (ignored)
uint16_t xsens::Packet::getSampleCounter ( const uint16_t  index = 0) const

Return the Sample Counter component of the packet.

Parameters
indexThe index of the item of which the data should be returned. (ignored)
uint8_t xsens::Packet::getStatus ( const uint16_t  index = 0) const

Return the Status component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
double xsens::Packet::getTemp ( const uint16_t  index = 0) const

Return the Temperature component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
CmtUtcTime xsens::Packet::getUtcTime ( const uint16_t  index = 0) const

Return the UTC Time component of the packet.

Parameters
indexThe index of the item of which the data should be returned. (ignored)
CmtVector xsens::Packet::getVelocity ( const uint16_t  index = 0) const

Return the Velocity component of a data item.

Parameters
indexThe index of the item of which the data should be returned.
bool xsens::Packet::getXbus ( void  ) const
void xsens::Packet::operator= ( const Packet pack)
bool xsens::Packet::setDataFormat ( const CmtDataFormat format,
const uint16_t  index = 0 
)
bool xsens::Packet::setDataFormat ( const CmtOutputMode  outputMode,
const CmtOutputSettings  outputSettings,
const uint16_t  index = 0 
)
void xsens::Packet::setXbus ( bool  xbus,
bool  convert = false 
)
bool xsens::Packet::updateAccG ( const CmtVector g,
const uint16_t  index = 0 
)

Add/update XKF-3 Acc-G data for the item.

bool xsens::Packet::updateAnalogIn1 ( const CmtAnalogInData data,
const uint16_t  index = 0 
)

Add/update AnalogIn 1 for the item.

bool xsens::Packet::updateAnalogIn2 ( const CmtAnalogInData data,
const uint16_t  index = 0 
)

Add/update AnalogIn 2 for the item.

bool xsens::Packet::updateCalAcc ( const CmtVector vec,
const uint16_t  index = 0 
)

Add/update Calibrated Accelerometer data for the item.

bool xsens::Packet::updateCalData ( const CmtCalData data,
const uint16_t  index = 0 
)

Add/update Calibrated Data for the item.

bool xsens::Packet::updateCalGyr ( const CmtVector vec,
const uint16_t  index = 0 
)

Add/update Calibrated Gyroscope data for the item.

bool xsens::Packet::updateCalMag ( const CmtVector vec,
const uint16_t  index = 0 
)

Add/update Calibrated Magnetometer data for the item.

bool xsens::Packet::updateGpsPvtData ( const CmtGpsPvtData data,
const uint16_t  index = 0 
)

Add/update Gps PVT Data for the item.

bool xsens::Packet::updateOriEuler ( const CmtEuler data,
const uint16_t  index = 0 
)

Add/update Euler Orientation data for the item.

bool xsens::Packet::updateOriMatrix ( const CmtMatrix data,
const uint16_t  index = 0 
)

Add/update Matrix Orientation data for the item.

bool xsens::Packet::updateOriQuat ( const CmtQuat data,
const uint16_t  index = 0 
)

Add/update Quaternion Orientation data for the item.

bool xsens::Packet::updatePositionLLA ( const CmtVector data,
const uint16_t  index = 0 
)

Add/update Position Lat Lon Alt for the item.

bool xsens::Packet::updateRawAcc ( const CmtShortVector vec,
const uint16_t  index = 0 
)

Add/update Raw Accelerometer data for the item.

bool xsens::Packet::updateRawData ( const CmtRawData data,
const uint16_t  index = 0 
)

Add/update Raw Data for the item.

bool xsens::Packet::updateRawGyr ( const CmtShortVector vec,
const uint16_t  index = 0 
)

Add/update Raw Gyroscope data for the item.

bool xsens::Packet::updateRawMag ( const CmtShortVector vec,
const uint16_t  index = 0 
)

Add/update Raw Magnetometer data for the item.

bool xsens::Packet::updateRawPressureData ( const CmtRawPressureData data,
const uint16_t  index = 0 
)

Add/update Raw Pressure Data for the item.

bool xsens::Packet::updateRawTemp ( uint16_t  temp,
const uint16_t  index = 0 
)

Add/update Raw Temperature data for the item.

bool xsens::Packet::updateSampleCounter ( const uint16_t  counter,
const uint16_t  index = 0 
)

Add/update Sample Counter for all items.

bool xsens::Packet::updateStatus ( const uint8_t  data,
const uint16_t  index = 0 
)

Add/update Status information for the item.

bool xsens::Packet::updateTemp ( const double &  temp,
const uint16_t  index = 0 
)

Add/update Calibrated Accelerometer data for the item.

bool xsens::Packet::updateUtcTime ( const CmtUtcTime data,
const uint16_t  index = 0 
)

Add/update UTC Time for all items.

bool xsens::Packet::updateVelocity ( const CmtVector data,
const uint16_t  index = 0 
)

Add/update Velocity for the item.

Friends And Related Function Documentation

friend class Cmt4
friend

Member Data Documentation

CmtDataFormat* xsens::Packet::m_formatList
protected

A list of the formats of the data items.

struct xsens::Packet::PacketInfo* xsens::Packet::m_infoList
protected
uint16_t xsens::Packet::m_itemCount

The number of data items in the message.

Message xsens::Packet::m_msg

The message.

TimeStamp xsens::Packet::m_rtc

Sample time in ms, based on the sample counter.

TimeStamp xsens::Packet::m_toa

Time of arrival.

bool xsens::Packet::m_xm
protected

Indicates that xbus-formatting is used.


The documentation for this class was generated from the following files: