imu_stim300
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
imu_stim300::Stim300RevD Class Reference

#include <Stim300RevD.hpp>

Inheritance diagram for imu_stim300::Stim300RevD:
imu_stim300::Stim300Base

Public Member Functions

 Stim300RevD ()
 
int extractPacket (uint8_t const *buffer, size_t buffer_size) const
 
int processPacket ()
 read the package and puts the data into the corresponding structures. * More...
 
void printInfo ()
 Get sensors information. More...
 
- Public Member Functions inherited from imu_stim300::Stim300Base
 Stim300Base (int max_packet_size)
 
 ~Stim300Base ()
 
void welcome ()
 
bool open (std::string const &filename)
 
bool setBaudrate (int brate)
 
bool fullReset ()
 
bool enterServiceMode ()
 Enter in Service mode (not transferring data, configuration only) More...
 
bool setAcctoIncrementalVelocity ()
 Set Accelerometers output to Incremental velocity Internally enters in SERVICEMODE and It always returns to a NORMAL mode after changing the Accelerometers output. More...
 
void setPackageTimeout (double timeoutSeconds)
 Ste the package Timeout. More...
 
void setFrequency (int sampling_frequency)
 Ste the driver sampling frequency. More...
 
bool getStatus ()
 Return the STIM300 internal status Return the negation value of the internal_error variable. More...
 
int getFileDescriptor ()
 It gets the file descriptor (fd) More...
 
imu_stim300::ACC_OUTPUT getAccOutputType ()
 Get Accelerometer Output Mode. More...
 
int getPacketCounter ()
 Return the Incremental counter Return the value of the value of the counter in inertial_values. More...
 
Eigen::Vector3d getAccData ()
 Return the Accelerometers values. More...
 
Eigen::Vector3d getGyroData ()
 Return the Gyroscopes values. More...
 
Eigen::Vector3d getInclData ()
 Return the Inclinometers values. More...
 
std::vector< double > getTempData ()
 Return the Temperature values from Gyros. More...
 
uint64_t getPacketLatency ()
 Return the datagram latency in microseconds (us) Return the latency calculated by the device. Latency is the time between the moment at which the sample has been digitized + low pass-filtered and the transmitted time. More...
 
bool getChecksumStatus ()
 Return Checksum verification from the last computation. More...
 

Protected Member Functions

double convertAcc2Acceleration (uint8_t const *buffer)
 
bool verifyChecksum (boost::uint32_t &expintCRC, boost::uint32_t &calintCRC)
 
- Protected Member Functions inherited from imu_stim300::Stim300Base
struct imu_stim300::Stim300Base::sensor_value __attribute__ ((__packed__))
 
struct imu_stim300::Stim300Base::temp_value __attribute__ ((__packed__))
 
double convertGyro2AngularRate (uint8_t const *buffer)
 
double convertIncl2Acceleration (uint8_t const *buffer)
 
double convertAcc2IncreVel (uint8_t const *buffer)
 
double convertTemp2Celsius (uint8_t const *buffer)
 
double convertLatency2Microseconds (uint8_t const *buffer)
 

Protected Attributes

uint8_t buffer [MAX_PACKET_SIZE]
 
packet * currentP
 
- Protected Attributes inherited from imu_stim300::Stim300Base
typedef __attribute__
 
int baudrate
 
int sampling_frequency
 
int counter_ratio
 
base::Time pckgTimeout
 
uint8_t prev_counter
 
sensor_values inertial_values
 
STIM300_MODES modes
 
bool internal_error
 
imu_stim300::DATAGRAM_CONTENT content
 
ACC_OUTPUT acc_output
 
boost::uint32_t expectedCRC
 
boost::uint32_t calculatedCRC
 

Static Protected Attributes

static const unsigned int NUMBER_PADDING_BYTES = 1
 
static const unsigned int MAX_PACKET_SIZE = 2 * sizeof(struct packet)
 

Constructor & Destructor Documentation

Stim300RevD::Stim300RevD ( )

Pointer to the current packet (to buffer) Constructor

Revision D has 9 temperature sensors

Member Function Documentation

double Stim300RevD::convertAcc2Acceleration ( uint8_t const *  buffer)
protectedvirtual
int Stim300RevD::extractPacket ( uint8_t const *  buffer,
size_t  buffer_size 
) const
virtual

Find a packet into the currently accumulated data.

Found start of the packet

Verify there is another start of the packet afterwards

Implements imu_stim300::Stim300Base.

void Stim300RevD::printInfo ( )
virtual

Get sensors information.

Implements imu_stim300::Stim300Base.

int Stim300RevD::processPacket ( )
virtual

read the package and puts the data into the corresponding structures. *

Verify the Checksum

If everything is alright convert the values

Convert gyros raw to calibrated values

Convert accelerometers raw to calibrated values

Convert inclinometers raw to calibrated values

Convert gyros temperature raw to calibrated values

Convert accelerometers temperature raw to calibrated values

Convert inclinometers temperature raw to calibrated values

Implements imu_stim300::Stim300Base.

bool Stim300RevD::verifyChecksum ( boost::uint32_t &  expintCRC,
boost::uint32_t &  calintCRC 
)
protected

Here the variable buffer is the global variable

Fill the Dummy bytes with 0x00. There are at the end of the buffer

Calculated CRC

Expected CRC endianness is corrected

Member Data Documentation

uint8_t imu_stim300::Stim300RevD::buffer[MAX_PACKET_SIZE]
protected
packet* imu_stim300::Stim300RevD::currentP
protected

Buffer with the current package

const unsigned int imu_stim300::Stim300RevD::MAX_PACKET_SIZE = 2 * sizeof(struct packet)
staticprotected
const unsigned int imu_stim300::Stim300RevD::NUMBER_PADDING_BYTES = 1
staticprotected

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