sbgECom Library
4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
|
Parse logs used to report device UTC time. More...
Go to the source code of this file.
Data Structures | |
struct | _SbgEComLogUtc |
Typedefs | |
typedef enum _SbgEComClockState | SbgEComClockState |
typedef enum _SbgEComUtcStatus | SbgEComUtcStatus |
typedef struct _SbgEComLogUtc | SbgEComLogUtc |
Enumerations | |
enum | _SbgEComClockState { SBG_ECOM_CLOCK_STATE_ERROR = 0 , SBG_ECOM_CLOCK_STATE_FREE_RUNNING = 1 , SBG_ECOM_CLOCK_STATE_STEERING = 2 , SBG_ECOM_CLOCK_STATE_VALID = 3 } |
enum | _SbgEComUtcStatus { SBG_ECOM_UTC_STATUS_INVALID = 0 , SBG_ECOM_UTC_STATUS_NO_LEAP_SEC = 1 , SBG_ECOM_UTC_STATUS_INITIALIZED = 2 } |
Parse logs used to report device UTC time.
The MIT license
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
typedef enum _SbgEComClockState SbgEComClockState |
Internal clock alignment to PPS algorithm state.
typedef enum _SbgEComUtcStatus SbgEComUtcStatus |
Status for the GNSS UTC time information.
typedef struct _SbgEComLogUtc SbgEComLogUtc |
Structure that stores data for the SBG_ECOM_LOG_UTC_TIME message.
enum _SbgEComClockState |
Internal clock alignment to PPS algorithm state.
enum _SbgEComUtcStatus |
Status for the GNSS UTC time information.
void sbgEComLogUtcZeroInit | ( | SbgEComLogUtc * | pLogData | ) |
Zero initialize the message struct.
[out] | pLogData | Structure instance to zero init. |
SbgErrorCode sbgEComLogUtcReadFromStream | ( | SbgEComLogUtc * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Parse data for the SBG_ECOM_LOG_UTC_DATA message and fill the corresponding structure.
[out] | pLogData | Log structure instance to fill. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogUtcWriteToStream | ( | const SbgEComLogUtc * | pLogData, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write data for the SBG_ECOM_LOG_UTC_DATA message to the output stream buffer from the provided structure.
[in] | pLogData | Log structure instance to write. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
void sbgEComLogUtcSetClockState | ( | SbgEComLogUtc * | pLogData, |
SbgEComClockState | state | ||
) |
Set the clock alignment state.
[in] | pLogData | Log instance. |
[in] | state | The status to set. |
SbgEComClockState sbgEComLogUtcGetClockState | ( | const SbgEComLogUtc * | pLogData | ) |
Returns the clock alignment state.
[in] | pLogData | Log instance. |
const char* sbgEComLogUtcGetClockStateAsString | ( | const SbgEComLogUtc * | pLogData | ) |
Returns the clock alignment state as a NULL terminated C string.
[in] | pLogData | Log instance. |
void sbgEComLogUtcSetUtcStatus | ( | SbgEComLogUtc * | pLogData, |
SbgEComUtcStatus | status | ||
) |
Set the UTC time information status.
[in] | pLogData | Log instance. |
[in] | status | The status to set. |
SbgEComUtcStatus sbgEComLogUtcGetUtcStatus | ( | const SbgEComLogUtc * | pLogData | ) |
Returns the GNSS UTC time information status.
[in] | pLogData | Log instance. |
const char* sbgEComLogUtcGetUtcStatusAsString | ( | const SbgEComLogUtc * | pLogData | ) |
Returns the GNSS UTC time information status as a NULL terminated C string.
[in] | pLogData | Log instance. |
void sbgEComLogUtcSetHasClockInput | ( | SbgEComLogUtc * | pLogData, |
bool | hasClockInput | ||
) |
Set if a valid PPS signal is received and can be used to align the internal clock.
[in] | pLogData | Log instance. |
[in] | hasClockInput | true if a valid PPS signal is received. |
bool sbgEComLogUtcHasClockInput | ( | const SbgEComLogUtc * | pLogData | ) |
Returns true if a valid and stable PPS signal is being received to align the INS clock.
Use this status to determine if the INS is constantly correcting the clock with a PPS signal or propagating the clock with its internal crystal using latest estimated bias and scale factor corrections.
During nominal INS operations with good GNSS reception, this method should return true. During GNSS outages, no PPS signal is received and this method should return false.
[in] | pLogData | Log instance. |
void sbgEComLogUtcTimeSetIsAccurate | ( | SbgEComLogUtc * | pLogData, |
bool | utcIsAccurate | ||
) |
Set if the reported UTC time is accurate or not (ie timestamped with a PPS).
[in] | pLogData | Log instance. |
[in] | utcIsAccurate | true if the UTC time is accurate or false otherwise. |
bool sbgEComLogUtcTimeIsAccurate | ( | const SbgEComLogUtc * | pLogData | ) |
Returns true if the UTC time information is considered to be accurate.
The PPS signal is used to compensate for processing and transmission delays to precisely timestamp the received UTC time information.
During nominal INS operations with good GNSS reception, this method should return true.
If the PPS signal is lost for too much time, this method should return false indicating a degraded UTC time information accuracy.
[in] | pLogData | Log instance. |
bool sbgEComLogUtcTimeClkBiasStdIsValid | ( | const SbgEComLogUtc * | pLogData | ) |
Returns true if the clkBiasStd field is filled and valid.
[in] | pLogData | Log instance. |
bool sbgEComLogUtcTimeClkSfErrorStdIsValid | ( | const SbgEComLogUtc * | pLogData | ) |
Returns true if the clkSfErrorStd field is filled and valid.
[in] | pLogData | Log instance. |
bool sbgEComLogUtcTimeClkResidualErrorIsValid | ( | const SbgEComLogUtc * | pLogData | ) |
Returns true if the clkResidualError field is filled and valid.
[in] | pLogData | Log instance. |