sbgECom Library
4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
|
Parse space vehicles in view information log. More...
Go to the source code of this file.
Data Structures | |
struct | _SbgEComLogSatSignal |
struct | _SbgEComLogSatEntry |
struct | _SbgEComLogSatList |
Macros | |
#define | SBG_ECOM_SAT_MAX_NR_SATELLITES (64) |
#define | SBG_ECOM_SAT_MAX_NR_SIGNALS (8) |
Typedefs | |
typedef enum _SbgEComSatTrackingStatus | SbgEComSatTrackingStatus |
typedef enum _SbgEComSatHealthStatus | SbgEComSatHealthStatus |
typedef enum _SbgEComSatElevationStatus | SbgEComSatElevationStatus |
typedef struct _SbgEComLogSatSignal | SbgEComLogSatSignal |
typedef struct _SbgEComLogSatEntry | SbgEComLogSatEntry |
typedef struct _SbgEComLogSatList | SbgEComLogSatList |
Parse space vehicles in view information log.
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.
#define SBG_ECOM_SAT_MAX_NR_SATELLITES (64) |
Maximum number of satellites in a satellite group.
#define SBG_ECOM_SAT_MAX_NR_SIGNALS (8) |
Maximum number of signals per satellite.
typedef enum _SbgEComSatTrackingStatus SbgEComSatTrackingStatus |
Tracking status.
The tracking status embeds the solution status when the latter is known.
All values must be strictly lower than 8.
These are on-the-wire values.
typedef enum _SbgEComSatHealthStatus SbgEComSatHealthStatus |
Health status.
All values must be strictly lower than 4.
These are on-the-wire values.
typedef enum _SbgEComSatElevationStatus SbgEComSatElevationStatus |
Elevation status.
All values must be strictly lower than 4.
These are on-the-wire values.
typedef struct _SbgEComLogSatSignal SbgEComLogSatSignal |
Information and status for a single signal for a Satellite.
The flags include the SNR available, health and tracking statuses.
typedef struct _SbgEComLogSatEntry SbgEComLogSatEntry |
Information and status for a single satellite.
The flags include the constellation ID, the elevation status, the health status, and the tracking status.
Satellite data and signal data each have their own health and tracking statuses. The statuses of satellite data may be a priority-based summary of the statuses of signal data, or they may reflect information that is limited to a satellite and unavailable for its signals.
The priority rules are :
For example, if satellite data have an unknown tracking status, and have three signals, one with the searching status, another with the tracking and not used status, and the last with the tracking and used status, the satellite data tracking status will be tracking and used. But if those satellite data are initially set with a healthy health status, and all three signals added have the unknown health status, the satellite data health status remains healthy.
typedef struct _SbgEComLogSatList SbgEComLogSatList |
List of visible satellites.
Tracking status.
The tracking status embeds the solution status when the latter is known.
All values must be strictly lower than 8.
These are on-the-wire values.
Health status.
All values must be strictly lower than 4.
These are on-the-wire values.
Elevation status.
All values must be strictly lower than 4.
These are on-the-wire values.
const char* sbgEComLogSatSignalGetSignalIdAsStr | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Get a signal id as a read only C string.
[in] | pSignalData | Signal data. |
bool sbgEComLogSatSignalSnrIsValid | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Returns true if the SNR value is valid.
[in] | pSignalData | Signal data. |
SbgEComSatHealthStatus sbgEComLogSatSignalGetHealthStatus | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Get the health status of signal data.
[in] | pSignalData | Signal data. |
const char* sbgEComLogSatSignalGetHealthStatusAsStr | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Get the health status of signal data as a read only C string.
[in] | pSignalData | Signal data. |
SbgEComSatTrackingStatus sbgEComLogSatSignalGetTrackingStatus | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Get the tracking status of signal data.
[in] | pSignalData | Signal data. |
const char* sbgEComLogSatSignalGetTrackingStatusAsStr | ( | const SbgEComLogSatSignal * | pSignalData | ) |
Get the tracking status of signal data as a read only C string.
[in] | pSignalData | Signal data. |
SbgEComLogSatSignal* sbgEComLogSatEntryAdd | ( | SbgEComLogSatEntry * | pSatData, |
SbgEComSignalId | id, | ||
SbgEComSatHealthStatus | healthStatus, | ||
SbgEComSatTrackingStatus | trackingStatus, | ||
bool | snrValid, | ||
uint8_t | snr | ||
) |
Add signal data to satellite data.
The health and tracking statuses of the satellite data are updated according to their respective priority rules.
[in] | pSatData | Satellite data. |
[in] | id | Signal ID. |
[in] | healthStatus | Health status. |
[in] | trackingStatus | Tracking status. |
[in] | snrValid | Set to true if the SNR value is valid. |
[in] | snr | Signal-to-noise ratio, in dB. |
SbgEComLogSatSignal* sbgEComLogSatEntryGet | ( | SbgEComLogSatEntry * | pSatData, |
SbgEComSignalId | id | ||
) |
Get signal data from satellite data.
[in] | pSatData | Satellite data. |
[in] | id | Signal ID. |
SbgEComConstellationId sbgEComLogSatEntryGetConstellationId | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the constellation ID of satellite data.
[in] | pSatData | Satellite data. |
const char* sbgEComLogSatEntryGetConstellationIdAsStr | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the constellation ID of satellite data as a read only C string.
[in] | pSatData | Satellite data. |
SbgEComSatElevationStatus sbgEComLogSatEntryGetElevationStatus | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the elevation status of satellite data.
[in] | pSatData | Satellite data. |
const char* sbgEComLogSatEntryGetElevationStatusAsStr | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the elevation status of satellite data as a read only C string.
[in] | pSatData | Satellite data. |
SbgEComSatHealthStatus sbgEComLogSatEntryGetHealthStatus | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the health status of satellite data.
[in] | pSatData | Satellite data. |
const char* sbgEComLogSatEntryGetHealthStatusAsStr | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the health status of satellite data as a read only C string.
[in] | pSatData | Satellite data. |
SbgEComSatTrackingStatus sbgEComLogSatEntryGetTrackingStatus | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the tracking status of satellite data.
[in] | pSatData | Satellite data. |
const char* sbgEComLogSatEntryGetTrackingStatusAsStr | ( | const SbgEComLogSatEntry * | pSatData | ) |
Get the tracking status of satellite data as a read only C string.
[in] | pSatData | Satellite data. |
void sbgEComLogSatListConstruct | ( | SbgEComLogSatList * | pSatList, |
uint32_t | timeStamp | ||
) |
Satellite list constructor.
[in] | pSatList | Satellite list instance. |
[in] | timeStamp | Time stamp, in us. |
SbgEComLogSatEntry* sbgEComLogSatListAdd | ( | SbgEComLogSatList * | pSatList, |
uint8_t | id, | ||
int8_t | elevation, | ||
uint16_t | azimuth, | ||
SbgEComConstellationId | constellationId, | ||
SbgEComSatElevationStatus | elevationStatus, | ||
SbgEComSatHealthStatus | healthStatus, | ||
SbgEComSatTrackingStatus | trackingStatus | ||
) |
Add a satellite entry to the list of satellites.
[in] | pSatList | Satellite list instance. |
[in] | id | Satellite ID. |
[in] | elevation | Elevation, in degrees. |
[in] | azimuth | Azimuth, in degrees. |
[in] | constellationId | Constellation ID. |
[in] | elevationStatus | Elevation status. |
[in] | healthStatus | Health status. |
[in] | trackingStatus | Tracking status. |
SbgErrorCode sbgEComLogSatListReadFromStream | ( | SbgEComLogSatList * | pSatList, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Parse data for the SBG_ECOM_LOG_GPS::_SAT message and fill the corresponding structure.
[out] | pSatList | Satellite list instance. |
[in] | pStreamBuffer | Input stream buffer to read the log from. |
SbgErrorCode sbgEComLogSatListWriteToStream | ( | const SbgEComLogSatList * | pSatList, |
SbgStreamBuffer * | pStreamBuffer | ||
) |
Write data for the SBG_ECOM_LOG_GPS::_SAT message to the output stream buffer from the provided structure.
[in] | pSatList | Satellite list instance. |
[out] | pStreamBuffer | Output stream buffer to write the log to. |
SbgEComLogSatEntry* sbgEComLogSatListGet | ( | SbgEComLogSatList * | pSatList, |
uint8_t | id | ||
) |
Get a satellite entry from its ID.
[in] | pSatList | Satellite list instance. |
[in] | id | Satellite ID. |