A question on GPS data on NV memory and A-GPS injection

I am implementing GPS on our custom board using modem firmware v1.3.5 (SDK v2.4.0). 

From the documentation I understand that the modem stores information about satellites and constellations in non-volatile memory (derived from https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.0/nrfxlib/nrf_modem/doc/gnss_interface.html#deleting-gnss-data-stored-in-nv-memory)

What is unclear to me is when the information is stored, what exact information is stored and how I should/can enable the modem to use it. I tested acquiring a GPS fix, which worked and took about 11 minutes. I expected that after a system reset the modem would find a GPS fix more quickly, but it still took another 11 minutes to find a fix again. 

My questions are:

- Do I have to configure something to enable the modem to store GPS data in NV memory?

- Can it be verified that the data has been stored?

- Do I have to manually set parameters for the modem to be able to use the data stored in NV memory?

I have to assume that the system is going to places that have GPS reception, but no LTE coverage. Therefore I do not want to lean on A-GPS, but verify that the system can perform hot or warm starts and measure the system performance in standalone conditions.

Bonus question:

Although our nrf91 SoC is switched off entirely for the most part other parts of the system keep track of the current time, so I can use that information to inject into the A-GPS interface. Is there some utility make it easy to convert a UTC timestamp into a nrf_modem_gnss_agps_data_utc struct?

  • Hello, 

    Due to summer vacation time closing in on Nordic Semiconductor, a delayed answer must be expected due to fewer staff available in the R&D department.

    I have forwarded the question to our developers. 

    Kind regards,
    Øyvind

  • Hello again, here is the answer I got from our developers:

    GNSS data gets stored into NV memory when modem periodically flushes settings or when modem is powered off using AT+CFUN=0.
    You can use A-GPS to fetch data or let GNSS run in continuous tracking mode for example for 15 minutes and then power modem off using AT+CFUN=0. When modem is started again, it reads the stored GNSS data from NV memory. However, if GNSS does not know the current GPS time, it does not know if the data is valid or not. So, to get most benefit from the data, the current GPS time needs to be injected to GNSS using the GNSS API.
    However, in most use cases nRF9160 remains powered on all the time and this does not really matter.

    Hope this answers your question. 

    Kind regards,
    Øyvind

  • Hi Øyvind,

    Thank you for the response. It covers about half of my questions.. but I do now have a clear path forward.

    To recap:

    - Do I have to configure something to enable the modem to store GPS data in NV memory?

    a: GNSS data gets stored into NV memory when modem periodically flushes settings or when modem is powered off using AT+CFUN=0

    - Can it be verified that the data has been stored?

    a: No answer - I take it the answer is no

    - Do I have to manually set parameters for the modem to be able to use the data stored in NV memory?

    a: Yes. If GNSS does not know the current GPS time, it does not know if the data is valid or not. So, to get most benefit from the data, the current GPS time needs to be injected to GNSS using the GNSS API

    - Is there some utility make it easy to convert a UTC timestamp into a nrf_modem_gnss_agps_data_utc struct?

    a: No answer - I take it the answer is no

    Best regards,

    Luc van Leeuwen

Related