Classes | Macros | Typedefs | Enumerations | Functions
sbgEComCmdMag.h File Reference

This file implements SbgECom commands related to Magnetometer module. More...

#include "sbgEComCmdCommon.h"
Include dependency graph for sbgEComCmdMag.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _SbgEComMagCalibResults
 
struct  _SbgEComMagRejectionConf
 

Macros

#define SBG_ECOM_MAG_CALIB_ALIGNMENT_ISSUE   (0x0020u)
 
#define SBG_ECOM_MAG_CALIB_NOT_ENOUGH_POINTS   (0x0001u)
 
#define SBG_ECOM_MAG_CALIB_TOO_MUCH_DISTORTIONS   (0x0002u)
 
#define SBG_ECOM_MAG_CALIB_X_MOTION_ISSUE   (0x0004u)
 
#define SBG_ECOM_MAG_CALIB_Y_MOTION_ISSUE   (0x0008u)
 
#define SBG_ECOM_MAG_CALIB_Z_MOTION_ISSUE   (0x0010u)
 

Typedefs

typedef enum _SbgEComMagCalibBandwidth SbgEComMagCalibBandwidth
 
typedef enum _SbgEComMagCalibConfidence SbgEComMagCalibConfidence
 
typedef enum _SbgEComMagCalibMode SbgEComMagCalibMode
 
typedef enum _SbgEComMagCalibQuality SbgEComMagCalibQuality
 
typedef struct _SbgEComMagCalibResults SbgEComMagCalibResults
 
typedef enum _SbgEComMagModelsStdIds SbgEComMagModelsStdId
 
typedef struct _SbgEComMagRejectionConf SbgEComMagRejectionConf
 

Enumerations

enum  _SbgEComMagCalibBandwidth { SBG_ECOM_MAG_CALIB_LOW_BW = 0, SBG_ECOM_MAG_CALIB_MEDIUM_BW = 1, SBG_ECOM_MAG_CALIB_HIGH_BW = 2 }
 
enum  _SbgEComMagCalibConfidence { SBG_ECOM_MAG_CALIB_TRUST_HIGH = 0, SBG_ECOM_MAG_CALIB_TRUST_MEDIUM = 1, SBG_ECOM_MAG_CALIB_TRUST_LOW = 2 }
 
enum  _SbgEComMagCalibMode { SBG_ECOM_MAG_CALIB_MODE_2D = 1, SBG_ECOM_MAG_CALIB_MODE_3D = 2 }
 
enum  _SbgEComMagCalibQuality { SBG_ECOM_MAG_CALIB_QUAL_OPTIMAL = 0, SBG_ECOM_MAG_CALIB_QUAL_GOOD = 1, SBG_ECOM_MAG_CALIB_QUAL_POOR = 2, SBG_ECOM_MAG_CALIB_QUAL_INVALID = 3 }
 
enum  _SbgEComMagModelsStdIds { SBG_ECOM_MAG_MODEL_NORMAL = 201, SBG_ECOM_MAG_MODEL_NOISY_MAG_TOLERANT = 202 }
 

Functions

 SBG_DEPRECATED (SbgErrorCode sbgEComCmdMagSetModel(SbgEComHandle *pHandle, const void *pBuffer, uint32 size))
 
SbgErrorCode sbgEComCmdMagComputeCalib (SbgEComHandle *pHandle, SbgEComMagCalibResults *pCalibResults)
 
SbgErrorCode sbgEComCmdMagGetModelInfo (SbgEComHandle *pHandle, SbgEComModelInfo *pModelInfo)
 
SbgErrorCode sbgEComCmdMagGetRejection (SbgEComHandle *pHandle, SbgEComMagRejectionConf *pRejectConf)
 
SbgErrorCode sbgEComCmdMagSetCalibData (SbgEComHandle *pHandle, const float offset[3], const float matrix[9])
 
SbgErrorCode sbgEComCmdMagSetModelId (SbgEComHandle *pHandle, uint32 id)
 
SbgErrorCode sbgEComCmdMagSetRejection (SbgEComHandle *pHandle, const SbgEComMagRejectionConf *pRejectConf)
 
SbgErrorCode sbgEComCmdMagStartCalib (SbgEComHandle *pHandle, SbgEComMagCalibMode mode, SbgEComMagCalibBandwidth bandwidth)
 

Detailed Description

This file implements SbgECom commands related to Magnetometer module.

Author
SBG Systems (Maxime Renaudet)
Date
11 June 2014

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.

Definition in file sbgEComCmdMag.h.

Macro Definition Documentation

#define SBG_ECOM_MAG_CALIB_ALIGNMENT_ISSUE   (0x0020u)

For a 3D calibration: the alignment between the magnetometers and the inertial frame seems to be invalid.

Definition at line 83 of file sbgEComCmdMag.h.

#define SBG_ECOM_MAG_CALIB_NOT_ENOUGH_POINTS   (0x0001u)

Status bit masks used to report advanced inforamtion on the onboard magnetic calibration.Not enough valid magnetic points have been acquired.

Definition at line 78 of file sbgEComCmdMag.h.

#define SBG_ECOM_MAG_CALIB_TOO_MUCH_DISTORTIONS   (0x0002u)

Unable to compute a magnetic calibration due to magnetic interferences or incorrect data set distribution.

Definition at line 79 of file sbgEComCmdMag.h.

#define SBG_ECOM_MAG_CALIB_X_MOTION_ISSUE   (0x0004u)

For a 3D calibration: not enough motion on X axis. For a 2D calibration; too much motion on X axis.

Definition at line 80 of file sbgEComCmdMag.h.

#define SBG_ECOM_MAG_CALIB_Y_MOTION_ISSUE   (0x0008u)

For a 3D calibration: not enough motion on Y axis. For a 2D calibration; too much motion on Y axis.

Definition at line 81 of file sbgEComCmdMag.h.

#define SBG_ECOM_MAG_CALIB_Z_MOTION_ISSUE   (0x0010u)

For a 3D or 2D calibration: not enough motion on Z axis.

Definition at line 82 of file sbgEComCmdMag.h.

Typedef Documentation

Used to select the expected dynamics during the magnetic calibration.

Confidence indicator on results of an onbard magnetic calibration.

Define if the onboard magnetic calibration should acquiere points for a 3D or 2D calibration.

General quality indicator of an onboard magnetic calibration.

Helper structure to retrieve onboard magnetic calibration results.

This enum defines the different magnetometer model IDs available in standard

Holds all necessary information for Magnetometer module data rejection.

Enumeration Type Documentation

Used to select the expected dynamics during the magnetic calibration.

Enumerator
SBG_ECOM_MAG_CALIB_LOW_BW 

Tell the device that low dynamics will be observed during the magnetic calibration process.

SBG_ECOM_MAG_CALIB_MEDIUM_BW 

Tell the device that normal dynamics will be observed during the magnetic calibration process.

SBG_ECOM_MAG_CALIB_HIGH_BW 

Tell the device that high dynamics will be observed during the magnetic calibration process.

Definition at line 45 of file sbgEComCmdMag.h.

Confidence indicator on results of an onbard magnetic calibration.

Enumerator
SBG_ECOM_MAG_CALIB_TRUST_HIGH 

Reported quality indicator can be trusted as enough remarkable magnetic field points have been acquired.

SBG_ECOM_MAG_CALIB_TRUST_MEDIUM 

Few remarkable magnetic field points have been used to compute the magnetic calibration leading to a medium confidence in reported quality indicators.

SBG_ECOM_MAG_CALIB_TRUST_LOW 

Even if the quality indicator could report an excellent calibration, The data set used to compute the magnetic calibration was not meaningful enough to compute meaningful quality indicators. This calibration should be used carefully.

Definition at line 66 of file sbgEComCmdMag.h.

Define if the onboard magnetic calibration should acquiere points for a 3D or 2D calibration.

Enumerator
SBG_ECOM_MAG_CALIB_MODE_2D 

Tell the device that the magnetic calibration will be performed with limited motions. This calibration mode is only designed to be used when roll and pitch motions are less than ± 5°. To work correctly, the device should be rotated through at least a full circle.

SBG_ECOM_MAG_CALIB_MODE_3D 

Tell the device to start a full 3D magnetic calibration procedure. The 3D magnetic calibration offers the best accuracy but needs at least motion of ± 30° on the roll and pitch angles.

Definition at line 32 of file sbgEComCmdMag.h.

General quality indicator of an onboard magnetic calibration.

Enumerator
SBG_ECOM_MAG_CALIB_QUAL_OPTIMAL 

All acquired points fit very well on a unit sphere after the calibration.

SBG_ECOM_MAG_CALIB_QUAL_GOOD 

Small deviations of the magnetic field norm have been detected. The magnetic calibration should although provide accurate heading.

SBG_ECOM_MAG_CALIB_QUAL_POOR 

Large deviations of the magnetic field norm have been detected. It may come from external magnetic distortions during the calibration.

SBG_ECOM_MAG_CALIB_QUAL_INVALID 

No valid magnetic calibration has been computed. It could comes from too much magnetic disturbances, insufficient or invalid motions.

Definition at line 55 of file sbgEComCmdMag.h.

This enum defines the different magnetometer model IDs available in standard

Enumerator
SBG_ECOM_MAG_MODEL_NORMAL 

Should be used in most applications

SBG_ECOM_MAG_MODEL_NOISY_MAG_TOLERANT 

Should be used in disturbed magnetic environment

Definition at line 88 of file sbgEComCmdMag.h.

Function Documentation

SBG_DEPRECATED ( SbgErrorCode   sbgEComCmdMagSetModelSbgEComHandle *pHandle, const void *pBuffer, uint32 size)

DEPRECATED FUNCTION. Please use sbgEComCmdMagSetModelId instead Set the error model for the magnetometer. The new configuration will only be applied after SBG_ECOM_CMD_SETTINGS_ACTION (01) command is issued, with SBG_ECOM_SAVE_SETTINGS parameter.

Parameters
[in]pHandleA valid sbgECom handle.
[in]pBufferRead only buffer containing the error model buffer.
[in]sizeSize of the buffer.
Returns
SBG_NO_ERROR if the command has been executed successfully.
SbgErrorCode sbgEComCmdMagComputeCalib ( SbgEComHandle pHandle,
SbgEComMagCalibResults pCalibResults 
)

This command computes a magnetic calibration solution based on the magnetic field logged since the last call to the command SBG_ECOM_CMD_START_MAG_CALIB (15). As soon as the computations are done, the device will answer with quality indicators, status flags and if possible a valid magnetic calibration matrix and offset.

Parameters
[in]pHandleA valid sbgECom handle.
[out]pCalibResultsPointer on a SbgEComMagCalibResults structure that can hold onboard magnetic calibration results and status.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 407 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagGetModelInfo ( SbgEComHandle pHandle,
SbgEComModelInfo pModelInfo 
)

Retrieve magnetometer error model information.

Parameters
[in]pHandleA valid sbgECom handle.
[out]pMotionProfileInfoPointer to a SbgEComModelInfo to contain the current magnetometer error model info.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 29 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagGetRejection ( SbgEComHandle pHandle,
SbgEComMagRejectionConf pRejectConf 
)

Retrieve the rejection configuration of the magnetometer module.

Parameters
[in]pHandleA valid sbgECom handle.
[out]pRejectConfPointer to a SbgEComMagRejectionConf struct to hold rejection configuration of the magnetometer module.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 157 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagSetCalibData ( SbgEComHandle pHandle,
const float  offset[3],
const float  matrix[9] 
)

Send a command that set the magnetometers calibration parameters.

Parameters
[in]pHandleA valid sbgECom handle.
[in]offsetMagnetometers calibration offset vector.
[in]matixMagnetometers calibration 3x3 matrix.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 61 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagSetModelId ( SbgEComHandle pHandle,
uint32  id 
)

Set magnetometer error model ID.

Parameters
[in]pHandleA valid sbgECom handle.
[in]idMagnetometer model ID to set
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 15 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagSetRejection ( SbgEComHandle pHandle,
const SbgEComMagRejectionConf pRejectConf 
)

Set the rejection configuration of the magnetometer module.

Parameters
[in]pHandleA valid sbgECom handle.
[in]pRejectConfPointer to a SbgEComMagRejectionConf struct holding rejection configuration for the magnetometer module.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 237 of file sbgEComCmdMag.c.

SbgErrorCode sbgEComCmdMagStartCalib ( SbgEComHandle pHandle,
SbgEComMagCalibMode  mode,
SbgEComMagCalibBandwidth  bandwidth 
)

Start the magnetic calibration process. As soon as this command is sent, the device will start logging magnetic field data internally. This set of data will be used later by the magnetic calibration algorithms to map the surrounding magnetic field.

Parameters
[in]pHandleA valid sbgECom handle.
[in]modeDefine which magnetic calibration type to perform. It could be 3D or 2D.
[in]bandwidthTell the device that we should have low, medium or high dynamics during the magnetic calibration process.
Returns
SBG_NO_ERROR if the command has been executed successfully.

Definition at line 320 of file sbgEComCmdMag.c.



sbg_driver
Author(s):
autogenerated on Sun Jan 27 2019 03:42:20