sbgEComBinaryLogGps.h
Go to the documentation of this file.
1 
20 #ifndef __SBG_ECOM_BINARY_LOG_GPS_H__
21 #define __SBG_ECOM_BINARY_LOG_GPS_H__
22 
23 #include <sbgCommon.h>
25 
26 //----------------------------------------------------------------------//
27 //- Log GPS velocity const definitions -//
28 //----------------------------------------------------------------------//
29 
33 #define SBG_ECOM_GPS_VEL_STATUS_SHIFT (0u)
34 #define SBG_ECOM_GPS_VEL_STATUS_MASK (0x0000003Fu)
35 #define SBG_ECOM_GPS_VEL_TYPE_SHIFT (6u)
36 #define SBG_ECOM_GPS_VEL_TYPE_MASK (0x0000003Fu)
38 //----------------------------------------------------------------------//
39 //- Log GPS position const definitions -//
40 //----------------------------------------------------------------------//
41 
45 #define SBG_ECOM_GPS_POS_STATUS_SHIFT (0u)
46 #define SBG_ECOM_GPS_POS_STATUS_MASK (0x0000003Fu)
47 #define SBG_ECOM_GPS_POS_TYPE_SHIFT (6u)
48 #define SBG_ECOM_GPS_POS_TYPE_MASK (0x0000003Fu)
53 #define SBG_ECOM_GPS_POS_GPS_L1_USED (0x00000001u << 12)
54 #define SBG_ECOM_GPS_POS_GPS_L2_USED (0x00000001u << 13)
55 #define SBG_ECOM_GPS_POS_GPS_L5_USED (0x00000001u << 14)
56 #define SBG_ECOM_GPS_POS_GLO_L1_USED (0x00000001u << 15)
57 #define SBG_ECOM_GPS_POS_GLO_L2_USED (0x00000001u << 16)
59 //----------------------------------------------------------------------//
60 //- Log GPS HDT const definitions -//
61 //----------------------------------------------------------------------//
62 
66 #define SBG_ECOM_GPS_HDT_STATUS_SHIFT (0u)
67 #define SBG_ECOM_GPS_HDT_STATUS_MASK (0x0000003Fu)
69 //----------------------------------------------------------------------//
70 //- Log GPS RAW const definitions -//
71 //----------------------------------------------------------------------//
72 
73 #define SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE (4086u)
75 //----------------------------------------------------------------------//
76 //- Log GPS velocity enums definitions -//
77 //----------------------------------------------------------------------//
78 
83 {
89 
93 typedef enum _SbgEComGpsVelType
94 {
100 
101 //----------------------------------------------------------------------//
102 //- Log GPS position enums definitions -//
103 //----------------------------------------------------------------------//
104 
109 {
115 
119 typedef enum _SbgEComGpsPosType
120 {
133 
134 //----------------------------------------------------------------------//
135 //- Log GPS HDT enums definitions -//
136 //----------------------------------------------------------------------//
137 
142 {
148 
149 //----------------------------------------------------------------------//
150 //- Helpers methods for velocity status access -//
151 //----------------------------------------------------------------------//
152 
159 {
161 }
162 
169 {
171 }
172 
180 {
181  //
182  // Create the combined status field
183  //
186 }
187 
188 //----------------------------------------------------------------------//
189 //- Helpers methods for position status access -//
190 //----------------------------------------------------------------------//
191 
198 {
200 }
201 
208 {
210 }
211 
220 {
221  //
222  // Create the combined status field
223  //
226 }
227 
228 //----------------------------------------------------------------------//
229 //- Helpers methods for HDT status access -//
230 //----------------------------------------------------------------------//
231 
238 {
240 }
241 
249 {
250  //
251  // Create the combined status field
252  //
253  return ((((uint32)status)&SBG_ECOM_GPS_HDT_STATUS_MASK) << SBG_ECOM_GPS_HDT_STATUS_SHIFT) | masks;
254 }
255 
256 //----------------------------------------------------------------------//
257 //- Log structure definitions -//
258 //----------------------------------------------------------------------//
259 
263 typedef struct _SbgLogGpsVel
264 {
268  float velocity[3];
269  float velocityAcc[3];
270  float course;
271  float courseAcc;
272 } SbgLogGpsVel;
273 
277 typedef struct _SbgLogGpsPos
278 {
282  double latitude;
283  double longitude;
284  double altitude;
285  float undulation;
292 } SbgLogGpsPos;
293 
297 typedef struct _SbgLogGpsHdt
298 {
302  float heading;
304  float pitch;
306 } SbgLogGpsHdt;
307 
311 typedef struct _SbgLogGpsRaw
312 {
314  size_t bufferSize;
315 } SbgLogGpsRaw;
316 
317 //----------------------------------------------------------------------//
318 //- Operations -//
319 //----------------------------------------------------------------------//
320 
328 
336 
344 
352 
360 
368 
376 
384 
385 #endif
SBG_INLINE SbgEComGpsVelType sbgEComLogGpsVelGetType(uint32 status)
struct _SbgLogGpsPos SbgLogGpsPos
SbgErrorCode sbgEComBinaryLogWriteGpsHdtData(SbgStreamBuffer *pOutputStream, const SbgLogGpsHdt *pInputData)
SBG_INLINE uint32 sbgEComLogGpsHdtBuildStatus(SbgEComGpsHdtStatus status, uint32 masks)
#define SBG_ECOM_GPS_VEL_STATUS_SHIFT
unsigned int uint32
Definition: sbgTypes.h:58
SBG_INLINE uint32 sbgEComLogGpsPosBuildStatus(SbgEComGpsPosStatus status, SbgEComGpsPosType type, uint32 masks)
#define SBG_ECOM_GPS_POS_STATUS_MASK
SbgErrorCode sbgEComBinaryLogWriteGpsRawData(SbgStreamBuffer *pOutputStream, const SbgLogGpsRaw *pInputData)
SBG_INLINE uint32 sbgEComLogGpsVelBuildStatus(SbgEComGpsVelStatus status, SbgEComGpsVelType type)
Used to read/write data from/to a memory buffer stream.
struct _SbgLogGpsHdt SbgLogGpsHdt
SBG_INLINE SbgEComGpsVelStatus sbgEComLogGpsVelGetStatus(uint32 status)
enum _SbgEComGpsPosStatus SbgEComGpsPosStatus
#define SBG_ECOM_GPS_POS_STATUS_SHIFT
_SbgEComGpsVelStatus
SBG_INLINE SbgEComGpsHdtStatus sbgEComLogGpsHdtGetStatus(uint32 status)
_SbgEComGpsVelType
#define SBG_ECOM_GPS_HDT_STATUS_SHIFT
SbgErrorCode sbgEComBinaryLogParseGpsRawData(SbgStreamBuffer *pInputStream, SbgLogGpsRaw *pOutputData)
#define SBG_ECOM_GPS_HDT_STATUS_MASK
enum _SbgEComGpsPosType SbgEComGpsPosType
#define SBG_ECOM_GPS_POS_TYPE_MASK
struct _SbgLogGpsRaw SbgLogGpsRaw
SBG_INLINE SbgEComGpsPosStatus sbgEComLogGpsPosGetStatus(uint32 status)
#define SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE
_SbgEComGpsPosStatus
#define SBG_INLINE
Definition: sbgDefines.h:94
Main header file for SBG Systems common C library.
enum _SbgEComGpsHdtStatus SbgEComGpsHdtStatus
enum _SbgEComGpsVelStatus SbgEComGpsVelStatus
SbgErrorCode sbgEComBinaryLogParseGpsHdtData(SbgStreamBuffer *pInputStream, SbgLogGpsHdt *pOutputData)
#define SBG_ECOM_GPS_VEL_STATUS_MASK
#define SBG_ECOM_GPS_POS_TYPE_SHIFT
#define SBG_ECOM_GPS_VEL_TYPE_SHIFT
SbgErrorCode sbgEComBinaryLogParseGpsVelData(SbgStreamBuffer *pInputStream, SbgLogGpsVel *pOutputData)
SbgErrorCode sbgEComBinaryLogParseGpsPosData(SbgStreamBuffer *pInputStream, SbgLogGpsPos *pOutputData)
struct _SbgLogGpsVel SbgLogGpsVel
_SbgEComGpsPosType
unsigned char uint8
Definition: sbgTypes.h:56
#define SBG_ECOM_GPS_VEL_TYPE_MASK
SBG_INLINE SbgEComGpsPosType sbgEComLogGpsPosGetType(uint32 status)
SbgErrorCode sbgEComBinaryLogWriteGpsVelData(SbgStreamBuffer *pOutputStream, const SbgLogGpsVel *pInputData)
enum _SbgEComGpsVelType SbgEComGpsVelType
unsigned short uint16
Definition: sbgTypes.h:57
enum _SbgErrorCode SbgErrorCode
_SbgEComGpsHdtStatus
SbgErrorCode sbgEComBinaryLogWriteGpsPosData(SbgStreamBuffer *pOutputStream, const SbgLogGpsPos *pInputData)


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