sbgECom Library
4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
|
Parse EKF measurements such as attitude, position and velocity logs. More...
Go to the source code of this file.
Data Structures | |
struct | _SbgEComLogEkfEuler |
struct | _SbgEComLogEkfQuat |
struct | _SbgEComLogEkfNav |
struct | _SbgEComLogEkfVelBody |
Macros | |
#define | SBG_ECOM_SOL_ATTITUDE_VALID (0x00000001u << 4) |
#define | SBG_ECOM_SOL_HEADING_VALID (0x00000001u << 5) |
#define | SBG_ECOM_SOL_VELOCITY_VALID (0x00000001u << 6) |
#define | SBG_ECOM_SOL_POSITION_VALID (0x00000001u << 7) |
#define | SBG_ECOM_SOL_VERT_REF_USED (0x00000001u << 8) |
#define | SBG_ECOM_SOL_MAG_REF_USED (0x00000001u << 9) |
#define | SBG_ECOM_SOL_GPS1_VEL_USED (0x00000001u << 10) |
#define | SBG_ECOM_SOL_GPS1_POS_USED (0x00000001u << 11) |
#define | SBG_ECOM_SOL_GPS1_HDT_USED (0x00000001u << 13) |
#define | SBG_ECOM_SOL_GPS2_VEL_USED (0x00000001u << 14) |
#define | SBG_ECOM_SOL_GPS2_POS_USED (0x00000001u << 15) |
#define | SBG_ECOM_SOL_GPS2_HDT_USED (0x00000001u << 17) |
#define | SBG_ECOM_SOL_ODO_USED (0x00000001u << 18) |
#define | SBG_ECOM_SOL_DVL_BT_USED (0x00000001u << 19) |
#define | SBG_ECOM_SOL_DVL_WT_USED (0x00000001u << 20) |
#define | SBG_ECOM_SOL_USER_POS_USED (0x00000001u << 21) |
#define | SBG_ECOM_SOL_USER_VEL_USED (0x00000001u << 22) |
#define | SBG_ECOM_SOL_USER_HEADING_USED (0x00000001u << 23) |
#define | SBG_ECOM_SOL_USBL_USED (0x00000001u << 24) |
#define | SBG_ECOM_SOL_AIR_DATA_USED (0x00000001u << 25) |
#define | SBG_ECOM_SOL_ZUPT_USED (0x00000001u << 26) |
#define | SBG_ECOM_SOL_ALIGN_VALID (0x00000001u << 27) |
#define | SBG_ECOM_SOL_DEPTH_USED (0x00000001u << 28) |
Typedefs | |
typedef enum _SbgEComSolutionMode | SbgEComSolutionMode |
typedef struct _SbgEComLogEkfEuler | SbgEComLogEkfEuler |
typedef struct _SbgEComLogEkfQuat | SbgEComLogEkfQuat |
typedef struct _SbgEComLogEkfNav | SbgEComLogEkfNav |
typedef struct _SbgEComLogEkfVelBody | SbgEComLogEkfVelBody |
Enumerations | |
enum | _SbgEComSolutionMode { SBG_ECOM_SOL_MODE_UNINITIALIZED = 0 , SBG_ECOM_SOL_MODE_VERTICAL_GYRO = 1 , SBG_ECOM_SOL_MODE_AHRS = 2 , SBG_ECOM_SOL_MODE_NAV_VELOCITY = 3 , SBG_ECOM_SOL_MODE_NAV_POSITION = 4 } |
Parse EKF measurements such as attitude, position and velocity logs.
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.
#define SBG_ECOM_SOL_ATTITUDE_VALID (0x00000001u << 4) |
Solution bit masks definitions. Set to 1 if attitude data is reliable (Roll/Pitch error < 0,5°).
#define SBG_ECOM_SOL_HEADING_VALID (0x00000001u << 5) |
Set to 1 if heading data is reliable (Heading error < 1°).
#define SBG_ECOM_SOL_VELOCITY_VALID (0x00000001u << 6) |
Set to 1 if velocity data is reliable (velocity error < 1.5 m/s).
#define SBG_ECOM_SOL_POSITION_VALID (0x00000001u << 7) |
Set to 1 if position data is reliable (Position error < 10m).
#define SBG_ECOM_SOL_VERT_REF_USED (0x00000001u << 8) |
Set to 1 if vertical reference is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_MAG_REF_USED (0x00000001u << 9) |
Set to 1 if magnetometer is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS1_VEL_USED (0x00000001u << 10) |
Set to 1 if GPS1 velocity is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS1_POS_USED (0x00000001u << 11) |
Set to 1 if GPS1 Position is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS1_HDT_USED (0x00000001u << 13) |
Set to 1 if GPS1 True Heading is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS2_VEL_USED (0x00000001u << 14) |
Set to 1 if GPS2 velocity is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS2_POS_USED (0x00000001u << 15) |
Set to 1 if GPS2 Position is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_GPS2_HDT_USED (0x00000001u << 17) |
Set to 1 if GPS2 True Heading is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_ODO_USED (0x00000001u << 18) |
Set to 1 if Odometer is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_DVL_BT_USED (0x00000001u << 19) |
Set to 1 if DVL Bottom Tracking is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_DVL_WT_USED (0x00000001u << 20) |
Set to 1 if DVL Water Tracking is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_USER_POS_USED (0x00000001u << 21) |
Set to 1 if user velocity is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_USER_VEL_USED (0x00000001u << 22) |
Set to 1 if user Position is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_USER_HEADING_USED (0x00000001u << 23) |
Set to 1 if user Course is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_USBL_USED (0x00000001u << 24) |
Set to 1 if USBL / LBL is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_AIR_DATA_USED (0x00000001u << 25) |
Set to 1 if AirData (altimeter and/or true airspeed) is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_ZUPT_USED (0x00000001u << 26) |
Set to 1 if a ZUPT is used in solution (data used and valid since 3s).
#define SBG_ECOM_SOL_ALIGN_VALID (0x00000001u << 27) |
Set to 1 if sensor alignment and calibration parameters are valid
#define SBG_ECOM_SOL_DEPTH_USED (0x00000001u << 28) |
Set to 1 if Depth sensor (for sub-sea navigation) is used in solution (data used and valid since 3s).
typedef enum _SbgEComSolutionMode SbgEComSolutionMode |
Solution filter mode enum.
typedef struct _SbgEComLogEkfEuler SbgEComLogEkfEuler |
EKF computed orientation using euler angles.
typedef struct _SbgEComLogEkfQuat SbgEComLogEkfQuat |
EFK computed orientation using quaternion.
typedef struct _SbgEComLogEkfNav SbgEComLogEkfNav |
EFK computed navigation data.
typedef struct _SbgEComLogEkfVelBody SbgEComLogEkfVelBody |
INS body velocity computed by the EKF filter.
enum _SbgEComSolutionMode |
Solution filter mode enum.
SbgErrorCode sbgEComLogEkfEulerReadFromStream | ( | SbgEComLogEkfEuler * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Parse data for the SBG_ECOM_LOG_EKF_EULER message and fill the corresponding structure.
[out] | pLogData | Log structure instance to fill. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogEkfEulerWriteToStream | ( | const SbgEComLogEkfEuler * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write data for the SBG_ECOM_LOG_EKF_EULER message to the output stream buffer from the provided structure.
[in] | pLogData | Log structure instance to write. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
SbgErrorCode sbgEComLogEkfQuatReadFromStream | ( | SbgEComLogEkfQuat * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Parse data for the SBG_ECOM_LOG_EKF_QUAT message and fill the corresponding structure.
[out] | pLogData | Log structure instance to fill. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogEkfQuatWriteToStream | ( | const SbgEComLogEkfQuat * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write data for the SBG_ECOM_LOG_EKF_QUAT message to the output stream buffer from the provided structure.
[in] | pLogData | Log structure instance to write. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
SbgErrorCode sbgEComLogEkfNavReadFromStream | ( | SbgEComLogEkfNav * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Parse data for the SBG_ECOM_LOG_EKF_NAV message and fill the corresponding structure.
[out] | pLogData | Log structure instance to fill. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogEkfNavWriteToStream | ( | const SbgEComLogEkfNav * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write data for the SBG_ECOM_LOG_EKF_NAV message to the output stream buffer from the provided structure.
[in] | pLogData | Log structure instance to write. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
void sbgEComLogEkfVelBodyConstruct | ( | SbgEComLogEkfVelBody * | pLogData | ) |
Construct an empty / zero initialized instance.
[in] | pLogData | Log instance. |
SbgErrorCode sbgEComLogEkfVelBodyReadFromStream | ( | SbgEComLogEkfVelBody * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Read SBG_ECOM_LOG_EKF_VEL_BODY message from a stream buffer.
[out] | pLogData | Log instance. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogEkfVelBodyWriteToStream | ( | const SbgEComLogEkfVelBody * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write SBG_ECOM_LOG_EKF_VEL_BODY message to a stream buffer.
[in] | pLogData | Log instance. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
SbgEComSolutionMode sbgEComLogEkfGetSolutionMode | ( | uint32_t | status | ) |
Method used to read the solution mode from a solution status field.
[in] | status | Status uint32_t value to extract the solution mode from it. |
uint32_t sbgEComLogEkfBuildSolutionStatus | ( | SbgEComSolutionMode | solutionMode, |
uint32_t | masks | ||
) |
Method used to write the solution status field.
[in] | solutionMode | The solution mode to set. |
[in] | masks | Bit mask to set. |