sbgECom Library  4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
sbgEComLogEkf.h
Go to the documentation of this file.
1 
33 #ifndef SBG_ECOM_LOG_EKF_H
34 #define SBG_ECOM_LOG_EKF_H
35 
36 // sbgCommonLib headers
37 #include <sbgCommon.h>
39 
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43 
44 //----------------------------------------------------------------------//
45 //- Solution status definitions -//
46 //----------------------------------------------------------------------//
47 
51 #define SBG_ECOM_SOL_ATTITUDE_VALID (0x00000001u << 4)
52 #define SBG_ECOM_SOL_HEADING_VALID (0x00000001u << 5)
53 #define SBG_ECOM_SOL_VELOCITY_VALID (0x00000001u << 6)
54 #define SBG_ECOM_SOL_POSITION_VALID (0x00000001u << 7)
55 #define SBG_ECOM_SOL_VERT_REF_USED (0x00000001u << 8)
56 #define SBG_ECOM_SOL_MAG_REF_USED (0x00000001u << 9)
57 #define SBG_ECOM_SOL_GPS1_VEL_USED (0x00000001u << 10)
58 #define SBG_ECOM_SOL_GPS1_POS_USED (0x00000001u << 11)
59 #define SBG_ECOM_SOL_GPS1_HDT_USED (0x00000001u << 13)
60 #define SBG_ECOM_SOL_GPS2_VEL_USED (0x00000001u << 14)
61 #define SBG_ECOM_SOL_GPS2_POS_USED (0x00000001u << 15)
62 #define SBG_ECOM_SOL_GPS2_HDT_USED (0x00000001u << 17)
63 #define SBG_ECOM_SOL_ODO_USED (0x00000001u << 18)
64 #define SBG_ECOM_SOL_DVL_BT_USED (0x00000001u << 19)
65 #define SBG_ECOM_SOL_DVL_WT_USED (0x00000001u << 20)
66 #define SBG_ECOM_SOL_USER_POS_USED (0x00000001u << 21)
67 #define SBG_ECOM_SOL_USER_VEL_USED (0x00000001u << 22)
68 #define SBG_ECOM_SOL_USER_HEADING_USED (0x00000001u << 23)
69 #define SBG_ECOM_SOL_USBL_USED (0x00000001u << 24)
70 #define SBG_ECOM_SOL_AIR_DATA_USED (0x00000001u << 25)
71 #define SBG_ECOM_SOL_ZUPT_USED (0x00000001u << 26)
72 #define SBG_ECOM_SOL_ALIGN_VALID (0x00000001u << 27)
73 #define SBG_ECOM_SOL_DEPTH_USED (0x00000001u << 28)
79 {
86 
87 //----------------------------------------------------------------------//
88 //- Log structure definitions -//
89 //----------------------------------------------------------------------//
90 
94 typedef struct _SbgEComLogEkfEuler
95 {
96  uint32_t timeStamp;
97  float euler[3];
98  float eulerStdDev[3];
99  uint32_t status;
101 
105 typedef struct _SbgEComLogEkfQuat
106 {
107  uint32_t timeStamp;
108  float quaternion[4];
109  float eulerStdDev[3];
110  uint32_t status;
112 
116 typedef struct _SbgEComLogEkfNav
117 {
118  uint32_t timeStamp;
119  float velocity[3];
120  float velocityStdDev[3];
121  double position[3];
123  float undulation;
124  float positionStdDev[3];
125  uint32_t status;
127 
131 typedef struct _SbgEComLogEkfVelBody
132 {
133  uint32_t timeStamp;
134  uint32_t status;
135  float velocity[3];
136  float velocityStdDev[3];
138 
139 //----------------------------------------------------------------------//
140 //- Public methods (SbgEComLogEkfEuler) -//
141 //----------------------------------------------------------------------//
142 
151 
160 
161 //----------------------------------------------------------------------//
162 //- Public methods (SbgEComLogEkfQuat) -//
163 //----------------------------------------------------------------------//
164 
173 
182 
183 //----------------------------------------------------------------------//
184 //- Public methods (SbgEComLogEkfNav) -//
185 //----------------------------------------------------------------------//
186 
195 
204 
205 //----------------------------------------------------------------------//
206 //- Public methods (SbgEComLogEkfVelBody) -//
207 //----------------------------------------------------------------------//
208 
215 
224 
233 
234 //----------------------------------------------------------------------//
235 //- Public setters/getters -//
236 //----------------------------------------------------------------------//
237 
245 
253 uint32_t sbgEComLogEkfBuildSolutionStatus(SbgEComSolutionMode solutionMode, uint32_t masks);
254 
255 //----------------------------------------------------------------------//
256 //- DEPRECATED - Used for backward compatibility -//
257 //----------------------------------------------------------------------//
258 
259 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfEuler SbgLogEkfEulerData);
260 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfQuat SbgLogEkfQuatData);
261 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfNav SbgLogEkfNavData);
262 
263 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfEulerData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfEuler *pLogData));
264 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfEulerData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfEuler *pLogData));
265 
266 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfQuatData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfQuat *pLogData));
267 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfQuatData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfQuat *pLogData));
268 
269 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfNavData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfNav *pLogData));
270 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfNavData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfNav *pLogData));
271 
272 
273 #ifdef __cplusplus
274 }
275 #endif
276 
277 #endif // SBG_ECOM_LOG_EKF_H
Main header for the SBG Systems common C library.
#define SBG_DEPRECATED_TYPEDEF(decl)
Definition: sbgDefines.h:349
_SbgEComSolutionMode
Definition: sbgEComLogEkf.h:79
@ SBG_ECOM_SOL_MODE_VERTICAL_GYRO
Definition: sbgEComLogEkf.h:81
@ SBG_ECOM_SOL_MODE_AHRS
Definition: sbgEComLogEkf.h:82
@ SBG_ECOM_SOL_MODE_UNINITIALIZED
Definition: sbgEComLogEkf.h:80
@ SBG_ECOM_SOL_MODE_NAV_POSITION
Definition: sbgEComLogEkf.h:84
@ SBG_ECOM_SOL_MODE_NAV_VELOCITY
Definition: sbgEComLogEkf.h:83
SbgErrorCode sbgEComLogEkfNavWriteToStream(const SbgEComLogEkfNav *pLogData, SbgStreamBuffer *pStreamBuffer)
SbgErrorCode sbgEComLogEkfVelBodyReadFromStream(SbgEComLogEkfVelBody *pLogData, SbgStreamBuffer *pStreamBuffer)
SbgErrorCode sbgEComLogEkfVelBodyWriteToStream(const SbgEComLogEkfVelBody *pLogData, SbgStreamBuffer *pStreamBuffer)
struct _SbgEComLogEkfVelBody SbgEComLogEkfVelBody
SbgErrorCode sbgEComLogEkfNavReadFromStream(SbgEComLogEkfNav *pLogData, SbgStreamBuffer *pStreamBuffer)
struct _SbgEComLogEkfEuler SbgEComLogEkfEuler
struct _SbgEComLogEkfNav SbgEComLogEkfNav
SbgErrorCode sbgEComLogEkfQuatWriteToStream(const SbgEComLogEkfQuat *pLogData, SbgStreamBuffer *pStreamBuffer)
void sbgEComLogEkfVelBodyConstruct(SbgEComLogEkfVelBody *pLogData)
struct _SbgEComLogEkfQuat SbgEComLogEkfQuat
SbgErrorCode sbgEComLogEkfEulerWriteToStream(const SbgEComLogEkfEuler *pLogData, SbgStreamBuffer *pStreamBuffer)
SbgErrorCode sbgEComLogEkfEulerReadFromStream(SbgEComLogEkfEuler *pLogData, SbgStreamBuffer *pStreamBuffer)
SbgEComSolutionMode sbgEComLogEkfGetSolutionMode(uint32_t status)
uint32_t sbgEComLogEkfBuildSolutionStatus(SbgEComSolutionMode solutionMode, uint32_t masks)
SbgErrorCode sbgEComLogEkfQuatReadFromStream(SbgEComLogEkfQuat *pLogData, SbgStreamBuffer *pStreamBuffer)
enum _SbgEComSolutionMode SbgEComSolutionMode
enum _SbgErrorCode SbgErrorCode
Used to read/write data from/to a memory buffer stream.
SBG_DEPRECATED(SBG_INLINE uint32_t SBG_VERSION(uint8_t major, uint8_t minor, uint8_t rev, uint8_t build))
Definition: sbgEComLogEkf.h:95
uint32_t timeStamp
Definition: sbgEComLogEkf.h:96
float eulerStdDev[3]
Definition: sbgEComLogEkf.h:98
uint32_t status
Definition: sbgEComLogEkf.h:99
float euler[3]
Definition: sbgEComLogEkf.h:97
Definition: sbgEComLogEkf.h:117
float velocity[3]
Definition: sbgEComLogEkf.h:119
double position[3]
Definition: sbgEComLogEkf.h:121
float velocityStdDev[3]
Definition: sbgEComLogEkf.h:120
float positionStdDev[3]
Definition: sbgEComLogEkf.h:124
uint32_t timeStamp
Definition: sbgEComLogEkf.h:118
float undulation
Definition: sbgEComLogEkf.h:123
uint32_t status
Definition: sbgEComLogEkf.h:125
Definition: sbgEComLogEkf.h:106
float quaternion[4]
Definition: sbgEComLogEkf.h:108
float eulerStdDev[3]
Definition: sbgEComLogEkf.h:109
uint32_t timeStamp
Definition: sbgEComLogEkf.h:107
uint32_t status
Definition: sbgEComLogEkf.h:110
Definition: sbgEComLogEkf.h:132
uint32_t timeStamp
Definition: sbgEComLogEkf.h:133
float velocity[3]
Definition: sbgEComLogEkf.h:135
float velocityStdDev[3]
Definition: sbgEComLogEkf.h:136
uint32_t status
Definition: sbgEComLogEkf.h:134
Definition: sbgStreamBufferCommon.h:201