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)
72 #define SBG_ECOM_GPS_HDT_BASELINE_VALID (0x0001 << 6)
74 //----------------------------------------------------------------------//
75 //- Log GPS RAW const definitions -//
76 //----------------------------------------------------------------------//
77 
78 #define SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE (4086u)
80 //----------------------------------------------------------------------//
81 //- Log GPS velocity enums definitions -//
82 //----------------------------------------------------------------------//
83 
88 {
94 
98 typedef enum _SbgEComGpsVelType
99 {
105 
106 //----------------------------------------------------------------------//
107 //- Log GPS position enums definitions -//
108 //----------------------------------------------------------------------//
109 
114 {
120 
124 typedef enum _SbgEComGpsPosType
125 {
138 
139 //----------------------------------------------------------------------//
140 //- Log GPS HDT enums definitions -//
141 //----------------------------------------------------------------------//
142 
147 {
153 
154 //----------------------------------------------------------------------//
155 //- Helpers methods for velocity status access -//
156 //----------------------------------------------------------------------//
157 
164 {
166 }
167 
174 {
176 }
177 
185 {
186  //
187  // Create the combined status field
188  //
189  return ((((uint32_t)status)&SBG_ECOM_GPS_VEL_STATUS_MASK) << SBG_ECOM_GPS_VEL_STATUS_SHIFT) |
191 }
192 
193 //----------------------------------------------------------------------//
194 //- Helpers methods for position status access -//
195 //----------------------------------------------------------------------//
196 
203 {
205 }
206 
213 {
215 }
216 
225 {
226  //
227  // Create the combined status field
228  //
229  return ((((uint32_t)status)&SBG_ECOM_GPS_POS_STATUS_MASK) << SBG_ECOM_GPS_POS_STATUS_SHIFT) |
230  ((((uint32_t)type)&SBG_ECOM_GPS_POS_TYPE_MASK) << SBG_ECOM_GPS_POS_TYPE_SHIFT) | masks;
231 }
232 
233 //----------------------------------------------------------------------//
234 //- Helpers methods for HDT status access -//
235 //----------------------------------------------------------------------//
236 
243 {
245 }
246 
254 {
255  //
256  // Create the combined status field
257  //
258  return ((((uint32_t)status)&SBG_ECOM_GPS_HDT_STATUS_MASK) << SBG_ECOM_GPS_HDT_STATUS_SHIFT) | masks;
259 }
260 
261 //----------------------------------------------------------------------//
262 //- Log structure definitions -//
263 //----------------------------------------------------------------------//
264 
268 typedef struct _SbgLogGpsVel
269 {
270  uint32_t timeStamp;
271  uint32_t status;
272  uint32_t timeOfWeek;
273  float velocity[3];
274  float velocityAcc[3];
275  float course;
276  float courseAcc;
277 } SbgLogGpsVel;
278 
282 typedef struct _SbgLogGpsPos
283 {
284  uint32_t timeStamp;
285  uint32_t status;
286  uint32_t timeOfWeek;
287  double latitude;
288  double longitude;
289  double altitude;
290  float undulation;
294  uint8_t numSvUsed;
295  uint16_t baseStationId;
296  uint16_t differentialAge;
297 } SbgLogGpsPos;
298 
302 typedef struct _SbgLogGpsHdt
303 {
304  uint32_t timeStamp;
305  uint16_t status;
306  uint32_t timeOfWeek;
307  float heading;
309  float pitch;
311  float baseline;
312 } SbgLogGpsHdt;
313 
317 typedef struct _SbgLogGpsRaw
318 {
319  uint8_t rawBuffer[SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE];
320  size_t bufferSize;
321 } SbgLogGpsRaw;
322 
323 //----------------------------------------------------------------------//
324 //- Operations -//
325 //----------------------------------------------------------------------//
326 
334 
342 
350 
358 
366 
374 
382 
390 
391 #endif
struct _SbgLogGpsPos SbgLogGpsPos
SbgErrorCode sbgEComBinaryLogWriteGpsHdtData(SbgStreamBuffer *pOutputStream, const SbgLogGpsHdt *pInputData)
SBG_INLINE SbgEComGpsVelType sbgEComLogGpsVelGetType(uint32_t status)
#define SBG_ECOM_GPS_VEL_STATUS_SHIFT
SBG_INLINE uint32_t sbgEComLogGpsHdtBuildStatus(SbgEComGpsHdtStatus status, uint32_t masks)
#define SBG_ECOM_GPS_POS_STATUS_MASK
SbgErrorCode sbgEComBinaryLogWriteGpsRawData(SbgStreamBuffer *pOutputStream, const SbgLogGpsRaw *pInputData)
SBG_INLINE SbgEComGpsPosStatus sbgEComLogGpsPosGetStatus(uint32_t status)
Used to read/write data from/to a memory buffer stream.
struct _SbgLogGpsHdt SbgLogGpsHdt
enum _SbgEComGpsPosStatus SbgEComGpsPosStatus
#define SBG_ECOM_GPS_POS_STATUS_SHIFT
SBG_INLINE SbgEComGpsPosType sbgEComLogGpsPosGetType(uint32_t status)
_SbgEComGpsVelStatus
SBG_INLINE uint32_t sbgEComLogGpsVelBuildStatus(SbgEComGpsVelStatus status, SbgEComGpsVelType type)
SBG_INLINE uint32_t sbgEComLogGpsPosBuildStatus(SbgEComGpsPosStatus status, SbgEComGpsPosType type, uint32_t masks)
_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 SbgEComGpsVelStatus sbgEComLogGpsVelGetStatus(uint32_t status)
#define SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE
_SbgEComGpsPosStatus
#define SBG_INLINE
Definition: sbgDefines.h:186
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
#define SBG_ECOM_GPS_VEL_TYPE_MASK
SbgErrorCode sbgEComBinaryLogWriteGpsVelData(SbgStreamBuffer *pOutputStream, const SbgLogGpsVel *pInputData)
enum _SbgEComGpsVelType SbgEComGpsVelType
SBG_INLINE SbgEComGpsHdtStatus sbgEComLogGpsHdtGetStatus(uint32_t status)
enum _SbgErrorCode SbgErrorCode
_SbgEComGpsHdtStatus
SbgErrorCode sbgEComBinaryLogWriteGpsPosData(SbgStreamBuffer *pOutputStream, const SbgLogGpsPos *pInputData)


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