sbgECom Library  6.0.4661-stable
Interface SBG Systems IMU/AHRS/INS
Loading...
Searching...
No Matches
sbgEComLogEkfStatus.h File Reference

Parse logs used to report EKF filter status. More...

Go to the source code of this file.

Data Structures

struct  _SbgEComLogEkfStatus
 

Macros

#define SBG_EKF_STATUS_ROLL_PITCH_VALID   (0x0001u << 0)
 
#define SBG_EKF_STATUS_HEADING_VALID   (0x0001u << 1)
 
#define SBG_EKF_STATUS_VELOCITY_VALID   (0x0001u << 2)
 
#define SBG_EKF_STATUS_POSITION_VALID   (0x0001u << 3)
 
#define SBG_EKF_STATUS_ALIGN_VALID   (0x0001u << 4)
 
#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_TIME   (0x0001u << 3)
 
#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_BEHAVIOR   (0x0001u << 4)
 
#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_SOLUTION   (0x0001u << 5)
 
#define SBG_EKF_STATUS_AIDING_VERTICAL_REF_USED   (0x00000001u << 0)
 
#define SBG_EKF_STATUS_AIDING_ZUPT_USED   (0x00000001u << 1)
 
#define SBG_EKF_STATUS_AIDING_ZARU_USED   (0x00000001u << 2)
 
#define SBG_EKF_STATUS_AIDING_MOTION_CONSTRAINT_USED   (0x00000001u << 3)
 
#define SBG_EKF_STATUS_AIDING_MAGNETOMETER_USED   (0x00000001u << 4)
 
#define SBG_EKF_STATUS_AIDING_GNSS1_VEL_USED   (0x00000001u << 5)
 
#define SBG_EKF_STATUS_AIDING_GNSS1_POS_USED   (0x00000001u << 6)
 
#define SBG_EKF_STATUS_AIDING_GNSS1_HDT_USED   (0x00000001u << 7)
 
#define SBG_EKF_STATUS_AIDING_GNSS2_VEL_USED   (0x00000001u << 8)
 
#define SBG_EKF_STATUS_AIDING_GNSS2_POS_USED   (0x00000001u << 9)
 
#define SBG_EKF_STATUS_AIDING_GNSS2_HDT_USED   (0x00000001u << 10)
 
#define SBG_EKF_STATUS_AIDING_ODO_USED   (0x00000001u << 11)
 
#define SBG_EKF_STATUS_AIDING_DVL_BT_USED   (0x00000001u << 12)
 
#define SBG_EKF_STATUS_AIDING_DVL_WT_USED   (0x00000001u << 13)
 
#define SBG_EKF_STATUS_AIDING_USBL_USED   (0x00000001u << 14)
 
#define SBG_EKF_STATUS_AIDING_DEPTH_USED   (0x00000001u << 15)
 
#define SBG_EKF_STATUS_AIDING_AIRSPEED_USED   (0x00000001u << 16)
 
#define SBG_EKF_STATUS_AIDING_BARO_USED   (0x00000001u << 17)
 
#define SBG_EKF_STATUS_AIDING_GENERIC_VEL1_USED   (0x00000001u << 18)
 
#define SBG_EKF_STATUS_AIDING_GENERIC_POS1_USED   (0x00000001u << 19)
 

Typedefs

typedef enum _SbgEComEkfStatusSolutionType SbgEComEkfStatusSolutionType
 
typedef enum _SbgEComEkfStatusNavSafety SbgEComEkfStatusNavSafety
 
typedef enum _SbgEComEkfStatusSpoofing SbgEComEkfStatusSpoofing
 
typedef struct _SbgEComLogEkfStatus SbgEComLogEkfStatus
 

Enumerations

enum  _SbgEComEkfStatusSolutionType {
  SBG_EKF_STATUS_SOLUTION_TYPE_INVALID = 0 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_VG = 1 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_AHRS = 2 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_INERTIAL = 3 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_MOTION_CONSTRAINT = 4 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_ZUPT = 5 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_GNSS_VEL = 6 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_GNSS_UNKNOWN = 7 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_SINGLE_POINT = 8 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_DGPS = 9 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_SBAS = 10 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_RTK_FLOAT = 11 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_RTK_FIXED = 12 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_PPP_FLOAT = 13 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_PPP_FIXED = 14 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_ODO = 15 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_DVL = 16 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_USBL = 17 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_AIRSPEED = 18 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_VEL1 = 19 ,
  SBG_EKF_STATUS_SOLUTION_TYPE_NAV_POS1 = 20
}
 
enum  _SbgEComEkfStatusNavSafety {
  SBG_EKF_STATUS_NAV_SAFETY_UNKNOWN = 0 ,
  SBG_EKF_STATUS_NAV_NOMINAL = 1 ,
  SBG_EKF_STATUS_NAV_MITIGATED = 2 ,
  SBG_EKF_STATUS_NAV_UNPROTECTED = 3
}
 
enum  _SbgEComEkfStatusSpoofing {
  SBG_EKF_STATUS_SPOOFING_UNKNOWN = 0 ,
  SBG_EKF_STATUS_SPOOFING_RELIABLE = 1 ,
  SBG_EKF_STATUS_SPOOFING_INDICATED = 2 ,
  SBG_EKF_STATUS_SPOOFING_CONFIRMED = 3
}
 

Functions

SbgErrorCode sbgEComLogEkfStatusReadFromStream (SbgEComLogEkfStatus *pLogData, SbgStreamBuffer *pStreamBuffer)
 
SbgErrorCode sbgEComLogEkfStatusWriteToStream (const SbgEComLogEkfStatus *pLogData, SbgStreamBuffer *pStreamBuffer)
 
void sbgEComLogEkfStatusConstruct (SbgEComLogEkfStatus *pLogData)
 
void sbgEComLogEkfStatusSetNavSafety (SbgEComLogEkfStatus *pLogData, SbgEComEkfStatusNavSafety navSafety)
 
SbgEComEkfStatusNavSafety sbgEComLogEkfStatusGetNavSafety (const SbgEComLogEkfStatus *pLogData)
 
void sbgEComLogEkfStatusSetGnss1SpoofingIndicator (SbgEComLogEkfStatus *pLogData, SbgEComEkfStatusSpoofing spoofing)
 
SbgEComEkfStatusSpoofing sbgEComLogEkfStatusGetGnss1SpoofingIndicator (const SbgEComLogEkfStatus *pLogData)
 
void sbgEComLogEkfStatusSetGnss2SpoofingIndicator (SbgEComLogEkfStatus *pLogData, SbgEComEkfStatusSpoofing spoofing)
 
SbgEComEkfStatusSpoofing sbgEComLogEkfStatusGetGnss2SpoofingIndicator (const SbgEComLogEkfStatus *pLogData)
 

Detailed Description

Parse logs used to report EKF filter status.

Author
SBG Systems
Date
March 19, 2026
License

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.

Macro Definition Documentation

◆ SBG_EKF_STATUS_ROLL_PITCH_VALID

#define SBG_EKF_STATUS_ROLL_PITCH_VALID   (0x0001u << 0)

Set if attitude data is reliable (Roll/Pitch error within defined criteria).

◆ SBG_EKF_STATUS_HEADING_VALID

#define SBG_EKF_STATUS_HEADING_VALID   (0x0001u << 1)

Set if heading data is reliable (Heading error within defined criteria).

◆ SBG_EKF_STATUS_VELOCITY_VALID

#define SBG_EKF_STATUS_VELOCITY_VALID   (0x0001u << 2)

Set if velocity data is reliable (Velocity error within defined criteria).

◆ SBG_EKF_STATUS_POSITION_VALID

#define SBG_EKF_STATUS_POSITION_VALID   (0x0001u << 3)

Set if position data is reliable (Position error within defined criteria).

◆ SBG_EKF_STATUS_ALIGN_VALID

#define SBG_EKF_STATUS_ALIGN_VALID   (0x0001u << 4)

Set if the INS is aligned and sensor error estimation has converged enough to trust the solution.

◆ SBG_EKF_STATUS_GNSS_SPOOFING_SRC_TIME

#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_TIME   (0x0001u << 3)

Set if GNSS reports inconsistent time information.

◆ SBG_EKF_STATUS_GNSS_SPOOFING_SRC_BEHAVIOR

#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_BEHAVIOR   (0x0001u << 4)

Set if GNSS exhibits abnormal behavior consistent with spoofing.

◆ SBG_EKF_STATUS_GNSS_SPOOFING_SRC_SOLUTION

#define SBG_EKF_STATUS_GNSS_SPOOFING_SRC_SOLUTION   (0x0001u << 5)

Set if the GNSS PVT solution is inconsistent with the INS solution.

◆ SBG_EKF_STATUS_AIDING_VERTICAL_REF_USED

#define SBG_EKF_STATUS_AIDING_VERTICAL_REF_USED   (0x00000001u << 0)

Set if the vertical reference is used in the solution.

◆ SBG_EKF_STATUS_AIDING_ZUPT_USED

#define SBG_EKF_STATUS_AIDING_ZUPT_USED   (0x00000001u << 1)

Set if a Zero Velocity Update (ZUPT) is is used in the solution.

◆ SBG_EKF_STATUS_AIDING_ZARU_USED

#define SBG_EKF_STATUS_AIDING_ZARU_USED   (0x00000001u << 2)

Set if a Zero Angular Rate Update (ZARU) is used in the solution.

◆ SBG_EKF_STATUS_AIDING_MOTION_CONSTRAINT_USED

#define SBG_EKF_STATUS_AIDING_MOTION_CONSTRAINT_USED   (0x00000001u << 3)

Set if vehicle motion constraints are used in the solution.

◆ SBG_EKF_STATUS_AIDING_MAGNETOMETER_USED

#define SBG_EKF_STATUS_AIDING_MAGNETOMETER_USED   (0x00000001u << 4)

Set if the magnetometer is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS1_VEL_USED

#define SBG_EKF_STATUS_AIDING_GNSS1_VEL_USED   (0x00000001u << 5)

Set if GNSS 1 velocity is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS1_POS_USED

#define SBG_EKF_STATUS_AIDING_GNSS1_POS_USED   (0x00000001u << 6)

Set if GNSS 1 position is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS1_HDT_USED

#define SBG_EKF_STATUS_AIDING_GNSS1_HDT_USED   (0x00000001u << 7)

Set if GNSS 1 true heading is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS2_VEL_USED

#define SBG_EKF_STATUS_AIDING_GNSS2_VEL_USED   (0x00000001u << 8)

Set if GNSS 2 velocity is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS2_POS_USED

#define SBG_EKF_STATUS_AIDING_GNSS2_POS_USED   (0x00000001u << 9)

Set if GNSS 2 position is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GNSS2_HDT_USED

#define SBG_EKF_STATUS_AIDING_GNSS2_HDT_USED   (0x00000001u << 10)

Set if GNSS 2 true heading is used in the solution.

◆ SBG_EKF_STATUS_AIDING_ODO_USED

#define SBG_EKF_STATUS_AIDING_ODO_USED   (0x00000001u << 11)

Set if odometer velocity is used in the solution.

◆ SBG_EKF_STATUS_AIDING_DVL_BT_USED

#define SBG_EKF_STATUS_AIDING_DVL_BT_USED   (0x00000001u << 12)

Set if DVL bottom-track velocity is used in the solution.

◆ SBG_EKF_STATUS_AIDING_DVL_WT_USED

#define SBG_EKF_STATUS_AIDING_DVL_WT_USED   (0x00000001u << 13)

Set if DVL water-track velocity is used in the solution.

◆ SBG_EKF_STATUS_AIDING_USBL_USED

#define SBG_EKF_STATUS_AIDING_USBL_USED   (0x00000001u << 14)

Set if USBL position is used in the solution.

◆ SBG_EKF_STATUS_AIDING_DEPTH_USED

#define SBG_EKF_STATUS_AIDING_DEPTH_USED   (0x00000001u << 15)

Set if depth is used in the solution.

◆ SBG_EKF_STATUS_AIDING_AIRSPEED_USED

#define SBG_EKF_STATUS_AIDING_AIRSPEED_USED   (0x00000001u << 16)

Set if true airspeed is used in the solution.

◆ SBG_EKF_STATUS_AIDING_BARO_USED

#define SBG_EKF_STATUS_AIDING_BARO_USED   (0x00000001u << 17)

Set if barometric altitude is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GENERIC_VEL1_USED

#define SBG_EKF_STATUS_AIDING_GENERIC_VEL1_USED   (0x00000001u << 18)

Set if generic velocity 1 is used in the solution.

◆ SBG_EKF_STATUS_AIDING_GENERIC_POS1_USED

#define SBG_EKF_STATUS_AIDING_GENERIC_POS1_USED   (0x00000001u << 19)

Set if generic position 1 is used in the solution.

Typedef Documentation

◆ SbgEComEkfStatusSolutionType

◆ SbgEComEkfStatusNavSafety

Navigation safety indicator.

◆ SbgEComEkfStatusSpoofing

Spoofing indicator.

◆ SbgEComLogEkfStatus

Stores EKF filter status data.

Enumeration Type Documentation

◆ _SbgEComEkfStatusSolutionType

Solution types.

Enumerator
SBG_EKF_STATUS_SOLUTION_TYPE_INVALID 

EKF is not initialized. All outputs are invalid.

SBG_EKF_STATUS_SOLUTION_TYPE_VG 

Vertical gyro mode with roll and pitch estimated from the vertical reference.

SBG_EKF_STATUS_SOLUTION_TYPE_AHRS 

AHRS mode with roll, pitch, and heading estimated from magnetometers, dual-GNSS heading, or gyro-compassing.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_INERTIAL 

Full INS solution using inertial data only.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_MOTION_CONSTRAINT 

Full INS solution using vehicle motion constraints.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_ZUPT 

Full INS solution using Zero Velocity Updates (ZUPT).

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_GNSS_VEL 

Full INS solution using GNSS velocity.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_GNSS_UNKNOWN 

Full INS solution using GNSS position of unknown type.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_SINGLE_POINT 

Full INS solution using GNSS single-point position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_DGPS 

Full INS solution using GNSS DGPS position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_SBAS 

Full INS solution using GNSS SBAS position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_RTK_FLOAT 

Full INS solution using GNSS RTK with float position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_RTK_FIXED 

Full INS solution using GNSS RTK with fixed position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_PPP_FLOAT 

Full INS solution using GNSS PPP with float position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_PPP_FIXED 

Full INS solution using GNSS PPP with fixed position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_ODO 

Full INS solution using odometer velocity.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_DVL 

Full INS solution using DVL velocity.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_USBL 

Full INS solution using USBL position.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_AIRSPEED 

Full INS solution using true airspeed.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_VEL1 

Full INS solution using generic velocity 1.

SBG_EKF_STATUS_SOLUTION_TYPE_NAV_POS1 

Full INS solution using generic position 1.

◆ _SbgEComEkfStatusNavSafety

Navigation safety indicator.

Enumerator
SBG_EKF_STATUS_NAV_SAFETY_UNKNOWN 

Safety cannot be assessed. Anti-spoofing is disabled, or navigation uncertainty is too high to reliably detect or mitigate spoofing.

SBG_EKF_STATUS_NAV_NOMINAL 

No spoofing is detected, and navigation operates under nominal conditions.

SBG_EKF_STATUS_NAV_MITIGATED 

Spoofing is detected or suspected, but navigation remains protected thanks to mitigation using inertial and/or other aiding sources.

SBG_EKF_STATUS_NAV_UNPROTECTED 

Navigation is operating with limited or no spoofing mitigation capability (e.g. due to high uncertainty, or insufficient aiding).

◆ _SbgEComEkfStatusSpoofing

Spoofing indicator.

Enumerator
SBG_EKF_STATUS_SPOOFING_UNKNOWN 

Undetermined spoofing status.

SBG_EKF_STATUS_SPOOFING_RELIABLE 

GNSS solution is considered as reliable.

SBG_EKF_STATUS_SPOOFING_INDICATED 

One spoofing detector indicated potential spoofing event.

SBG_EKF_STATUS_SPOOFING_CONFIRMED 

Multiple indications of spoofing.

Function Documentation

◆ sbgEComLogEkfStatusReadFromStream()

SbgErrorCode sbgEComLogEkfStatusReadFromStream ( SbgEComLogEkfStatus * pLogData,
SbgStreamBuffer * pStreamBuffer )

Parse data for the SBG_ECOM_LOG_EKF_STATUS message and fill the corresponding structure.

Parameters
[out]pLogDataLog structure instance to fill.
[in]pStreamBufferInput stream buffer to read the log from.
Returns
SBG_NO_ERROR if a valid log has been read from the stream buffer.

◆ sbgEComLogEkfStatusWriteToStream()

SbgErrorCode sbgEComLogEkfStatusWriteToStream ( const SbgEComLogEkfStatus * pLogData,
SbgStreamBuffer * pStreamBuffer )

Write data for the SBG_ECOM_LOG_EKF_STATUS message to the output stream buffer from the provided structure.

Parameters
[in]pLogDataLog structure instance to write.
[out]pStreamBufferOutput stream buffer to write the log to.
Returns
SBG_NO_ERROR if the log has been written to the stream buffer.

◆ sbgEComLogEkfStatusConstruct()

void sbgEComLogEkfStatusConstruct ( SbgEComLogEkfStatus * pLogData)

Construct an empty / zero initialized instance.

Parameters
[in]pLogDataLog instance.

◆ sbgEComLogEkfStatusSetNavSafety()

void sbgEComLogEkfStatusSetNavSafety ( SbgEComLogEkfStatus * pLogData,
SbgEComEkfStatusNavSafety navSafety )

Set the navigation safety indicator.

Parameters
[in]pLogDataLog instance.
[in]navSafetyThe navigation safety indicator to set.

◆ sbgEComLogEkfStatusGetNavSafety()

SbgEComEkfStatusNavSafety sbgEComLogEkfStatusGetNavSafety ( const SbgEComLogEkfStatus * pLogData)

Returns the navigation safety indicator.

Parameters
[in]pLogDataLog instance.
Returns
The navigation safety indicator.

◆ sbgEComLogEkfStatusSetGnss1SpoofingIndicator()

void sbgEComLogEkfStatusSetGnss1SpoofingIndicator ( SbgEComLogEkfStatus * pLogData,
SbgEComEkfStatusSpoofing spoofing )

Set the GNSS 1 spoofing indicator.

Parameters
[in]pLogDataLog instance.
[in]spoofingThe GNSS 1 spoofing indicator to set.

◆ sbgEComLogEkfStatusGetGnss1SpoofingIndicator()

SbgEComEkfStatusSpoofing sbgEComLogEkfStatusGetGnss1SpoofingIndicator ( const SbgEComLogEkfStatus * pLogData)

Returns the GNSS 1 spoofing indicator.

Parameters
[in]pLogDataLog instance.
Returns
The GNSS 1 spoofing indicator.

◆ sbgEComLogEkfStatusSetGnss2SpoofingIndicator()

void sbgEComLogEkfStatusSetGnss2SpoofingIndicator ( SbgEComLogEkfStatus * pLogData,
SbgEComEkfStatusSpoofing spoofing )

Set the GNSS 2 spoofing indicator.

Parameters
[in]pLogDataLog instance.
[in]spoofingThe GNSS 2 spoofing indicator to set.

◆ sbgEComLogEkfStatusGetGnss2SpoofingIndicator()

SbgEComEkfStatusSpoofing sbgEComLogEkfStatusGetGnss2SpoofingIndicator ( const SbgEComLogEkfStatus * pLogData)

Returns the GNSS 2 spoofing indicator.

Parameters
[in]pLogDataLog instance.
Returns
The GNSS 2 spoofing indicator.