GNSS

API Reference
Manage GNSS


This API provides access to the GNSS device.

GNSS or Global Navigation Satellite System is a satellite navigation system with global coverage.

This API provides function to configure the GNSS device and retrieve position information.

IPC interfaces binding

All the functions of this API are provided by the positioningService application service.

Here's a code sample binding to Positioning services:

 bindings:
 {
    clientExe.clientComponent.le_gnss -> positioningService.le_gnss
 }

Enable/Disable GNSS device

The application can enable/disable the GNSS device with the le_gnss_Enable() / le_gnss_Disable() functions. By default the GNSS device is enabled for the positioningService application service. Also see Manage GNSS.

Start/Stop GNSS device

The application can start/stop the GNSS device with the le_gnss_Start() / le_gnss_Stop() functions. The default "HOT" start condition is applied and all assistance data are used. Also see Manage GNSS.

Force cold restart

The le_gnss_ForceColdRestart() function performs a "cold" restart of the GNSS device. The current GNSS session is stopped, the specified assistance data are cleared then the GNSS session is restarted. Also see Manage GNSS.

For the cold start condition, the following assistance data are cleared:

  • Ephemerises
  • Time
  • Position

GNSS constellation selection

The le_gnss_SetConstellation() function selects the GNSS constellation(s) used in solution. If all GNSS constellations are disabled, the GNSS engine is disabled.

Warning
Your platform may require a reboot to take into account this change. Please refer to your platform documentation for further details.

The following configurations are currently supported:

  • GPS
  • GPS + GLONASS

All supported GNSS constellations are enabled by default. The le_gnss_GetConstellation() function gets the GNSS constellation(s) enabled to be used in solution.

Function / GNSS state UNINITIALIZED READY ACTIVE DISABLED
le_gnss_Start() LE_NOT_PERMITTED LE_OK/LE_FAULT LE_DUPLICATE LE_NOT_PERMITTED
le_gnss_Stop() LE_NOT_PERMITTED LE_DUPLICATE LE_OK/LE_FAULT LE_NOT_PERMITTED
le_gnss_ForceColdRestart() LE_NOT_PERMITTED LE_NOT_PERMITTED LE_OK/LE_FAULT LE_NOT_PERMITTED
le_gnss_Disable() LE_NOT_PERMITTED LE_OK/LE_FAULT LE_NOT_PERMITTED LE_DUPLICATE
le_gnss_Enable() LE_NOT_PERMITTED LE_DUPLICATE LE_DUPLICATE LE_OK/LE_FAULT
le_gnss_SetConstellation() LE_NOT_PERMITTED LE_OK/LE_FAULT LE_NOT_PERMITTED LE_NOT_PERMITTED

Also see Manage GNSS.

Assisted GNSS

Server based Extended Ephemeris
3GPP User Plane (OMA SUPL)

Server based Extended Ephemeris

With le_gnss_LoadExtendedEphemerisFile() , you can load an 'Extended Ephemeris' file into the GNSS device from the filesystem. You have to download the file before loading it.

With le_gnss_GetExtendedEphemerisValidity(), you will to get the validity of the last injected Extended Ephemeris.

You can enable/disable the use of the 'Extended Ephemeris' file into the GNSS device with le_gnss_EnableExtendedEphemerisFile()/le_gnss_DisableExtendedEphemerisFile() functions.

Example:

#define EXT_EPH_PATH "/tmp/ext_eph.bin"
le_clk_Time_t start,stop;
char startTime[100] = {0};
char StopTime[100] = {0};
int32_t fd;
// download file into EXT_EPH_PATH
DownloadExtendedEphemerisFile(EXT_EPH_PATH);
if ((fd=open(EXT_EPH_PATH, O_RDONLY)) == -1)
{
LE_ERROR("Open file %s failure: errno.%d (%s)", EXT_EPH_PATH, errno, strerror(errno));
}
else
{
LE_INFO("Open file %s with fd.%d", EXT_EPH_PATH, fd);
}
{
LE_WARN("Could not load '%s'",EXT_EPH_PATH);
}
{
LE_WARN("Could get the validity");
}
startTime,
sizeof(startTime),
NULL) != LE_OK )
{
LE_INFO("Could not convert start time");
}
StopTime,
sizeof(StopTime),
NULL) != LE_OK )
{
LE_INFO("Could not convert stop time");
}
LE_INFO("Validity Start time %s",startTime);
LE_INFO("Validity Stop time %s",StopTime);
close (fd);

3GPP User Plane (OMA SUPL)

That 3GPP User Plane A-GNSS (Assisted GNSS) protocol is defined by two different standardization bodies, 3GPP and Open Mobile Alliance (OMA). For more information, please refer to the standard.

Both MS-Assisted and MS-Based position determination methods are supported in the User Plane.

In MS-Assisted mode, the MS (Mobile Station) measures the signals from the GNSS satellites , then returns the retrieved GNSS data to the SUPL (Secure User Plan Location) server, where the position calculation is performed.

In MS-Based mode, the MS gets the assistance data from the SUPL (Secure User Plan Location) server. The MS measures the signals from the GNSS satellites and makes the position calculation.

The data transport over User Plan is done using the TCP/IP protocol.

The Assisted-GNSS mode can be configured thru the le_gnss_SetSuplAssistedMode() function.

The supported modes are the following:

  • Standalone mode: That 3GPP User Plane A-GNSS feature is deactivated.
  • MS-Based mode
  • MS-Assisted mode

Moreover, the le_gnss_GetSuplAssistedMode() function reads the configured Assisted-GNSS mode.

The SUPL server is configured using the le_gnss_SetSuplServerUrl() function. That function sets the SUPL server URL and optionally the port number.

The SUPL certificate to be used in A-GNSS sessions is injected through the le_gnss_InjectSuplCertificate() function and deleted through the le_gnss_DeleteSuplCertificate() function.


Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.