nrfxlib API 0.1.0
Loading...
Searching...
No Matches

◆ nrf_modem_gnss_agnss_expiry_get()

int32_t nrf_modem_gnss_agnss_expiry_get ( struct nrf_modem_gnss_agnss_expiry agnss_expiry)

#include <nrf_modem/include/nrf_modem_gnss.h>

Reads the current A-GNSS data need and expiry times from GNSS.

Returns detailed information about the current GNSS A-GNSS data need. The data structure contains expiry times in seconds for different types of assistance data. This function can be called at any time. If GNSS doesn't know the current GPS system time, the expiry times can not be calculated

Note
When A-GNSS data has been injected but GNSS has not yet been started, ephemerides and almanacs are in some cases reported as expired. This happens when ephemerides and almanacs are injected before GPS system time. This can be prevented by either injecting GPS system time before ephemerides and almanacs or briefly starting and stopping GNSS before calling the function.
Parameters
[out]agnss_expiryPointer to a buffer where the data is stored to.
Returns
0 on success.
Return values
-NRF_EPERMThe Modem library is not initialized.
-NRF_EACCESGNSS is not enabled in system or functional mode.
-NRF_EINVALThe buffer supplied by the application is NULL or The GNSS stack returned an error.
-NRF_ENOMEMThere is not enough shared memory for this request.
-NRF_EOPNOTSUPPThe operation is not supported by the modem firmware.
-NRF_ESHUTDOWNThe modem was shut down.