le_gnss API Reference
Files | |
file | le_gnss_common.h |
file | le_gnss_interface.h |
Macros | |
#define | LE_GNSS_SUPL_SERVER_URL_MAX_LEN 256 |
#define | LE_GNSS_SUPL_SERVER_URL_MAX_BYTES 257 |
#define | LE_GNSS_SUPL_CERTIFICATE_MAX_LEN 2000 |
#define | LE_GNSS_SUPL_CERTIFICATE_MAX_BYTES 2001 |
#define | LE_GNSS_SV_INFO_MAX_LEN 80 |
#define | LE_GNSS_NMEA_SENTENCES_MAX 32505855 |
#define | LE_GNSS_MIN_ELEVATION_MAX_DEGREE 90 |
#define | LE_GNSS_PRN_OFFSET_GPS 0 |
#define | LE_GNSS_PRN_OFFSET_SBAS 87 |
#define | LE_GNSS_PRN_OFFSET_GLONASS -64 |
#define | LE_GNSS_PRN_OFFSET_GALILEO -300 |
#define | LE_GNSS_PRN_OFFSET_BEIDOU -200 |
#define | LE_GNSS_PRN_OFFSET_QZSS 0 |
#define | LE_GNSS_CONSTELLATION_GPS 0x1 |
North American satellite navigation system. More... | |
#define | LE_GNSS_CONSTELLATION_GLONASS 0x2 |
Russian satellite navigation system. | |
#define | LE_GNSS_CONSTELLATION_BEIDOU 0x4 |
Chinese satellite navigation system. | |
#define | LE_GNSS_CONSTELLATION_GALILEO 0x8 |
European Union satellite navigation system. | |
#define | LE_GNSS_CONSTELLATION_SBAS 0x10 |
#define | LE_GNSS_CONSTELLATION_QZSS 0x20 |
Japanese satellite navigation system. | |
#define | LE_GNSS_NMEA_MASK_GPGGA 0x1 |
#define | LE_GNSS_NMEA_MASK_GPGSA 0x2 |
#define | LE_GNSS_NMEA_MASK_GPGSV 0x4 |
#define | LE_GNSS_NMEA_MASK_GPRMC 0x8 |
#define | LE_GNSS_NMEA_MASK_GPVTG 0x10 |
#define | LE_GNSS_NMEA_MASK_GLGSV 0x20 |
#define | LE_GNSS_NMEA_MASK_GNGNS 0x40 |
#define | LE_GNSS_NMEA_MASK_GNGSA 0x80 |
#define | LE_GNSS_NMEA_MASK_GAGGA 0x100 |
#define | LE_GNSS_NMEA_MASK_GAGSA 0x200 |
#define | LE_GNSS_NMEA_MASK_GAGSV 0x400 |
#define | LE_GNSS_NMEA_MASK_GARMC 0x800 |
#define | LE_GNSS_NMEA_MASK_GAVTG 0x1000 |
#define | LE_GNSS_NMEA_MASK_PSTIS 0x2000 |
#define | LE_GNSS_NMEA_MASK_REMOVED 0x4000 |
#define | LE_GNSS_NMEA_MASK_PTYPE 0x8000 |
#define | LE_GNSS_NMEA_MASK_GPGRS 0x10000 |
#define | LE_GNSS_NMEA_MASK_GPGLL 0x20000 |
#define | LE_GNSS_NMEA_MASK_DEBUG 0x40000 |
#define | LE_GNSS_NMEA_MASK_GPDTM 0x80000 |
#define | LE_GNSS_NMEA_MASK_GAGNS 0x100000 |
#define | LE_GNSS_NMEA_MASK_GPGNS 0x200000 |
#define | LE_GNSS_NMEA_MASK_GPGST 0x400000 |
#define | LE_GNSS_NMEA_MASK_GPZDA 0x800000 |
#define | LE_GNSS_NMEA_MASK_PSIDX 0x1000000 |
Typedefs | |
typedef struct le_gnss_Sample * | le_gnss_SampleRef_t |
typedef uint32_t | le_gnss_ConstellationBitMask_t |
typedef uint32_t | le_gnss_NmeaBitMask_t |
typedef struct le_gnss_PositionHandler * | le_gnss_PositionHandlerRef_t |
typedef void(* | le_gnss_PositionHandlerFunc_t) (le_gnss_SampleRef_t positionSampleRef, void *contextPtr) |
typedef void(* | le_gnss_DisconnectHandler_t) (void *) |
Detailed Description
Macro Definition Documentation
◆ LE_GNSS_CONSTELLATION_GPS
#define LE_GNSS_CONSTELLATION_GPS 0x1 |
North American satellite navigation system.
GNSS constellation Bit Mask (8 bits) indicating the GNSS constellation(s) used in solution.
◆ LE_GNSS_MIN_ELEVATION_MAX_DEGREE
#define LE_GNSS_MIN_ELEVATION_MAX_DEGREE 90 |
Define the maximal degree for the minimal elevation
◆ LE_GNSS_NMEA_MASK_GPGGA
#define LE_GNSS_NMEA_MASK_GPGGA 0x1 |
NMEA sentences Bit Mask indicating the NMEA sentences enabled in the NMEA flow.
- Warning
- The supported NMEA sentences depend on the platform. Please refer to your platform documentation for further details.
- Note
- The bit mask values should be coherent with LE_GNSS_NMEA_SENTENCES_MAX
◆ LE_GNSS_NMEA_SENTENCES_MAX
#define LE_GNSS_NMEA_SENTENCES_MAX 32505855 |
Define the maximal bit mask for enabled NMEA sentences
- Note
- This maximal value should be coherent with le_gnss_NmeaBitMask_t
◆ LE_GNSS_PRN_OFFSET_GPS
#define LE_GNSS_PRN_OFFSET_GPS 0 |
Satellite Vehicle (SV) ID to PRN offset definitions
- Note
- SV ID is given both in le_gnss_GetSatellitesInfo() API and NMEA flow. Its corresponding PRN code can be computed adding the following offset according to its constellation.
◆ LE_GNSS_SUPL_CERTIFICATE_MAX_BYTES
#define LE_GNSS_SUPL_CERTIFICATE_MAX_BYTES 2001 |
Maximum SUPL certificate string size. One extra byte is added for the null character.
◆ LE_GNSS_SUPL_CERTIFICATE_MAX_LEN
#define LE_GNSS_SUPL_CERTIFICATE_MAX_LEN 2000 |
Maximum SUPL certificate size.
◆ LE_GNSS_SUPL_SERVER_URL_MAX_BYTES
#define LE_GNSS_SUPL_SERVER_URL_MAX_BYTES 257 |
Maximum length of the SUP Server URL string. One extra byte is added for the null character.
◆ LE_GNSS_SUPL_SERVER_URL_MAX_LEN
#define LE_GNSS_SUPL_SERVER_URL_MAX_LEN 256 |
Maximum length of the SUP Server URL string.
◆ LE_GNSS_SV_INFO_MAX_LEN
#define LE_GNSS_SV_INFO_MAX_LEN 80 |
Define the maximum length of the Satellites Vehicle information list
Typedef Documentation
◆ le_gnss_DisconnectHandler_t
typedef void(* le_gnss_DisconnectHandler_t) (void *) |
Type for handler called when a server disconnects.
◆ le_gnss_PositionHandlerFunc_t
typedef void(* le_gnss_PositionHandlerFunc_t) (le_gnss_SampleRef_t positionSampleRef, void *contextPtr) |
Handler for position information.
◆ le_gnss_PositionHandlerRef_t
typedef struct le_gnss_PositionHandler* le_gnss_PositionHandlerRef_t |
Reference type used by Add/Remove functions for EVENT 'le_gnss_Position'
◆ le_gnss_SampleRef_t
typedef struct le_gnss_Sample* le_gnss_SampleRef_t |
Reference type for dealing with GNSS position samples.
Enumeration Type Documentation
◆ le_gnss_AssistedMode_t
◆ le_gnss_Constellation_t
GNSS constellation type.
◆ le_gnss_ConstellationArea_t
◆ le_gnss_CoordinateSystem_t
◆ le_gnss_DataType_t
enum le_gnss_DataType_t |
◆ le_gnss_DopType_t
enum le_gnss_DopType_t |
◆ le_gnss_FixState_t
enum le_gnss_FixState_t |
◆ le_gnss_LocationDataType_t
◆ le_gnss_Resolution_t
enum le_gnss_Resolution_t |
◆ le_gnss_SbasConstellationCategory_t
SBAS constellation category
◆ le_gnss_StartMode_t
enum le_gnss_StartMode_t |
◆ le_gnss_State_t
enum le_gnss_State_t |
Function Documentation
◆ le_gnss_AddPositionHandler()
le_gnss_PositionHandlerRef_t le_gnss_AddPositionHandler | ( | le_gnss_PositionHandlerFunc_t | handlerPtr, |
void * | contextPtr | ||
) |
Add handler function for EVENT 'le_gnss_Position'
This event provides information on position.
- A handler reference, which is only needed for later removal of the handler.
- Note
- Doesn't return on failure, so there's no need to check the return value for errors.
- Parameters
-
[in] handlerPtr [in] contextPtr
◆ le_gnss_ConnectService()
void le_gnss_ConnectService | ( | void | ) |
Connect the current client thread to the service providing this API. Block until the service is available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client Specific Functions.
This function is created automatically.
◆ le_gnss_ConvertDataCoordinateSystem()
le_result_t le_gnss_ConvertDataCoordinateSystem | ( | le_gnss_CoordinateSystem_t | coordinateSrc, |
le_gnss_CoordinateSystem_t | coordinateDst, | ||
le_gnss_LocationDataType_t | locationDataType, | ||
int64_t | locationDataSrc, | ||
int64_t * | locationDataDstPtr | ||
) |
This function converts a location data parameter from/to multi-coordinate system
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_BAD_PARAMETER Invalid parameter provided.
- LE_UNSUPPORTED request not supported
- Note
- The resolution of location data parameter remains unchanged after the conversion.
- Parameters
-
[in] coordinateSrc Coordinate system to convert from. [in] coordinateDst Coordinate system to convert to. [in] locationDataType Type of location data to convert. [in] locationDataSrc Data to convert. [out] locationDataDstPtr Converted Data.
◆ le_gnss_DeleteSuplCertificate()
le_result_t le_gnss_DeleteSuplCertificate | ( | uint8_t | suplCertificateId | ) |
This function deletes the SUPL certificate.
- Returns
- LE_OK on success
- LE_BAD_PARAMETER on invalid parameter
- LE_FAULT on failure
- LE_BUSY service is busy
- LE_TIMEOUT a time-out occurred
- Parameters
-
[in] suplCertificateId ID of the SUPL certificate. Certificate ID range is 0 to 9
◆ le_gnss_Disable()
le_result_t le_gnss_Disable | ( | void | ) |
This function disables the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_DUPLICATE If the GNSS device is already disabled.
- LE_NOT_PERMITTED If the GNSS device is not initialized or started.
- LE_OK The function succeeded.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
◆ le_gnss_DisableExtendedEphemerisFile()
le_result_t le_gnss_DisableExtendedEphemerisFile | ( | void | ) |
This function disables the use of the 'Extended Ephemeris' file into the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_OK The function succeeded.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
◆ le_gnss_DisableExternalLna()
le_result_t le_gnss_DisableExternalLna | ( | void | ) |
Disables the EXT_GPS_LNA_EN signal
- Returns
- LE_OK Function succeeded.
- LE_NOT_PERMITTED GNSS is not in the ready state
- LE_UNSUPPORTED Function not supported on this platform
◆ le_gnss_DisconnectService()
void le_gnss_DisconnectService | ( | void | ) |
Disconnect the current client thread from the service providing this API.
Normally, this function doesn't need to be called. After this function is called, there's no longer a connection to the service, and the functions in this API can't be used. For details, see Client Specific Functions.
This function is created automatically.
◆ le_gnss_DownloadExtendedEphemeris()
le_result_t le_gnss_DownloadExtendedEphemeris | ( | uint32_t | days | ) |
This function must be called to download an Assisted GNSS data from server
- Returns
- LE_FAULT The function failed to download 'predicted Ephemeris' data from server.
- LE_OK The function succeeded.
- Parameters
-
[in] days extended ephemeris data for number of days
◆ le_gnss_Enable()
le_result_t le_gnss_Enable | ( | void | ) |
This function enables the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_DUPLICATE If the GNSS device is already enabled.
- LE_NOT_PERMITTED If the GNSS device is not initialized.
- LE_OK The function succeeded.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
◆ le_gnss_EnableExtendedEphemerisFile()
le_result_t le_gnss_EnableExtendedEphemerisFile | ( | void | ) |
This function enables the use of the 'Extended Ephemeris' file into the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_OK The function succeeded.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
◆ le_gnss_EnableExternalLna()
le_result_t le_gnss_EnableExternalLna | ( | void | ) |
Enables the EXT_GPS_LNA_EN signal
- Returns
- LE_OK Function succeeded.
- LE_NOT_PERMITTED GNSS is not in the ready state
- LE_UNSUPPORTED Function not supported on this platform
- Note
- The EXT_GPS_LNA_EN signal will be set high when the GNSS state is active
◆ le_gnss_ForceColdRestart()
le_result_t le_gnss_ForceColdRestart | ( | void | ) |
This function performs a "COLD" restart of the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
- LE_OK The function succeeded.
◆ le_gnss_ForceFactoryRestart()
le_result_t le_gnss_ForceFactoryRestart | ( | void | ) |
This function performs a "FACTORY" restart of the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
- LE_OK The function succeeded.
◆ le_gnss_ForceHotRestart()
le_result_t le_gnss_ForceHotRestart | ( | void | ) |
This function performs a "HOT" restart of the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
- LE_OK The function succeeded.
This API can be used to restart the GNSS device. It is equivalent calling le_gnss_Stop() and le_gnss_Start().
◆ le_gnss_ForceWarmRestart()
le_result_t le_gnss_ForceWarmRestart | ( | void | ) |
This function performs a "WARM" restart of the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
- LE_OK The function succeeded.
This API has a platform dependent feature. Please refer to GNSS WARM restart for further details.
◆ le_gnss_GetAcquisitionRate()
le_result_t le_gnss_GetAcquisitionRate | ( | uint32_t * | ratePtr | ) |
This function gets the GNSS device acquisition rate.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
- Note
- If the caller is passing a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[out] ratePtr Acquisition rate in milliseconds.
◆ le_gnss_GetAltitude()
le_result_t le_gnss_GetAltitude | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | altitudePtr, | ||
int32_t * | vAccuracyPtr | ||
) |
Get the position sample's altitude.
- Returns
- LE_FAULT Function failed to get the altitude. Invalid Position reference provided.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (set to INT32_MAX).
- LE_OK Function succeeded.
- Note
- Altitude is in meters, above Mean Sea Level, with 3 decimal places (3047 = 3.047 meters).
- For a 2D position fix, the altitude will be indicated as invalid and set to INT32_MAX
-
Vertical position accuracy is default set to meters with 1 decimal place (3047 = 3.0 meters). To change its accuracy, call the
le_gnss_SetDataResolution()
function. Vertical position accuracy is set as data type and accuracy from 0 to 3 decimal place is set as resolution. - In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with INT32_MAX.
- If the caller is passing an invalid Position reference into this function, it is a fatal error, the function will not return.
- altitudePtr, altitudeAccuracyPtr can be set to NULL if not needed.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] altitudePtr Altitude in meters, above Mean Sea Level [resolution 1e-3]. [out] vAccuracyPtr Vertical position's accuracy in meters.
◆ le_gnss_GetAltitudeOnWgs84()
le_result_t le_gnss_GetAltitudeOnWgs84 | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | altitudeOnWgs84Ptr | ||
) |
Get the position sample's altitude with respect to the WGS-84 ellipsoid
- Returns
- LE_FAULT Function failed to get the altitude.
- LE_OUT_OF_RANGE The altitudeOnWgs84 is invalid (set to INT32_MAX).
- LE_OK Function succeeded.
- Note
- altitudeOnWgs84 is in meters, with respect to the WGS-84 ellipsoid with 3 decimal places (3047 = 3.047 meters).
- For a 2D position fix, the altitude with respect to the WGS-84 ellipsoid will be indicated as invalid and set to INT32_MAX.
- If the caller is passing an invalid Position reference or a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] altitudeOnWgs84Ptr Altitude in meters, between WGS-84 earth ellipsoid and mean sea level [resolution 1e-3].
◆ le_gnss_GetConstellation()
le_result_t le_gnss_GetConstellation | ( | le_gnss_ConstellationBitMask_t * | constellationMaskPtr | ) |
Get the GNSS constellation bit mask
- Returns
- LE_OK on success
- LE_FAULT on failure
- Note
- If the caller is passing a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[out] constellationMaskPtr GNSS constellation used in solution.
◆ le_gnss_GetConstellationArea()
le_result_t le_gnss_GetConstellationArea | ( | le_gnss_Constellation_t | satConstellation, |
le_gnss_ConstellationArea_t * | constellationAreaPtr | ||
) |
Get the area for the GNSS constellation
- Returns
- LE_OK On success
- LE_FAULT On failure
- LE_UNSUPPORTED Request not supported
- LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
- Note
- If the caller is passing a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] satConstellation GNSS constellation type. [out] constellationAreaPtr GNSS constellation area.
◆ le_gnss_GetDate()
le_result_t le_gnss_GetDate | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | yearPtr, | ||
uint16_t * | monthPtr, | ||
uint16_t * | dayPtr | ||
) |
Get the position sample's date.
- Returns
- LE_FAULT Function failed to get the date.
- LE_OUT_OF_RANGE The retrieved date is invalid (all fields are set to 0).
- LE_OK Function succeeded.
- Note
- If the caller is passing an invalid Position sample reference or null pointers into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] yearPtr UTC Year A.D. [e.g. 2014]. [out] monthPtr UTC Month into the year [range 1...12]. [out] dayPtr UTC Days into the month [range 1...31].
◆ le_gnss_GetDilutionOfPrecision()
le_result_t le_gnss_GetDilutionOfPrecision | ( | le_gnss_SampleRef_t | positionSampleRef, |
le_gnss_DopType_t | dopType, | ||
uint16_t * | dopPtr | ||
) |
Get the DOP parameter (Dilution Of Precision) for the fixed position.
- Returns
- LE_FAULT Function failed to find the DOP value.
- LE_OUT_OF_RANGE The retrieved parameter is invalid (set to UINT16_MAX).
- LE_OK Function succeeded.
- Note
- The DOP value is given with 3 decimal places by default like: DOP value 2200 = 2.200 The resolution can be modified by calling the
le_gnss_SetDopResolution()
function. - If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [in] dopType Dilution of Precision type [range 0..5]. [out] dopPtr Dilution of Precision corresponding to the dopType
◆ le_gnss_GetDirection()
le_result_t le_gnss_GetDirection | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | directionPtr, | ||
uint32_t * | directionAccuracyPtr | ||
) |
Get the position sample's direction. Direction of movement is the direction that the vehicle or person is actually moving.
- Returns
- LE_FAULT Function failed to find the positionSample.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (set to UINT32_MAX).
- LE_OK Function succeeded.
- Note
- Direction and direction accuracy are given in degrees with 1 decimal place: 1755 = 175.5 degrees. Direction ranges from 0 to 359.9 degrees, where 0 is True North.
- In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with UINT32_MAX.
- directionPtr, directionAccuracyPtr can be set to NULL if not needed.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] directionPtr Direction in degrees [resolution 1e-1]. Range: 0 to 359.9, where 0 is True North [out] directionAccuracyPtr Direction's accuracy estimate in degrees [resolution 1e-1].
◆ le_gnss_GetEllipticalUncertainty()
le_result_t le_gnss_GetEllipticalUncertainty | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | horUncEllipseSemiMajorPtr, | ||
uint32_t * | horUncEllipseSemiMinorPtr, | ||
uint8_t * | horConfidencePtr | ||
) |
Get the semi-major and semi-minor horizontal elliptical uncertainty.
- Returns
- LE_FAULT Function failed to get the horizontal uncertainty data.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (more info below).
- LE_OK Function succeeded.
- Note
- horUncEllipseSemiMajorPtr, horUncEllipseSemiMinorPtr and horConfidencePtr can be set to NULL if not needed.
- The uncertainty values are given in metres with 2 decimal places.
- The confidence level is given in an integer percentage with values ranging from 0 to 99.
- In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with UINT32_MAX or UINT8_MAX respective to their individual types.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] horUncEllipseSemiMajorPtr Horizontal semi major elliptical uncertainty [out] horUncEllipseSemiMinorPtr Horizontal semi minor elliptical uncertainity [out] horConfidencePtr Horizontal confidence level.
◆ le_gnss_GetEpochTime()
le_result_t le_gnss_GetEpochTime | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint64_t * | millisecondsPtr | ||
) |
Get the position sample's epoch time.
- Returns
- LE_FAULT Function failed to acquire the epoch time.
- LE_OK Function succeeded.
- LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
- Note
- The epoch time is the number of seconds elapsed since January 1, 1970 (midnight UTC/GMT), not counting leaps seconds.
- If the caller is passing an invalid position sample reference or a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] millisecondsPtr Milliseconds since Jan. 1, 1970.
◆ le_gnss_GetExtendedEphemerisValidity()
le_result_t le_gnss_GetExtendedEphemerisValidity | ( | uint64_t * | startTimePtr, |
uint64_t * | stopTimePtr | ||
) |
This function must be called to get the validity of the last injected Extended Ephemeris.
- Returns
- LE_FAULT The function failed to get the validity
- LE_OK The function succeeded.
- Note
- If the caller is passing an invalid Position sample reference or null pointers into this function, it is a fatal error, the function will not return.
- Parameters
-
[out] startTimePtr Start time in seconds (since Jan. 1, 1970) [out] stopTimePtr Stop time in seconds (since Jan. 1, 1970)
◆ le_gnss_GetExternalLna()
le_result_t le_gnss_GetExternalLna | ( | uint8_t * | lnaStatusPtr | ) |
Read the EXT_GPS_LNA_EN status
- Returns
- LE_OK Function succeeded.
- LE_NOT_PERMITTED GNSS is not in the ready state
- LE_UNSUPPORTED Function not supported on this platform
- Parameters
-
[out] lnaStatusPtr GNSS LNA Status
◆ le_gnss_GetGpsLeapSeconds()
le_result_t le_gnss_GetGpsLeapSeconds | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint8_t * | leapSecondsPtr | ||
) |
Get the position sample's UTC leap seconds in advance
- Returns
- LE_FAULT Function failed to get the leap seconds.
- LE_OUT_OF_RANGE The retrieved time accuracy is invalid (set to UINT8_MAX).
- LE_OK Function succeeded.
- Note
- The leap seconds in advance is the accumulated time in seconds since the start of GPS Epoch time (Jan 6, 1980). This value has to be added to the UTC time (since Jan. 1, 1970)
- Insertion of each UTC leap second is usually decided about six months in advance by the International Earth Rotation and Reference Systems Service (IERS).
- If the caller is passing an invalid position sample reference or a null pointer into this function, it is a fatal error, the function will not return.
- Deprecated:
- This function is deprecated, le_gnss_GetLeapSeconds should be used instead.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] leapSecondsPtr UTC leap seconds in advance in seconds
◆ le_gnss_GetGpsTime()
le_result_t le_gnss_GetGpsTime | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | gpsWeekPtr, | ||
uint32_t * | gpsTimeOfWeekPtr | ||
) |
Get the position sample's GPS time.
- Returns
- LE_FAULT Function failed to get the time.
- LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
- LE_OK Function succeeded.
- Note
- If the caller is passing an invalid Position sample reference or null pointers into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] gpsWeekPtr GPS week number from midnight, Jan. 6, 1980. [out] gpsTimeOfWeekPtr Amount of time in milliseconds into the GPS week.
◆ le_gnss_GetHorizontalSpeed()
le_result_t le_gnss_GetHorizontalSpeed | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | hspeedPtr, | ||
uint32_t * | hspeedAccuracyPtr | ||
) |
Get the position sample's horizontal speed.
- LE_FAULT Function failed to find the positionSample.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (set to UINT32_MAX).
- LE_OK Function succeeded.
- Note
- hSpeedPtr, hSpeedAccuracyPtr can be set to NULL if not needed.
- Horizontal speed is in meters/second with 2 decimal places (3047 = 30.47 meters/second).
-
Horizontal speed accuracy estimate is default set to meters/second with 1 decimal place (304 = 30.4 meters/second). To change its accuracy, call the
le_gnss_SetDataResolution()
function. Horizontal speed accuracy estimate is set as data type and accuracy from 0 to 3 decimal place is set as resolution. - In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with UINT32_MAX.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Warning
- The Horizontal speed accuracy is platform dependent. Please refer to Horizontal and Vertical speed accuracies section for full details.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] hspeedPtr Horizontal speed in meters/second [resolution 1e-2]. [out] hspeedAccuracyPtr Horizontal speed's accuracy estimate in meters/second.
◆ le_gnss_GetLastSampleRef()
le_gnss_SampleRef_t le_gnss_GetLastSampleRef | ( | void | ) |
This function gets the last updated position sample object reference.
- Returns
- A reference to last Position's sample.
- Note
- On failure, the process exits, so you don't have to worry about checking the returned reference for validity.
◆ le_gnss_GetLeapSeconds()
le_result_t le_gnss_GetLeapSeconds | ( | uint64_t * | gpsTimePtr, |
int32_t * | currentLeapSecondsPtr, | ||
uint64_t * | changeEventTimePtr, | ||
int32_t * | nextLeapSecondsPtr | ||
) |
Get leap seconds information.
- Returns
- LE_OK Function succeeded.
- LE_FAULT Function failed to get the data.
- LE_TIMEOUT Timeout occured.
- LE_UNSUPPORTED Not supported on this platform.
- Note
- Insertion of each UTC leap second is usually decided about six months in advance by the International Earth Rotation and Reference Systems Service (IERS).
- If the caller is passing a null pointer into this function, it is considered a fatal error and the function will not return.
- If the return value of a parameter is INT32_MAX/UINT64_MAX, the parameter is not valid.
- Parameters
-
[out] gpsTimePtr The number of milliseconds of GPS time since midnight, Jan. 6, 1980. [out] currentLeapSecondsPtr Current UTC leap seconds value in milliseconds. [out] changeEventTimePtr The number of milliseconds since midnight, Jan. 6, 1980 to the next leap seconds change event. [out] nextLeapSecondsPtr UTC leap seconds value to be applied at the change event time in milliseconds.
◆ le_gnss_GetLocation()
le_result_t le_gnss_GetLocation | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | latitudePtr, | ||
int32_t * | longitudePtr, | ||
int32_t * | hAccuracyPtr | ||
) |
Get the location's data (Latitude, Longitude, Horizontal accuracy).
- Returns
- LE_FAULT Function failed to get the location's data
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (set to INT32_MAX).
- LE_OK Function succeeded.
- Note
- latitudePtr, longitudePtr and hAccuracyPtr can be set to NULL if not needed.
- The latitude and longitude values are based on the WGS84 standard coordinate system.
- The latitude and longitude values are given in degrees with 6 decimal places like: Latitude +48858300 = 48.858300 degrees North Longitude +2294400 = 2.294400 degrees East (The latitude and longitude values are given in degrees, minutes, seconds in NMEA frame)
- In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with INT32_MAX.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] latitudePtr WGS84 Latitude in degrees, positive North [resolution 1e-6]. [out] longitudePtr WGS84 Longitude in degrees, positive East [resolution 1e-6]. [out] hAccuracyPtr Horizontal position's accuracy in meters [resolution 1e-2].
◆ le_gnss_GetMagneticDeviation()
le_result_t le_gnss_GetMagneticDeviation | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | magneticDeviationPtr | ||
) |
Get the position sample's magnetic deviation. It is the difference between the bearing to true north and the bearing shown on a magnetic compass. The deviation is positive when the magnetic north is east of true north.
- Returns
- LE_FAULT Function failed to find the positionSample.
- LE_OUT_OF_RANGE The magneticDeviation is invalid (set to INT32_MAX).
- LE_OK Function succeeded.
- Note
- magneticDeviation is in degrees, with 1 decimal places (47 = 4.7 degree).
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] magneticDeviationPtr MagneticDeviation in degrees [resolution 1e-1].
◆ le_gnss_GetMaxNmeaRate()
le_result_t le_gnss_GetMaxNmeaRate | ( | uint32_t * | maxNmeaRatePtr | ) |
Get the maximum NMEA rate supported on this platform
- Returns
- LE_OK Function succeeded.
- LE_UNSUPPORTED Function not supported on this platform
- Parameters
-
[out] maxNmeaRatePtr Maximum NMEA rate in milliseconds.
◆ le_gnss_GetMinElevation()
le_result_t le_gnss_GetMinElevation | ( | uint8_t * | minElevationPtrPtr | ) |
This function gets the GNSS minimum elevation.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_UNSUPPORTED request not supported
- Note
- If the caller is passing n null pointer to this function, it is a fatal error, the function will not return.
- Parameters
-
[out] minElevationPtrPtr Minimum elevation in degrees [range 0..90].
◆ le_gnss_GetMinNmeaRate()
le_result_t le_gnss_GetMinNmeaRate | ( | uint32_t * | minNmeaRatePtr | ) |
Get the minimum NMEA rate supported on this platform
- Returns
- LE_OK Function succeeded.
- LE_UNSUPPORTED Function not supported on this platform
- Parameters
-
[out] minNmeaRatePtr Minimum NMEA rate in milliseconds.
◆ le_gnss_GetNmeaSentences()
le_result_t le_gnss_GetNmeaSentences | ( | le_gnss_NmeaBitMask_t * | nmeaMaskPtrPtr | ) |
This function gets the bit mask for the enabled NMEA sentences.
- Returns
- LE_OK Success
- LE_FAULT Failure
- LE_BUSY Service is busy
- LE_TIMEOUT Timeout occurred
- LE_NOT_PERMITTED GNSS device is not in "ready" state
- Note
- If the caller is passing a null pointer to this function, it is a fatal error, the function will not return.
- Some NMEA sentences are unsupported depending on the platform. Please refer to Enabled NMEA sentences section for full details. The bit mask for an unset or unsupported NMEA sentence is zero.
- Parameters
-
[out] nmeaMaskPtrPtr Bit mask for enabled NMEA sentences.
◆ le_gnss_GetPositionState()
le_result_t le_gnss_GetPositionState | ( | le_gnss_SampleRef_t | positionSampleRef, |
le_gnss_FixState_t * | statePtr | ||
) |
This function gets the position sample's fix state
- LE_OK on success
- LE_FAULT on failure
- Note
- If the caller is passing an invalid Position sample reference or a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] statePtr Position fix state.
◆ le_gnss_GetSatellitesInfo()
le_result_t le_gnss_GetSatellitesInfo | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | satIdPtr, | ||
size_t * | satIdSizePtr, | ||
le_gnss_Constellation_t * | satConstPtr, | ||
size_t * | satConstSizePtr, | ||
bool * | satUsedPtr, | ||
size_t * | satUsedSizePtr, | ||
uint8_t * | satSnrPtr, | ||
size_t * | satSnrSizePtr, | ||
uint16_t * | satAzimPtr, | ||
size_t * | satAzimSizePtr, | ||
uint8_t * | satElevPtr, | ||
size_t * | satElevSizePtr | ||
) |
Get the Satellites Vehicle information.
- Returns
- LE_FAULT Function failed to find the positionSample.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid.
- LE_OK Function succeeded.
- Note
- satId[] can be set to 0 if that information list index is not configured, so all satellite parameters (satConst[], satSnr[],satAzim[], satElev[]) are fixed to 0.
- For LE_OUT_OF_RANGE returned code, invalid value depends on field type: UINT16_MAX for satId, LE_GNSS_SV_CONSTELLATION_UNDEFINED for satConst, false for satUsed, UINT8_MAX for satSnr, UINT16_MAX for satAzim, UINT8_MAX for satElev.
- In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] satIdPtr Satellites in View ID number, referring to NMEA standard. [in,out] satIdSizePtr [out] satConstPtr GNSS constellation type. [in,out] satConstSizePtr [out] satUsedPtr TRUE if satellite in View Used for Navigation. [in,out] satUsedSizePtr [out] satSnrPtr Satellites in View Signal To Noise Ratio (C/No) [dBHz]. [in,out] satSnrSizePtr [out] satAzimPtr Satellites in View Azimuth [degrees]. Range: 0 to 360 If Azimuth angle is currently unknown, the value is set to UINT16_MAX. [in,out] satAzimSizePtr [out] satElevPtr Satellites in View Elevation [degrees]. Range: 0 to 90 If Elevation angle is currently unknown, the value is set to UINT8_MAX. [in,out] satElevSizePtr
◆ le_gnss_GetSatellitesStatus()
le_result_t le_gnss_GetSatellitesStatus | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint8_t * | satsInViewCountPtr, | ||
uint8_t * | satsTrackingCountPtr, | ||
uint8_t * | satsUsedCountPtr | ||
) |
Get the Satellites Vehicle status.
- Returns
- LE_FAULT Function failed to find the positionSample.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is invalid (set to UINT8_MAX).
- LE_OK Function succeeded.
- Note
- In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with UINT8_MAX.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] satsInViewCountPtr Number of satellites expected to be in view. [out] satsTrackingCountPtr Number of satellites in view, when tracking. [out] satsUsedCountPtr Number of satellites in view used for Navigation.
◆ le_gnss_GetSbasConstellationCategory()
le_gnss_SbasConstellationCategory_t le_gnss_GetSbasConstellationCategory | ( | uint16_t | satId | ) |
Get the SBAS constellation category given the SBAS satellite number ID.
- Parameters
-
[in] satId SBAS satellite number ID, referring to NMEA standard.
◆ le_gnss_GetState()
le_gnss_State_t le_gnss_GetState | ( | void | ) |
This function returns the status of the GNSS device.
◆ le_gnss_GetSuplAssistedMode()
le_result_t le_gnss_GetSuplAssistedMode | ( | le_gnss_AssistedMode_t * | assistedModePtr | ) |
This function gets the SUPL Assisted-GNSS mode.
- Returns
- LE_OK on success
- LE_FAULT on failure
- Note
- If the caller is passing a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[out] assistedModePtr Assisted-GNSS mode.
◆ le_gnss_GetSupportedConstellations()
le_result_t le_gnss_GetSupportedConstellations | ( | le_gnss_ConstellationBitMask_t * | constellationMaskPtr | ) |
Returns a bitmask containing all satellite constellations supported on this platform
- Returns
- LE_OK Function succeeded.
- LE_UNSUPPORTED Function not supported on this platform.
- Parameters
-
[out] constellationMaskPtr Supported GNSS constellations
◆ le_gnss_GetSupportedNmeaSentences()
le_result_t le_gnss_GetSupportedNmeaSentences | ( | le_gnss_NmeaBitMask_t * | NmeaMaskPtr | ) |
Returns a bitmask containing all NMEA sentences supported on this platform
- Returns
- LE_OK Function succeeded.
- LE_UNSUPPORTED Function not supported on this platform.
- Parameters
-
[out] NmeaMaskPtr Supported NMEA sentences
◆ le_gnss_GetTime()
le_result_t le_gnss_GetTime | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint16_t * | hoursPtr, | ||
uint16_t * | minutesPtr, | ||
uint16_t * | secondsPtr, | ||
uint16_t * | millisecondsPtr | ||
) |
Get the position sample's time.
- Returns
- LE_FAULT Function failed to get the time.
- LE_OUT_OF_RANGE The retrieved time is invalid (all fields are set to 0).
- LE_OK Function succeeded.
- Note
- If the caller is passing an invalid Position sample reference or null pointers into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] hoursPtr UTC Hours into the day [range 0..23]. [out] minutesPtr UTC Minutes into the hour [range 0..59]. [out] secondsPtr UTC Seconds into the minute [range 0..59]. [out] millisecondsPtr UTC Milliseconds into the second [range 0..999].
◆ le_gnss_GetTimeAccuracy()
le_result_t le_gnss_GetTimeAccuracy | ( | le_gnss_SampleRef_t | positionSampleRef, |
uint32_t * | timeAccuracyPtr | ||
) |
Get the position sample's time accurary.
- Returns
- LE_FAULT Function failed to get the time.
- LE_OUT_OF_RANGE The retrieved time accuracy is invalid (set to UINT16_MAX).
- LE_OK Function succeeded.
- Note
- If the caller is passing an invalid position sample reference or a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] timeAccuracyPtr Estimated time accuracy in nanoseconds
◆ le_gnss_GetTtff()
le_result_t le_gnss_GetTtff | ( | uint32_t * | ttffPtr | ) |
Get the TTFF in milliseconds
- Returns
- LE_BUSY The position is not fixed and TTFF can't be measured.
- LE_NOT_PERMITTED If the GNSS device is not enabled or not started.
- LE_OK Function succeeded.
- LE_FAULT If there are some other errors.
- Note
- If the caller is passing a null pointer into this function, it is a fatal error, the function will not return.
- Parameters
-
[out] ttffPtr TTFF in milliseconds
◆ le_gnss_GetVerticalSpeed()
le_result_t le_gnss_GetVerticalSpeed | ( | le_gnss_SampleRef_t | positionSampleRef, |
int32_t * | vspeedPtr, | ||
int32_t * | vspeedAccuracyPtr | ||
) |
Get the position sample's vertical speed.
- Returns
- LE_FAULT The function failed to find the positionSample.
- LE_OUT_OF_RANGE At least one of the retrieved parameters is not valid (set to INT32_MAX).
- LE_OK The function succeeded.
- Note
- vSpeedPtr, vSpeedAccuracyPtr can be set to NULL if not needed.
- For a 2D position Fix, the vertical speed will be indicated as invalid and set to INT32_MAX.
-
Vertical speed accuracy estimate is default set to meters/second with 1 decimal place (304 = 30.4 meters/second). To change its accuracy, call the
le_gnss_SetDataResolution()
function. Vertical speed accuracy estimate is set as data type and accuracy from 0 to 3 decimal place is set as resolution. - In case the function returns LE_OUT_OF_RANGE, some of the retrieved parameters may be valid. Please compare them with INT32_MAX.
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Warning
- The Vertical speed accuracy is platform dependent. Please refer to Horizontal and Vertical speed accuracies section for full details.
- Parameters
-
[in] positionSampleRef Position sample's reference. [out] vspeedPtr Vertical speed in meters/second [resolution 1e-2], positive up. [out] vspeedAccuracyPtr Vertical speed's accuracy estimate in meters/second.
◆ le_gnss_InjectSuplCertificate()
le_result_t le_gnss_InjectSuplCertificate | ( | uint8_t | suplCertificateId, |
uint16_t | suplCertificateLen, | ||
const char *LE_NONNULL | suplCertificate | ||
) |
This function injects the SUPL certificate to be used in A-GNSS sessions. Certificates must be encoded in DER. Other certificate encryptions (e.g., PEM, CER and CRT) aren't supported.
- Returns
- LE_OK on success
- LE_BAD_PARAMETER on invalid parameter
- LE_FAULT on failure
- LE_BUSY service is busy
- LE_TIMEOUT a time-out occurred
- Note
- If the SUPL certificate size is bigger than the Maximum SUPL certificate size, it is a fatal error, the function will not return.
- Parameters
-
[in] suplCertificateId ID of the SUPL certificate. Certificate ID range is 0 to 9 [in] suplCertificateLen SUPL certificate size in Bytes. [in] suplCertificate SUPL certificate contents.
◆ le_gnss_InjectUtcTime()
le_result_t le_gnss_InjectUtcTime | ( | uint64_t | timeUtc, |
uint32_t | timeUnc | ||
) |
This function must be called to inject the UTC time into the GNSS device.
- Returns
- LE_OK The function succeeded.
- LE_FAULT The function failed to inject the UTC time.
- LE_TIMEOUT A time-out occurred.
- Note
- It is mandatory to enable the 'Extended Ephemeris' file injection into the GNSS device with le_gnss_EnableExtendedEphemerisFile() before injecting time with this API.
- Parameters
-
[in] timeUtc [IN] UTC time since Jan. 1, 1970 in milliseconds [in] timeUnc [IN] Time uncertainty in milliseconds
◆ le_gnss_LoadExtendedEphemerisFile()
le_result_t le_gnss_LoadExtendedEphemerisFile | ( | int | fd | ) |
This function must be called to load an 'Extended Ephemeris' file into the GNSS device.
- Returns
- LE_FAULT The function failed to inject the 'Extended Ephemeris' file.
- LE_TIMEOUT A time-out occurred.
- LE_FORMAT_ERROR 'Extended Ephemeris' file format error.
- LE_OK The function succeeded.
- Parameters
-
[in] fd Extended ephemeris file descriptor
◆ le_gnss_ReleaseSampleRef()
void le_gnss_ReleaseSampleRef | ( | le_gnss_SampleRef_t | positionSampleRef | ) |
This function must be called to release the position sample.
- Note
- If the caller is passing an invalid Position sample reference into this function, it is a fatal error, the function will not return.
- Parameters
-
[in] positionSampleRef Position sample's reference.
◆ le_gnss_RemovePositionHandler()
void le_gnss_RemovePositionHandler | ( | le_gnss_PositionHandlerRef_t | handlerRef | ) |
Remove handler function for EVENT 'le_gnss_Position'
- Parameters
-
[in] handlerRef
◆ le_gnss_SetAcquisitionRate()
le_result_t le_gnss_SetAcquisitionRate | ( | uint32_t | rate | ) |
This function sets the GNSS device acquisition rate.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_UNSUPPORTED request not supported
- LE_TIMEOUT a time-out occurred
- LE_NOT_PERMITTED If the GNSS device is not in "ready" state.
- LE_OUT_OF_RANGE if acquisition rate value is equal to zero
- Warning
- This function may be subject to limitations depending on the platform. Please refer to the GNSS platform constraints page.
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] rate Acquisition rate in milliseconds.
◆ le_gnss_SetConstellation()
le_result_t le_gnss_SetConstellation | ( | le_gnss_ConstellationBitMask_t | constellationMask | ) |
Reference type for dealing with GNSS position samples. Enumeration for GNSS device state GNSS fix position states. Resolutions values. Data types. SBAS constellation category GNSS constellation type. Assisted-GNSS mode Dilution of precision type GNSS constellation area type GNSS constellation Bit Mask (8 bits) indicating the GNSS constellation(s) used in solution. NMEA sentences Bit Mask indicating the NMEA sentences enabled in the NMEA flow.
- Warning
- The supported NMEA sentences depend on the platform. Please refer to your platform documentation for further details.
- Note
- The bit mask values should be coherent with LE_GNSS_NMEA_SENTENCES_MAX Coordinate system Location data types Type of GNSS start. Handler for position information. Reference type used by Add/Remove functions for EVENT 'le_gnss_Position' Set the GNSS constellation bit mask
- Returns
- LE_FAULT The function failed.
- LE_UNSUPPORTED If the request is not supported.
- LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
- LE_OK The function succeeded.
- Warning
- Some constellation types are unsupported depending on the platform. Please refer to Constellation type section for full details.
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] constellationMask GNSS constellation used in solution.
◆ le_gnss_SetConstellationArea()
le_result_t le_gnss_SetConstellationArea | ( | le_gnss_Constellation_t | satConstellation, |
le_gnss_ConstellationArea_t | constellationArea | ||
) |
Set the area for the GNSS constellation
- Returns
- LE_OK The function succeeded.
- LE_FAULT The function failed.
- LE_UNSUPPORTED If the request is not supported.
- LE_NOT_PERMITTED If the GNSS device is not initialized, disabled or active.
- LE_BAD_PARAMETER Invalid constellation area.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] satConstellation GNSS constellation type. [in] constellationArea GNSS constellation area.
◆ le_gnss_SetDataResolution()
le_result_t le_gnss_SetDataResolution | ( | le_gnss_DataType_t | dataType, |
le_gnss_Resolution_t | resolution | ||
) |
Set the resolution for the specific type of data
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER Invalid parameter provided.
- LE_FAULT Function failed.
- Note
- The resolution setting takes effect immediately and is not persistent to reset.
- The resolution setting is done per client session.
- Parameters
-
[in] dataType Data type. [in] resolution Resolution.
◆ le_gnss_SetDopResolution()
le_result_t le_gnss_SetDopResolution | ( | le_gnss_Resolution_t | resolution | ) |
Set the resolution for the DOP parameters
- Returns
- LE_OK Function succeeded.
- LE_BAD_PARAMETER Invalid parameter provided.
- LE_FAULT Function failed.
- Note
- The function sets the same resolution to all DOP values returned by le_gnss_GetDilutionOfPrecision() API. The resolution setting takes effect immediately.
- The resolution setting is done per client session.
- Parameters
-
[in] resolution Resolution.
◆ le_gnss_SetMinElevation()
le_result_t le_gnss_SetMinElevation | ( | uint8_t | minElevation | ) |
This function sets the GNSS minimum elevation.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_OUT_OF_RANGE if the minimum elevation is above range
- LE_UNSUPPORTED request not supported
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] minElevation Minimum elevation in degrees [range 0..90].
◆ le_gnss_SetNmeaSentences()
le_result_t le_gnss_SetNmeaSentences | ( | le_gnss_NmeaBitMask_t | nmeaMask | ) |
This function sets the enabled NMEA sentences using a bit mask.
- Returns
- LE_OK Success
- LE_BAD_PARAMETER Bit mask exceeds the maximal value
- LE_FAULT Failure
- LE_BUSY Service is busy
- LE_TIMEOUT Timeout occurred
- LE_NOT_PERMITTED GNSS device is not in "ready" state
- Warning
- This function may be subject to limitations depending on the platform. Please refer to the GNSS platform constraints page.
- Note
- Some NMEA sentences are unsupported depending on the platform. Please refer to Enabled NMEA sentences section for full details. Setting an unsuported NMEA sentence won't report an error.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] nmeaMask Bit mask for enabled NMEA sentences.
◆ le_gnss_SetServerDisconnectHandler()
LE_FULL_API void le_gnss_SetServerDisconnectHandler | ( | le_gnss_DisconnectHandler_t | disconnectHandler, |
void * | contextPtr | ||
) |
Set handler called when server disconnection is detected.
When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants to continue without exiting, it should call longjmp() from inside the handler.
◆ le_gnss_SetSuplAssistedMode()
le_result_t le_gnss_SetSuplAssistedMode | ( | le_gnss_AssistedMode_t | assistedMode | ) |
This function sets the SUPL Assisted-GNSS mode.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_UNSUPPORTED request not supported
- LE_TIMEOUT a time-out occurred
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] assistedMode Assisted-GNSS mode.
◆ le_gnss_SetSuplServerUrl()
le_result_t le_gnss_SetSuplServerUrl | ( | const char *LE_NONNULL | suplServerUrl | ) |
This function sets the SUPL server URL. That server URL is a NULL-terminated string with a maximum string length (including NULL terminator) equal to 256. Optionally the port number is specified after a colon.
- Returns
- LE_OK on success
- LE_FAULT on failure
- LE_BUSY service is busy
- LE_TIMEOUT a time-out occurred
- Note
- If the SUPL server URL size is bigger than the maximum string length (including NULL terminator) size, it is a fatal error, the function will not return.
- Warning
- The settings are platform dependent. Please refer to Setting configuration section for full details.
- Parameters
-
[in] suplServerUrl SUPL server URL.
◆ le_gnss_Start()
le_result_t le_gnss_Start | ( | void | ) |
This function starts the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_DUPLICATE If the GNSS device is already started.
- LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
- LE_OK The function succeeded.
◆ le_gnss_StartMode()
le_result_t le_gnss_StartMode | ( | le_gnss_StartMode_t | mode | ) |
This function starts the GNSS device in the specified start mode.
- Returns
- LE_OK The function succeeded.
- LE_BAD_PARAMETER Invalid start mode
- LE_FAULT The function failed.
- LE_DUPLICATE If the GNSS device is already started.
- LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
- Warning
- This function may be subject to limitations depending on the platform. Please refer to the GNSS platform constraints page.
- Parameters
-
[in] mode [IN] Start mode
◆ le_gnss_Stop()
le_result_t le_gnss_Stop | ( | void | ) |
This function stops the GNSS device.
- Returns
- LE_FAULT The function failed.
- LE_DUPLICATE If the GNSS device is already stopped.
- LE_NOT_PERMITTED If the GNSS device is not initialized or disabled.
- LE_OK The function succeeded.
◆ le_gnss_TryConnectService()
le_result_t le_gnss_TryConnectService | ( | void | ) |
Try to connect the current client thread to the service providing this API. Return with an error if the service is not available.
For each thread that wants to use this API, either ConnectService or TryConnectService must be called before any other functions in this API. Normally, ConnectService is automatically called for the main thread, but not for any other thread. For details, see Client Specific Functions.
This function is created automatically.
- Returns
- LE_OK if the client connected successfully to the service.
- LE_UNAVAILABLE if the server is not currently offering the service to which the client is bound.
- LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
- LE_COMM_ERROR if the Service Directory cannot be reached.