nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_modem_gnss_prio_mode_enable()

int32_t nrf_modem_gnss_prio_mode_enable ( void )

#include <nrf_modem/include/nrf_modem_gnss.h>

Enables GNSS priority over LTE idle mode procedures.

GNSS can produce a cold start fix when there are long enough gaps in LTE idle mode operations. LTE idle eDRX cycles approximately 1 min and above will usually guarantee the ability to produce a fix. Shorter DRX cycles will be enough after GNSS has got ephemerides. GNSS priority can be enabled to help getting GNSS into that state, if there are not long enough gaps in LTE idle mode functionality. Priority for GNSS should be used only when fix has been blocked by LTE idle mode operations, which can be detected by NRF_MODEM_GNSS_PVT_FLAG_NOT_ENOUGH_WINDOW_TIME bit being set in the PVT data frame flags member. The application should not make the decision based on a single PVT event, but should enable priority only in case this flag has been set in several consecutive PVT events. Priority will be disabled automatically after producing the first fix.

Note
GNSS priority may interfere with LTE operations, if possible it would be good to time the use of priority to moments where data transfer is not anticipated. In general, long enough eDRX cycles, or PSM, will ensure better functionality for both GNSS and LTE.
Priority will not stop LTE connections.
Return values
0on success.
-NRF_EPERMThe Modem library is not initialized.
-NRF_EACCESGNSS is not enabled in system or functional mode.
-NRF_EINVALThe GNSS stack returned an error or the operation cannot be executed while GNSS is stopped.
-NRF_ENOMEMThere is not enough shared memory for this request.
-NRF_ESHUTDOWNThe modem was shut down.