Verify that GNSS data stored in NV memory

Hi

According to the documentation for the GNSS interface, information into non-volatile (NV) memory so that the information can be used when GNSS is restarted and also after a device reboot.

Is there a way to inspect this data, or at least know whether or not it is actually present?

  • Hello,

    As far I know there is no function related to this. However I have asked our team internally and they have been looking into this. I will let you know when there is an update.

    Thanks.

    Best Regards,

    Kazi Afroza Sultana

  • Hello,

    I got a reply from the Modem team.

    ''There is no direct way to check what GNSS data is stored in NV memory. However, nrf_modem_gnss_agps_expiry_get() which returns expiry times for different A-GPS data, can be used to check that this indeed happens.

    The data stored by GNSS is basically ephemerides and almanacs. Ephemerides are valid only for a few hours, so usually there's not much benefit from this, but almanacs on the other hand are valid for a much longer time. The things have to keep in mind is that the data only gets flushed into flash periodically every 48 hours and when modem is powered off using AT+CFUN=0. And, to utilize the saved data, GNSS needs to know the current time. The time could be for example from the LTE network or it could be from GNSS satellites, but without the current time, GNSS doesn't know if the stored data is still valid or not. If LTE network time is used, the time needs to be adjusted for leap seconds (there's an example of this in https://github.com/nrfconnect/sdk-nrf/blob/main/samples/nrf9160/gnss/src/assistance_minimal.c).

    The storage of GNSS data can be demonstrated using the modem_shell sample with the following steps (I'm assuming GNSS is enabled in the system mode and functional mode is "online"):

    1. Download A-GPS data and inject to GNSS: gnss agps inject
    2. Power off modem: link funmode --pwroff
    3. Reboot the device
    4. Set A-GPS filter so that only GPS system time is injected: gnss agps filter 0 0 0 0 0 1 0 0
    5. Download and inject GPS system time: gnss agps inject
    6. Check data expiration times: gnss agps expiry 

    The shell output should show that ephemerides and almanacs are valid (the validity times are in seconds). ''

    Thanks.

    BR

    Kazi Afroza Sultana

Related