rpos::core::Imu Class

This this a struct that hold data from imu

Header File

rpos/core/pose.h

Constructors

/**
* Create a new object with an unit quaternion and timestamp, acc, gyro all set to 0.
*/
Imu();
/**
* Create a new object with the specified value.
*/
Imu(uint32_t timestamp, uint32_t avaliblityBitMap, Quaternion quaternion, rpos::core::Vector3f acc, rpos::core::Vector3f gyro, rpos::core::Vector3f compass, rpos::core::Vector3f rawAcc, rpos::core::Vector3f rawGyro, rpos::core::Vector3f rawCompass);
/**
* Copy constructor.
*/
Imu(const Imu&);

Operators

/**
* Assignement operator.
*/
Imu& operator=(const Imu&)

Methods

/**
* Getter and setter for the timepstamp field.
*/
uint32_t timestamp() const; 
uint32_t& timestamp();

Example

Quaternion quaternion;
std::cout<<quaternion.timestamp()<<std::endl;  // output 0
location.x() = 10;
std::cout<<quaternion.timestamp()<<std::endl;  // output 10
/**
* Getter and setter for the quaternion field.
*/
 Quaternion quaternion() const; 
 Quaternion& quaternion();
/**
* Getter and setter for acc field.
*/
rpos::core::Vector3f acc() const; 
rpos::core::Vector3f& acc();    
/**
* Getter and setter for gyro field.
*/
rpos::core::Vector3f gyro() const; 
rpos::core::Vector3f& gyro();
/**
* Getter and setter for compass field.
*/
rpos::core::Vector3f compass() const; 
rpos::core::Vector3f& compass();
/**
* Getter and setter for raw acc field.
*/
rpos::core::Vector3f rawAcc() const; 
rpos::core::Vector3f& rawAcc();
/**
* Getter and setter for raw gyro field.
*/
rpos::core::Vector3f rawGyro() const; 
rpos::core::Vector3f& rawGyro();
/**
* Getter and setter for raw compass field.
*/
rpos::core::Vector3f rawCompass() const; 
rpos::core::Vector3f& rawCompass();
/**
* Getter and setter for available compents of imu data.
*/
uint32_t availabilityBitmap() const;
uint32_t& availabilityBitmap();

please refer to ImuBitMap.