All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
GNSS

API Reference


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.

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.

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

  • Ephemerises
  • Time
  • Position

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.

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);

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