sbgECom Library  5.1.708-stable
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)
74 #define SBG_ECOM_SOL_ZARU_USED (0x00000001u << 29)
79 {
86 
87 //----------------------------------------------------------------------//
88 //- Log structure definitions -//
89 //----------------------------------------------------------------------//
90 
100 typedef struct _SbgEComLogEkfEuler
101 {
102  uint32_t timeStamp;
103  float euler[3];
104  float eulerStdDev[3];
105  uint32_t status;
109 
119 typedef struct _SbgEComLogEkfQuat
120 {
121  uint32_t timeStamp;
122  float quaternion[4];
123  float eulerStdDev[3];
124  uint32_t status;
128 
132 typedef struct _SbgEComLogEkfNav
133 {
134  uint32_t timeStamp;
135  float velocity[3];
136  float velocityStdDev[3];
137  double position[3];
139  float undulation;
140  float positionStdDev[3];
141  uint32_t status;
143 
147 typedef struct _SbgEComLogEkfVelBody
148 {
149  uint32_t timeStamp;
150  uint32_t status;
151  float velocity[3];
152  float velocityStdDev[3];
154 
155 //----------------------------------------------------------------------//
156 //- Public methods (SbgEComLogEkfEuler) -//
157 //----------------------------------------------------------------------//
158 
166 
175 
184 
185 //----------------------------------------------------------------------//
186 //- Public methods (SbgEComLogEkfQuat) -//
187 //----------------------------------------------------------------------//
188 
197 
206 
207 //----------------------------------------------------------------------//
208 //- Public methods (SbgEComLogEkfNav) -//
209 //----------------------------------------------------------------------//
210 
219 
228 
229 //----------------------------------------------------------------------//
230 //- Public methods (SbgEComLogEkfVelBody) -//
231 //----------------------------------------------------------------------//
232 
239 
248 
257 
258 //----------------------------------------------------------------------//
259 //- Public setters/getters -//
260 //----------------------------------------------------------------------//
261 
269 
277 uint32_t sbgEComLogEkfBuildSolutionStatus(SbgEComSolutionMode solutionMode, uint32_t masks);
278 
279 //----------------------------------------------------------------------//
280 //- DEPRECATED - Used for backward compatibility -//
281 //----------------------------------------------------------------------//
282 
283 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfEuler SbgLogEkfEulerData);
284 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfQuat SbgLogEkfQuatData);
285 SBG_DEPRECATED_TYPEDEF(typedef struct _SbgEComLogEkfNav SbgLogEkfNavData);
286 
287 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfEulerData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfEuler *pLogData));
288 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfEulerData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfEuler *pLogData));
289 
290 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfQuatData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfQuat *pLogData));
291 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfQuatData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfQuat *pLogData));
292 
293 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogParseEkfNavData(SbgStreamBuffer *pStreamBuffer, SbgEComLogEkfNav *pLogData));
294 SBG_DEPRECATED(SbgErrorCode sbgEComBinaryLogWriteEkfNavData(SbgStreamBuffer *pStreamBuffer, const SbgEComLogEkfNav *pLogData));
295 
296 
297 #ifdef __cplusplus
298 }
299 #endif
300 
301 #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)
float sbgEComLogEkfEulerGetMagneticHeading(const SbgEComLogEkfEuler *pEkfEuler)
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:101
float magDeclination
Definition: sbgEComLogEkf.h:106
uint32_t timeStamp
Definition: sbgEComLogEkf.h:102
float eulerStdDev[3]
Definition: sbgEComLogEkf.h:104
uint32_t status
Definition: sbgEComLogEkf.h:105
float euler[3]
Definition: sbgEComLogEkf.h:103
float magInclination
Definition: sbgEComLogEkf.h:107
Definition: sbgEComLogEkf.h:133
float velocity[3]
Definition: sbgEComLogEkf.h:135
double position[3]
Definition: sbgEComLogEkf.h:137
float velocityStdDev[3]
Definition: sbgEComLogEkf.h:136
float positionStdDev[3]
Definition: sbgEComLogEkf.h:140
uint32_t timeStamp
Definition: sbgEComLogEkf.h:134
float undulation
Definition: sbgEComLogEkf.h:139
uint32_t status
Definition: sbgEComLogEkf.h:141
Definition: sbgEComLogEkf.h:120
float quaternion[4]
Definition: sbgEComLogEkf.h:122
float magDeclination
Definition: sbgEComLogEkf.h:125
float eulerStdDev[3]
Definition: sbgEComLogEkf.h:123
uint32_t timeStamp
Definition: sbgEComLogEkf.h:121
uint32_t status
Definition: sbgEComLogEkf.h:124
float magInclination
Definition: sbgEComLogEkf.h:126
Definition: sbgEComLogEkf.h:148
uint32_t timeStamp
Definition: sbgEComLogEkf.h:149
float velocity[3]
Definition: sbgEComLogEkf.h:151
float velocityStdDev[3]
Definition: sbgEComLogEkf.h:152
uint32_t status
Definition: sbgEComLogEkf.h:150
Definition: sbgStreamBufferCommon.h:201