sbgEComBinaryLogEkf.h
Go to the documentation of this file.
1 
20 #ifndef __SBG_ECOM_BINARY_LOG_EKF_H__
21 #define __SBG_ECOM_BINARY_LOG_EKF_H__
22 
23 #include <sbgCommon.h>
25 
26 //----------------------------------------------------------------------//
27 //- Solution status definitions -//
28 //----------------------------------------------------------------------//
29 
33 #define SBG_ECOM_SOLUTION_MODE_SHIFT (0u)
34 #define SBG_ECOM_SOLUTION_MODE_MASK (0x0000000Fu)
39 #define SBG_ECOM_SOL_ATTITUDE_VALID (0x00000001u << 4)
40 #define SBG_ECOM_SOL_HEADING_VALID (0x00000001u << 5)
41 #define SBG_ECOM_SOL_VELOCITY_VALID (0x00000001u << 6)
42 #define SBG_ECOM_SOL_POSITION_VALID (0x00000001u << 7)
43 #define SBG_ECOM_SOL_VERT_REF_USED (0x00000001u << 8)
44 #define SBG_ECOM_SOL_MAG_REF_USED (0x00000001u << 9)
45 #define SBG_ECOM_SOL_GPS1_VEL_USED (0x00000001u << 10)
46 #define SBG_ECOM_SOL_GPS1_POS_USED (0x00000001u << 11)
47 #define SBG_ECOM_SOL_GPS1_HDT_USED (0x00000001u << 13)
48 #define SBG_ECOM_SOL_GPS2_VEL_USED (0x00000001u << 14)
49 #define SBG_ECOM_SOL_GPS2_POS_USED (0x00000001u << 15)
50 #define SBG_ECOM_SOL_GPS2_HDT_USED (0x00000001u << 17)
51 #define SBG_ECOM_SOL_ODO_USED (0x00000001u << 18)
52 #define SBG_ECOM_SOL_DVL_BT_USED (0x00000001u << 19)
53 #define SBG_ECOM_SOL_DVL_WT_USED (0x00000001u << 20)
54 #define SBG_ECOM_SOL_USER_POS_USED (0x00000001u << 21)
55 #define SBG_ECOM_SOL_USER_VEL_USED (0x00000001u << 22)
56 #define SBG_ECOM_SOL_USER_HEADING_USED (0x00000001u << 23)
57 #define SBG_ECOM_SOL_USBL_USED (0x00000001u << 24)
58 #define SBG_ECOM_SOL_AIR_DATA_USED (0x00000001u << 25)
59 #define SBG_ECOM_SOL_ZUPT_USED (0x00000001u << 26)
60 #define SBG_ECOM_SOL_ALIGN_VALID (0x00000001u << 27)
61 #define SBG_ECOM_SOL_DEPTH_USED (0x00000001u << 28)
66 typedef enum _SbgEComSolutionMode
67 {
74 
75 //----------------------------------------------------------------------//
76 //- Solution status helpers methods -//
77 //----------------------------------------------------------------------//
78 
85 {
87 }
88 
95 SBG_INLINE uint32_t sbgEComLogEkfBuildSolutionStatus(SbgEComSolutionMode solutionMode, uint32_t masks)
96 {
97  //
98  // Create the combined status field
99  //
100  return ((((uint32_t)solutionMode)&SBG_ECOM_SOLUTION_MODE_MASK) << SBG_ECOM_SOLUTION_MODE_SHIFT) | masks;
101 }
102 
103 
104 //----------------------------------------------------------------------//
105 //- Log structure definitions -//
106 //----------------------------------------------------------------------//
107 
111 typedef struct _SbgLogEkfEulerData
112 {
113  uint32_t timeStamp;
114  float euler[3];
115  float eulerStdDev[3];
116  uint32_t status;
118 
122 typedef struct _SbgLogEkfQuatData
123 {
124  uint32_t timeStamp;
125  float quaternion[4];
126  float eulerStdDev[3];
127  uint32_t status;
129 
133 typedef struct _SbgLogEkfNavData
134 {
135  uint32_t timeStamp;
136  float velocity[3];
137  float velocityStdDev[3];
138  double position[3];
140  float undulation;
141  float positionStdDev[3];
142  uint32_t status;
144 
145 //----------------------------------------------------------------------//
146 //- Operations -//
147 //----------------------------------------------------------------------//
148 
156 
164 
172 
180 
188 
196 
197 #endif
SbgErrorCode sbgEComBinaryLogWriteEkfEulerData(SbgStreamBuffer *pOutputStream, const SbgLogEkfEulerData *pInputData)
SbgErrorCode sbgEComBinaryLogParseEkfEulerData(SbgStreamBuffer *pInputStream, SbgLogEkfEulerData *pOutputData)
SbgErrorCode sbgEComBinaryLogWriteEkfNavData(SbgStreamBuffer *pOutputStream, const SbgLogEkfNavData *pInputData)
Used to read/write data from/to a memory buffer stream.
struct _SbgLogEkfQuatData SbgLogEkfQuatData
SBG_INLINE SbgEComSolutionMode sbgEComLogEkfGetSolutionMode(uint32_t status)
SbgErrorCode sbgEComBinaryLogParseEkfQuatData(SbgStreamBuffer *pInputStream, SbgLogEkfQuatData *pOutputData)
struct _SbgLogEkfEulerData SbgLogEkfEulerData
enum _SbgEComSolutionMode SbgEComSolutionMode
#define SBG_INLINE
Definition: sbgDefines.h:186
Main header file for SBG Systems common C library.
SbgErrorCode sbgEComBinaryLogWriteEkfQuatData(SbgStreamBuffer *pOutputStream, const SbgLogEkfQuatData *pInputData)
#define SBG_ECOM_SOLUTION_MODE_MASK
SbgErrorCode sbgEComBinaryLogParseEkfNavData(SbgStreamBuffer *pInputStream, SbgLogEkfNavData *pOutputData)
struct _SbgLogEkfNavData SbgLogEkfNavData
SBG_INLINE uint32_t sbgEComLogEkfBuildSolutionStatus(SbgEComSolutionMode solutionMode, uint32_t masks)
enum _SbgErrorCode SbgErrorCode
#define SBG_ECOM_SOLUTION_MODE_SHIFT


sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:35