sbgECom Library  4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
sbgEComLogMag.h File Reference

Parse magnetic field measurements logs. More...

Go to the source code of this file.

Data Structures

struct  _SbgEComLogMag
 
struct  _SbgEComLogMagCalib
 

Macros

#define SBG_ECOM_MAG_MAG_X_BIT   (0x00000001u << 0)
 
#define SBG_ECOM_MAG_MAG_Y_BIT   (0x00000001u << 1)
 
#define SBG_ECOM_MAG_MAG_Z_BIT   (0x00000001u << 2)
 
#define SBG_ECOM_MAG_ACCEL_X_BIT   (0x00000001u << 3)
 
#define SBG_ECOM_MAG_ACCEL_Y_BIT   (0x00000001u << 4)
 
#define SBG_ECOM_MAG_ACCEL_Z_BIT   (0x00000001u << 5)
 
#define SBG_ECOM_MAG_MAGS_IN_RANGE   (0x00000001u << 6)
 
#define SBG_ECOM_MAG_ACCELS_IN_RANGE   (0x00000001u << 7)
 
#define SBG_ECOM_MAG_CALIBRATION_OK   (0x00000001u << 8)
 

Typedefs

typedef struct _SbgEComLogMag SbgEComLogMag
 
typedef struct _SbgEComLogMagCalib SbgEComLogMagCalib
 

Functions

SbgErrorCode sbgEComLogMagReadFromStream (SbgEComLogMag *pLogData, SbgStreamBuffer *pStreamBuffer)
 
SbgErrorCode sbgEComLogMagWriteToStream (const SbgEComLogMag *pLogData, SbgStreamBuffer *pStreamBuffer)
 
SbgErrorCode sbgEComLogMagCalibReadFromStream (SbgEComLogMagCalib *pLogData, SbgStreamBuffer *pStreamBuffer)
 
SbgErrorCode sbgEComLogMagCalibWriteToStream (const SbgEComLogMagCalib *pLogData, SbgStreamBuffer *pStreamBuffer)
 

Detailed Description

Parse magnetic field measurements logs.

Author
SBG Systems
Date
12 March 2013
License

The MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Macro Definition Documentation

◆ SBG_ECOM_MAG_MAG_X_BIT

#define SBG_ECOM_MAG_MAG_X_BIT   (0x00000001u << 0)

Log magnetometer data status mask definitions Set to 1 if the magnetometer X passes Built In Test.

◆ SBG_ECOM_MAG_MAG_Y_BIT

#define SBG_ECOM_MAG_MAG_Y_BIT   (0x00000001u << 1)

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

◆ SBG_ECOM_MAG_MAG_Z_BIT

#define SBG_ECOM_MAG_MAG_Z_BIT   (0x00000001u << 2)

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

◆ SBG_ECOM_MAG_ACCEL_X_BIT

#define SBG_ECOM_MAG_ACCEL_X_BIT   (0x00000001u << 3)

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

◆ SBG_ECOM_MAG_ACCEL_Y_BIT

#define SBG_ECOM_MAG_ACCEL_Y_BIT   (0x00000001u << 4)

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

◆ SBG_ECOM_MAG_ACCEL_Z_BIT

#define SBG_ECOM_MAG_ACCEL_Z_BIT   (0x00000001u << 5)

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

◆ SBG_ECOM_MAG_MAGS_IN_RANGE

#define SBG_ECOM_MAG_MAGS_IN_RANGE   (0x00000001u << 6)

Set to 1 if all magnetometers are within operating range.

◆ SBG_ECOM_MAG_ACCELS_IN_RANGE

#define SBG_ECOM_MAG_ACCELS_IN_RANGE   (0x00000001u << 7)

Set to 1 if all accelerometers are within operating range.

◆ SBG_ECOM_MAG_CALIBRATION_OK

#define SBG_ECOM_MAG_CALIBRATION_OK   (0x00000001u << 8)

Set to 1 if the magnetometers seems to be calibrated.

Typedef Documentation

◆ SbgEComLogMag

typedef struct _SbgEComLogMag SbgEComLogMag

Structure that stores data for the SBG_ECOM_LOG_MAG message.

◆ SbgEComLogMagCalib

Structure that stores data for the SBG_ECOM_LOG_MAG_CALIB message.

Function Documentation

◆ sbgEComLogMagReadFromStream()

SbgErrorCode sbgEComLogMagReadFromStream ( SbgEComLogMag pLogData,
SbgStreamBuffer pStreamBuffer 
)

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

Parameters
[out]pLogDataLog structure instance to fill.
[in]pStreamBufferInput stream buffer to read the log from.
Returns
SBG_NO_ERROR if a valid log has been read from the stream buffer.

◆ sbgEComLogMagWriteToStream()

SbgErrorCode sbgEComLogMagWriteToStream ( const SbgEComLogMag pLogData,
SbgStreamBuffer pStreamBuffer 
)

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

Parameters
[in]pLogDataLog structure instance to write.
[out]pStreamBufferOutput stream buffer to write the log to.
Returns
SBG_NO_ERROR if the log has been written to the stream buffer.

◆ sbgEComLogMagCalibReadFromStream()

SbgErrorCode sbgEComLogMagCalibReadFromStream ( SbgEComLogMagCalib pLogData,
SbgStreamBuffer pStreamBuffer 
)

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

Parameters
[out]pLogDataLog structure instance to fill.
[in]pStreamBufferInput stream buffer to read the log from.
Returns
SBG_NO_ERROR if a valid log has been read from the stream buffer.

◆ sbgEComLogMagCalibWriteToStream()

SbgErrorCode sbgEComLogMagCalibWriteToStream ( const SbgEComLogMagCalib pLogData,
SbgStreamBuffer pStreamBuffer 
)

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

Parameters
[in]pLogDataLog structure instance to write.
[out]pStreamBufferOutput stream buffer to write the log to.
Returns
SBG_NO_ERROR if the log has been written to the stream buffer.