sbgECom
1.11.920-stable
|
This file is used to parse received GPS binary logs. More...
#include <sbgCommon.h>
#include <streamBuffer/sbgStreamBuffer.h>
Go to the source code of this file.
Data Structures | |
struct | _SbgLogGpsVel |
struct | _SbgLogGpsPos |
struct | _SbgLogGpsHdt |
struct | _SbgLogGpsRaw |
Macros | |
#define | SBG_ECOM_GPS_VEL_STATUS_SHIFT (0u) |
#define | SBG_ECOM_GPS_VEL_STATUS_MASK (0x0000003Fu) |
#define | SBG_ECOM_GPS_VEL_TYPE_SHIFT (6u) |
#define | SBG_ECOM_GPS_VEL_TYPE_MASK (0x0000003Fu) |
#define | SBG_ECOM_GPS_POS_STATUS_SHIFT (0u) |
#define | SBG_ECOM_GPS_POS_STATUS_MASK (0x0000003Fu) |
#define | SBG_ECOM_GPS_POS_TYPE_SHIFT (6u) |
#define | SBG_ECOM_GPS_POS_TYPE_MASK (0x0000003Fu) |
#define | SBG_ECOM_GPS_POS_GPS_L1_USED (0x00000001u << 12) |
#define | SBG_ECOM_GPS_POS_GPS_L2_USED (0x00000001u << 13) |
#define | SBG_ECOM_GPS_POS_GPS_L5_USED (0x00000001u << 14) |
#define | SBG_ECOM_GPS_POS_GLO_L1_USED (0x00000001u << 15) |
#define | SBG_ECOM_GPS_POS_GLO_L2_USED (0x00000001u << 16) |
#define | SBG_ECOM_GPS_HDT_STATUS_SHIFT (0u) |
#define | SBG_ECOM_GPS_HDT_STATUS_MASK (0x0000003Fu) |
#define | SBG_ECOM_GPS_HDT_BASELINE_VALID (0x0001 << 6) |
#define | SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE (4086u) |
Typedefs | |
typedef enum _SbgEComGpsVelStatus | SbgEComGpsVelStatus |
typedef enum _SbgEComGpsVelType | SbgEComGpsVelType |
typedef enum _SbgEComGpsPosStatus | SbgEComGpsPosStatus |
typedef enum _SbgEComGpsPosType | SbgEComGpsPosType |
typedef enum _SbgEComGpsHdtStatus | SbgEComGpsHdtStatus |
typedef struct _SbgLogGpsVel | SbgLogGpsVel |
typedef struct _SbgLogGpsPos | SbgLogGpsPos |
typedef struct _SbgLogGpsHdt | SbgLogGpsHdt |
typedef struct _SbgLogGpsRaw | SbgLogGpsRaw |
Enumerations | |
enum | _SbgEComGpsVelStatus { SBG_ECOM_VEL_SOL_COMPUTED = 0, SBG_ECOM_VEL_INSUFFICIENT_OBS = 1, SBG_ECOM_VEL_INTERNAL_ERROR = 2, SBG_ECOM_VEL_LIMIT = 3 } |
enum | _SbgEComGpsVelType { SBG_ECOM_VEL_NO_SOLUTION = 0, SBG_ECOM_VEL_UNKNOWN_TYPE = 1, SBG_ECOM_VEL_DOPPLER = 2, SBG_ECOM_VEL_DIFFERENTIAL = 3 } |
enum | _SbgEComGpsPosStatus { SBG_ECOM_POS_SOL_COMPUTED = 0, SBG_ECOM_POS_INSUFFICIENT_OBS = 1, SBG_ECOM_POS_INTERNAL_ERROR = 2, SBG_ECOM_POS_HEIGHT_LIMIT = 3 } |
enum | _SbgEComGpsPosType { SBG_ECOM_POS_NO_SOLUTION = 0, SBG_ECOM_POS_UNKNOWN_TYPE = 1, SBG_ECOM_POS_SINGLE = 2, SBG_ECOM_POS_PSRDIFF = 3, SBG_ECOM_POS_SBAS = 4, SBG_ECOM_POS_OMNISTAR = 5, SBG_ECOM_POS_RTK_FLOAT = 6, SBG_ECOM_POS_RTK_INT = 7, SBG_ECOM_POS_PPP_FLOAT = 8, SBG_ECOM_POS_PPP_INT = 9, SBG_ECOM_POS_FIXED = 10 } |
enum | _SbgEComGpsHdtStatus { SBG_ECOM_HDT_SOL_COMPUTED = 0, SBG_ECOM_HDT_INSUFFICIENT_OBS = 1, SBG_ECOM_HDT_INTERNAL_ERROR = 2, SBG_ECOM_HDT_HEIGHT_LIMIT = 3 } |
Functions | |
SBG_INLINE SbgEComGpsVelStatus | sbgEComLogGpsVelGetStatus (uint32_t status) |
SBG_INLINE SbgEComGpsVelType | sbgEComLogGpsVelGetType (uint32_t status) |
SBG_INLINE uint32_t | sbgEComLogGpsVelBuildStatus (SbgEComGpsVelStatus status, SbgEComGpsVelType type) |
SBG_INLINE SbgEComGpsPosStatus | sbgEComLogGpsPosGetStatus (uint32_t status) |
SBG_INLINE SbgEComGpsPosType | sbgEComLogGpsPosGetType (uint32_t status) |
SBG_INLINE uint32_t | sbgEComLogGpsPosBuildStatus (SbgEComGpsPosStatus status, SbgEComGpsPosType type, uint32_t masks) |
SBG_INLINE SbgEComGpsHdtStatus | sbgEComLogGpsHdtGetStatus (uint32_t status) |
SBG_INLINE uint32_t | sbgEComLogGpsHdtBuildStatus (SbgEComGpsHdtStatus status, uint32_t masks) |
SbgErrorCode | sbgEComBinaryLogParseGpsVelData (SbgStreamBuffer *pInputStream, SbgLogGpsVel *pOutputData) |
SbgErrorCode | sbgEComBinaryLogWriteGpsVelData (SbgStreamBuffer *pOutputStream, const SbgLogGpsVel *pInputData) |
SbgErrorCode | sbgEComBinaryLogParseGpsPosData (SbgStreamBuffer *pInputStream, SbgLogGpsPos *pOutputData) |
SbgErrorCode | sbgEComBinaryLogWriteGpsPosData (SbgStreamBuffer *pOutputStream, const SbgLogGpsPos *pInputData) |
SbgErrorCode | sbgEComBinaryLogParseGpsHdtData (SbgStreamBuffer *pInputStream, SbgLogGpsHdt *pOutputData) |
SbgErrorCode | sbgEComBinaryLogWriteGpsHdtData (SbgStreamBuffer *pOutputStream, const SbgLogGpsHdt *pInputData) |
SbgErrorCode | sbgEComBinaryLogParseGpsRawData (SbgStreamBuffer *pInputStream, SbgLogGpsRaw *pOutputData) |
SbgErrorCode | sbgEComBinaryLogWriteGpsRawData (SbgStreamBuffer *pOutputStream, const SbgLogGpsRaw *pInputData) |
This file is used to parse received GPS binary logs.
Copyright (C) 2007-2013, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
#define SBG_ECOM_GPS_VEL_STATUS_SHIFT (0u) |
Log GPS velocity status and type definitions.Shift used to extract the GPS velocity status part.
Referenced by sbgEComLogGpsVelBuildStatus(), and sbgEComLogGpsVelGetStatus().
#define SBG_ECOM_GPS_VEL_STATUS_MASK (0x0000003Fu) |
Mask used to keep only the GPS velocity status part.
Referenced by sbgEComLogGpsVelBuildStatus(), and sbgEComLogGpsVelGetStatus().
#define SBG_ECOM_GPS_VEL_TYPE_SHIFT (6u) |
Shift used to extract the GPS velocity type part.
Referenced by sbgEComLogGpsVelBuildStatus(), and sbgEComLogGpsVelGetType().
#define SBG_ECOM_GPS_VEL_TYPE_MASK (0x0000003Fu) |
Mask used to keep only the GPS velocity type part.
Referenced by sbgEComLogGpsVelBuildStatus(), and sbgEComLogGpsVelGetType().
#define SBG_ECOM_GPS_POS_STATUS_SHIFT (0u) |
GPS position status and type definitions.Shift used to extract the GPS position status part.
Referenced by sbgEComLogGpsPosBuildStatus(), and sbgEComLogGpsPosGetStatus().
#define SBG_ECOM_GPS_POS_STATUS_MASK (0x0000003Fu) |
Mask used to keep only the GPS position status part.
Referenced by sbgEComLogGpsPosBuildStatus(), and sbgEComLogGpsPosGetStatus().
#define SBG_ECOM_GPS_POS_TYPE_SHIFT (6u) |
Shift used to extract the GPS position type part.
Referenced by sbgEComLogGpsPosBuildStatus(), and sbgEComLogGpsPosGetType().
#define SBG_ECOM_GPS_POS_TYPE_MASK (0x0000003Fu) |
Mask used to keep only the GPS position type part.
Referenced by sbgEComLogGpsPosBuildStatus(), and sbgEComLogGpsPosGetType().
#define SBG_ECOM_GPS_POS_GPS_L1_USED (0x00000001u << 12) |
GPS position mask definitionsSet to 1 if GPS L1 is used in solution.
#define SBG_ECOM_GPS_POS_GPS_L2_USED (0x00000001u << 13) |
Set to 1 if GPS L2 is used in solution.
#define SBG_ECOM_GPS_POS_GPS_L5_USED (0x00000001u << 14) |
Set to 1 if GPS L5 is used in solution.
#define SBG_ECOM_GPS_POS_GLO_L1_USED (0x00000001u << 15) |
Set to 1 if GLONASS L1 is used in solution.
#define SBG_ECOM_GPS_POS_GLO_L2_USED (0x00000001u << 16) |
Set to 1 if GLONASS L2 is used in solution.
#define SBG_ECOM_GPS_HDT_STATUS_SHIFT (0u) |
GPS HDT status definitions.Shift used to extract the GPS HDT status part.
Referenced by sbgEComLogGpsHdtBuildStatus(), and sbgEComLogGpsHdtGetStatus().
#define SBG_ECOM_GPS_HDT_STATUS_MASK (0x0000003Fu) |
Mask used to keep only the GPS HDT status part.
Referenced by sbgEComLogGpsHdtBuildStatus(), and sbgEComLogGpsHdtGetStatus().
#define SBG_ECOM_GPS_HDT_BASELINE_VALID (0x0001 << 6) |
GPS HDT status bitmasksSet to 1 if the baseline length field is filled and valid.
#define SBG_ECOM_GPS_RAW_MAX_BUFFER_SIZE (4086u) |
Maximum buffer size in bytes that can be stored in the GPS raw log.
typedef enum _SbgEComGpsVelStatus SbgEComGpsVelStatus |
GPS velocity status definitions.
typedef enum _SbgEComGpsVelType SbgEComGpsVelType |
GPS velocity types definitions.
typedef enum _SbgEComGpsPosStatus SbgEComGpsPosStatus |
GPS position status definitions.
typedef enum _SbgEComGpsPosType SbgEComGpsPosType |
GPS position types definitions.
typedef enum _SbgEComGpsHdtStatus SbgEComGpsHdtStatus |
GPS HDT status definitions.
typedef struct _SbgLogGpsVel SbgLogGpsVel |
Structure that stores data for the SBG_ECOM_LOG_GPS::_VEL message.
typedef struct _SbgLogGpsPos SbgLogGpsPos |
Structure that stores data for the SBG_ECOM_LOG_GPS::_POS message.
typedef struct _SbgLogGpsHdt SbgLogGpsHdt |
Structure that stores data for the SBG_ECOM_LOG_GPS::_HDT message.
typedef struct _SbgLogGpsRaw SbgLogGpsRaw |
Structure that stores data for the SBG_ECOM_LOG_GPS::_RAW message.
enum _SbgEComGpsVelStatus |
enum _SbgEComGpsVelType |
GPS velocity types definitions.
enum _SbgEComGpsPosStatus |
enum _SbgEComGpsPosType |
GPS position types definitions.
enum _SbgEComGpsHdtStatus |
SBG_INLINE SbgEComGpsVelStatus sbgEComLogGpsVelGetStatus | ( | uint32_t | status | ) |
Method used to read GPS velocity status from a status field.
[in] | status | Status uint32_t value to extract the velocity status from it. |
References SBG_ECOM_GPS_VEL_STATUS_MASK, and SBG_ECOM_GPS_VEL_STATUS_SHIFT.
SBG_INLINE SbgEComGpsVelType sbgEComLogGpsVelGetType | ( | uint32_t | status | ) |
Method used to read GPS velocity type from a status field.
[in] | status | Status uint32_t value to extract the velocity type from it. |
References SBG_ECOM_GPS_VEL_TYPE_MASK, and SBG_ECOM_GPS_VEL_TYPE_SHIFT.
SBG_INLINE uint32_t sbgEComLogGpsVelBuildStatus | ( | SbgEComGpsVelStatus | status, |
SbgEComGpsVelType | type | ||
) |
Method used to write the GPS velocity status to a status field.
[in] | status | The velocity status to set. |
[in] | type | The velocity type to set. |
References SBG_ECOM_GPS_VEL_STATUS_MASK, SBG_ECOM_GPS_VEL_STATUS_SHIFT, SBG_ECOM_GPS_VEL_TYPE_MASK, and SBG_ECOM_GPS_VEL_TYPE_SHIFT.
SBG_INLINE SbgEComGpsPosStatus sbgEComLogGpsPosGetStatus | ( | uint32_t | status | ) |
Method used to read GPS position status from a status field.
[in] | status | Status uint32_t value to extract the position status from it. |
References SBG_ECOM_GPS_POS_STATUS_MASK, and SBG_ECOM_GPS_POS_STATUS_SHIFT.
SBG_INLINE SbgEComGpsPosType sbgEComLogGpsPosGetType | ( | uint32_t | status | ) |
Method used to read GPS position type from a status field.
[in] | status | Status uint32_t value to extract the position type from it. |
References SBG_ECOM_GPS_POS_TYPE_MASK, and SBG_ECOM_GPS_POS_TYPE_SHIFT.
SBG_INLINE uint32_t sbgEComLogGpsPosBuildStatus | ( | SbgEComGpsPosStatus | status, |
SbgEComGpsPosType | type, | ||
uint32_t | masks | ||
) |
Method used to write the GPS position status to a status field.
[in] | status | The position status to set. |
[in] | type | The position type to set. |
[in] | masks | Bit mask to set. |
References SBG_ECOM_GPS_POS_STATUS_MASK, SBG_ECOM_GPS_POS_STATUS_SHIFT, SBG_ECOM_GPS_POS_TYPE_MASK, and SBG_ECOM_GPS_POS_TYPE_SHIFT.
SBG_INLINE SbgEComGpsHdtStatus sbgEComLogGpsHdtGetStatus | ( | uint32_t | status | ) |
Method used to read GPS HDT status from a status field.
[in] | status | Status uint32_t value to extract the HDT status from it. |
References SBG_ECOM_GPS_HDT_STATUS_MASK, and SBG_ECOM_GPS_HDT_STATUS_SHIFT.
SBG_INLINE uint32_t sbgEComLogGpsHdtBuildStatus | ( | SbgEComGpsHdtStatus | status, |
uint32_t | masks | ||
) |
Method used to write the GPS HDT status to a status field.
[in] | status | The HDT status to set. |
[in] | masks | Bit mask to set. |
References SBG_ECOM_GPS_HDT_STATUS_MASK, and SBG_ECOM_GPS_HDT_STATUS_SHIFT.
SbgErrorCode sbgEComBinaryLogParseGpsVelData | ( | SbgStreamBuffer * | pInputStream, |
SbgLogGpsVel * | pOutputData | ||
) |
Parse data for the SBG_ECOM_LOG_GPS::_VEL message and fill the corresponding structure.
[in] | pInputStream | Input stream buffer to read the payload from. |
[out] | pOutputData | Pointer on the output structure that stores parsed data. |
SbgErrorCode sbgEComBinaryLogWriteGpsVelData | ( | SbgStreamBuffer * | pOutputStream, |
const SbgLogGpsVel * | pInputData | ||
) |
Write data for the SBG_ECOM_LOG_GPS::_VEL message to the output stream buffer from the provided structure.
[out] | pOutputStream | Output stream buffer to write the payload to. |
[in] | pInputData | Pointer on the input structure that stores data to write. |
SbgErrorCode sbgEComBinaryLogParseGpsPosData | ( | SbgStreamBuffer * | pInputStream, |
SbgLogGpsPos * | pOutputData | ||
) |
Parse data for the SBG_ECOM_LOG_GPS::_POS message and fill the corresponding structure.
[in] | pInputStream | Input stream buffer to read the payload from. |
[out] | pOutputData | Pointer on the output structure that stores parsed data. |
SbgErrorCode sbgEComBinaryLogWriteGpsPosData | ( | SbgStreamBuffer * | pOutputStream, |
const SbgLogGpsPos * | pInputData | ||
) |
Write data for the SBG_ECOM_LOG_GPS::_POS message to the output stream buffer from the provided structure.
[out] | pOutputStream | Output stream buffer to write the payload to. |
[in] | pInputData | Pointer on the input structure that stores data to write. |
SbgErrorCode sbgEComBinaryLogParseGpsHdtData | ( | SbgStreamBuffer * | pInputStream, |
SbgLogGpsHdt * | pOutputData | ||
) |
Parse data for the SBG_ECOM_LOG_GPS::_HDT message and fill the corresponding structure.
[in] | pInputStream | Input stream buffer to read the payload from. |
[out] | pOutputData | Pointer on the output structure that stores parsed data. |
SbgErrorCode sbgEComBinaryLogWriteGpsHdtData | ( | SbgStreamBuffer * | pOutputStream, |
const SbgLogGpsHdt * | pInputData | ||
) |
Write data for the SBG_ECOM_LOG_GPS::_HDT message to the output stream buffer from the provided structure.
[out] | pOutputStream | Output stream buffer to write the payload to. |
[in] | pInputData | Pointer on the input structure that stores data to write. |
SbgErrorCode sbgEComBinaryLogParseGpsRawData | ( | SbgStreamBuffer * | pInputStream, |
SbgLogGpsRaw * | pOutputData | ||
) |
Parse data for the SBG_ECOM_LOG_GPS::_RAW message and fill the corresponding structure.
[in] | pInputStream | Input stream buffer to read the payload from. |
[out] | pOutputData | Pointer on the output structure that stores parsed data. |
SbgErrorCode sbgEComBinaryLogWriteGpsRawData | ( | SbgStreamBuffer * | pOutputStream, |
const SbgLogGpsRaw * | pInputData | ||
) |
Write data for the SBG_ECOM_LOG_GPS::_RAW message to the output stream buffer from the provided structure.
[out] | pOutputStream | Output stream buffer to write the payload to. |
[in] | pInputData | Pointer on the input structure that stores data to write. |