sbgECom  1.11.920-stable
Data Structures | Macros | Typedefs | Functions
sbgEComBinaryLogImu.h File Reference

This file is used to parse received IMU binary logs. More...

#include <sbgCommon.h>
#include <streamBuffer/sbgStreamBuffer.h>

Go to the source code of this file.

Data Structures

struct  _SbgLogImuData
 
struct  _SbgLogImuShort
 
struct  _SbgLogFastImuData
 

Macros

#define SBG_ECOM_IMU_COM_OK   (0x00000001u << 0)
 
#define SBG_ECOM_IMU_STATUS_BIT   (0x00000001u << 1)
 
#define SBG_ECOM_IMU_ACCEL_X_BIT   (0x00000001u << 2)
 
#define SBG_ECOM_IMU_ACCEL_Y_BIT   (0x00000001u << 3)
 
#define SBG_ECOM_IMU_ACCEL_Z_BIT   (0x00000001u << 4)
 
#define SBG_ECOM_IMU_GYRO_X_BIT   (0x00000001u << 5)
 
#define SBG_ECOM_IMU_GYRO_Y_BIT   (0x00000001u << 6)
 
#define SBG_ECOM_IMU_GYRO_Z_BIT   (0x00000001u << 7)
 
#define SBG_ECOM_IMU_ACCELS_IN_RANGE   (0x00000001u << 8)
 
#define SBG_ECOM_IMU_GYROS_IN_RANGE   (0x00000001u << 9)
 

Typedefs

typedef struct _SbgLogImuData SbgLogImuData
 
typedef struct _SbgLogImuShort SbgLogImuShort
 
typedef struct _SbgLogFastImuData SbgLogFastImuData
 

Functions

float sbgLogImuShortGetDeltaAngle (const SbgLogImuShort *pImuShort, size_t idx)
 
float sbgLogImuShortGetDeltaVelocity (const SbgLogImuShort *pImuShort, size_t idx)
 
float sbgLogImuShortGetTemperature (const SbgLogImuShort *pImuShort)
 
SbgErrorCode sbgEComBinaryLogParseImuData (SbgStreamBuffer *pInputStream, SbgLogImuData *pOutputData)
 
SbgErrorCode sbgEComBinaryLogWriteImuData (SbgStreamBuffer *pOutputStream, const SbgLogImuData *pInputData)
 
SbgErrorCode sbgEComBinaryLogParseImuShort (SbgStreamBuffer *pInputStream, SbgLogImuShort *pOutputData)
 
SbgErrorCode sbgEComBinaryLogWriteImuShort (SbgStreamBuffer *pOutputStream, const SbgLogImuShort *pInputData)
 
SbgErrorCode sbgEComBinaryLogParseFastImuData (SbgStreamBuffer *pInputStream, SbgLogFastImuData *pOutputData)
 
SbgErrorCode sbgEComBinaryLogWriteFastImuData (SbgStreamBuffer *pOutputStream, const SbgLogFastImuData *pInputData)
 

Detailed Description

This file is used to parse received IMU binary logs.

Author
SBG Systems (Raphael Siryani)
Date
25 February 2013

Copyright Notice

Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.

This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

Macro Definition Documentation

§ SBG_ECOM_IMU_COM_OK

#define SBG_ECOM_IMU_COM_OK   (0x00000001u << 0)

Log inertial data status mask definitionsSet to 1 if the communication with the IMU is ok.

§ SBG_ECOM_IMU_STATUS_BIT

#define SBG_ECOM_IMU_STATUS_BIT   (0x00000001u << 1)

Set to 1 if the IMU passes general Built in Tests (calibration, CPU, ...).

§ SBG_ECOM_IMU_ACCEL_X_BIT

#define SBG_ECOM_IMU_ACCEL_X_BIT   (0x00000001u << 2)

Set to 1 if the accelerometer X passes Built In Test.

§ SBG_ECOM_IMU_ACCEL_Y_BIT

#define SBG_ECOM_IMU_ACCEL_Y_BIT   (0x00000001u << 3)

Set to 1 if the accelerometer Y passes Built In Test.

§ SBG_ECOM_IMU_ACCEL_Z_BIT

#define SBG_ECOM_IMU_ACCEL_Z_BIT   (0x00000001u << 4)

Set to 1 if the accelerometer Z passes Built In Test.

§ SBG_ECOM_IMU_GYRO_X_BIT

#define SBG_ECOM_IMU_GYRO_X_BIT   (0x00000001u << 5)

Set to 1 if the gyroscope X passes Built In Test.

§ SBG_ECOM_IMU_GYRO_Y_BIT

#define SBG_ECOM_IMU_GYRO_Y_BIT   (0x00000001u << 6)

Set to 1 if the gyroscope Y passes Built In Test.

§ SBG_ECOM_IMU_GYRO_Z_BIT

#define SBG_ECOM_IMU_GYRO_Z_BIT   (0x00000001u << 7)

Set to 1 if the gyroscope Z passes Built In Test.

§ SBG_ECOM_IMU_ACCELS_IN_RANGE

#define SBG_ECOM_IMU_ACCELS_IN_RANGE   (0x00000001u << 8)

Set to 1 if all accelerometers are within operating range.

§ SBG_ECOM_IMU_GYROS_IN_RANGE

#define SBG_ECOM_IMU_GYROS_IN_RANGE   (0x00000001u << 9)

Set to 1 if all gyroscopes are within operating range.

Typedef Documentation

§ SbgLogImuData

typedef struct _SbgLogImuData SbgLogImuData

Structure that stores data for the SBG_ECOM_LOG_IMU_DATA message.

§ SbgLogImuShort

Structure that stores data for the SBG_ECOM_LOG_IMU_SHORT message. This message is only sent asynchronously and is the preferred log for post processing.

§ SbgLogFastImuData

Structure that stores the data for SBG_ECOM_LOG_FAST_IMU_DATA message

Function Documentation

§ sbgLogImuShortGetDeltaAngle()

float sbgLogImuShortGetDeltaAngle ( const SbgLogImuShort pImuShort,
size_t  idx 
)

Return from an IMU Short log, the X, Y or Z delta angle value in rad.s^-1

Parameters
[in]pImuShortInput IMU short message instance.
[in]idxThe component to return from 0 to 2.
Returns
The delta angle value converted in rad.s^-1.

§ sbgLogImuShortGetDeltaVelocity()

float sbgLogImuShortGetDeltaVelocity ( const SbgLogImuShort pImuShort,
size_t  idx 
)

Return from an IMU Short log, the X, Y or Z delta velocity value in m.s^-2

Parameters
[in]pImuShortInput IMU short message instance.
[in]idxThe component to return from 0 to 2.
Returns
The delta velocity value converted in m.s^-2.

§ sbgLogImuShortGetTemperature()

float sbgLogImuShortGetTemperature ( const SbgLogImuShort pImuShort)

Return from an IMU Short log, the temperature in °C

Parameters
[in]pImuShortInput IMU short message instance.
Returns
The converted temperature in °C

§ sbgEComBinaryLogParseImuData()

SbgErrorCode sbgEComBinaryLogParseImuData ( SbgStreamBuffer *  pInputStream,
SbgLogImuData pOutputData 
)

Parse data for the SBG_ECOM_LOG_IMU_DATA message and fill the corresponding structure.

Parameters
[in]pInputStreamInput stream buffer to read the payload from.
[out]pOutputDataPointer on the output structure that stores parsed data.
Returns
SBG_NO_ERROR if the payload has been parsed.

§ sbgEComBinaryLogWriteImuData()

SbgErrorCode sbgEComBinaryLogWriteImuData ( SbgStreamBuffer *  pOutputStream,
const SbgLogImuData pInputData 
)

Write data for the SBG_ECOM_LOG_IMU_DATA message to the output stream buffer from the provided structure.

Parameters
[out]pOutputStreamOutput stream buffer to write the payload to.
[in]pInputDataPointer on the input structure that stores data to write.
Returns
SBG_NO_ERROR if the message has been generated in the provided buffer.

§ sbgEComBinaryLogParseImuShort()

SbgErrorCode sbgEComBinaryLogParseImuShort ( SbgStreamBuffer *  pInputStream,
SbgLogImuShort pOutputData 
)

Parse data for the SBG_ECOM_LOG_IMU_SHORT message and fill the corresponding structure.

Parameters
[in]pInputStreamInput stream buffer to read the payload from.
[out]pOutputDataPointer on the output structure that stores parsed data.
Returns
SBG_NO_ERROR if the payload has been parsed.

§ sbgEComBinaryLogWriteImuShort()

SbgErrorCode sbgEComBinaryLogWriteImuShort ( SbgStreamBuffer *  pOutputStream,
const SbgLogImuShort pInputData 
)

Write data for the SBG_ECOM_LOG_IMU_SHORT message to the output stream buffer from the provided structure.

Parameters
[out]pOutputStreamOutput stream buffer to write the payload to.
[in]pInputDataPointer on the input structure that stores data to write.
Returns
SBG_NO_ERROR if the message has been generated in the provided buffer.

§ sbgEComBinaryLogParseFastImuData()

SbgErrorCode sbgEComBinaryLogParseFastImuData ( SbgStreamBuffer *  pInputStream,
SbgLogFastImuData pOutputData 
)

Parse data for the SBG_ECOM_LOG_FAST_IMU_DATA message and fill the corresponding structure.

Parameters
[in]pInputStreamInput stream buffer to read the payload from.
[out]pOutputDataPointer on the output structure that stores parsed data.
Returns
SBG_NO_ERROR if the payload has been parsed.

§ sbgEComBinaryLogWriteFastImuData()

SbgErrorCode sbgEComBinaryLogWriteFastImuData ( SbgStreamBuffer *  pOutputStream,
const SbgLogFastImuData pInputData 
)

Write data for the SBG_ECOM_LOG_FAST_IMU_DATA message to the output stream buffer from the provided structure.

Parameters
[out]pOutputStreamOutput stream buffer to write the payload to.
[in]pInputDataPointer on the input structure that stores data to write.
Returns
SBG_NO_ERROR if the message has been generated in the provided buffer.