This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF9160 A-GPS and the GPS_EVT_AGPS_DATA_NEEDED

Hi,

I've been scowering the SDK dicumentation and DevZone for this information without finding it. My apologies if this has been answered before.

When using the SUPL library together with the GPS, the event GPS_EVT_AGPS_DATA_NEEDED is generated by the GPS whenever A-GPS data is needed. Normally, this occurs when the GPS is started for the first time and then regularly (about every hour?). This works fine.

What I don't understand, however, is:

1. If I perform a "manual" SUPL session when starting my app before starting the GPS (similar as in the agps sample), GPS_EVT_AGPS_DATA_NEEDED is still generated when the GPS is started the first time.

2. If the A-GPS data is not provided when GPS_EVT_AGPS_DATA_NEEDED is received (e.g. if the SUPL request fails), GPS_EVT_AGPS_DATA_NEEDED is not regenerated when the GPS is started the next time.

How should I proceed to better control the A-GPS data supplied to the GPS, especially in case s when the SUPL request fails (e.g., due to a temporary failure of the LTE connection)? In other words, is there some way I can affect when the GPS should request A-GPS data?

Can I simply rely on that the GPS uses whatever SUPL data I supply prior to starting a GPS fix attempt, i.e. perform one or more manual SUPL sessions until success whenever  GPS_EVT_AGPS_DATA_NEEDED  is received?

(Im mostly running nRF Connect SDK version: 1.3.2, SUPL client library version: v0.7.1, and nRF9160 modem firmware version: 1.2.3)

Best regards,
Per

Parents Reply Children
  • Hello Per, my sincere apologies for the late reply. 

    I've got some answers from our developers with regards to your questions.

    The current GNSS implementation (mfw < 1.3.0) is such, that it always requests all A-GPS data when GNSS is started for the first time. So yes, it also happens if A-GPS data has been injected before GNSS is started. This will be changed in MFW v1.3.1 so, that also the first A-GPS data request will be based on real need. If all A-GPS data is supplied before GNSS is started for the first time, GNSS will not send the request until some of the data is going to expire.

    The time between two back to back A-GPS requests from GNSS is always at least 1 hour. It doesn't matter whether the requested data is injected or not, GNSS will send the next A-GPS data request soonest after 1 hour.
    It doesn't matter whether A-GPS data is injected before or after starting GNSS, it will be used in both cases.
    Does this answer your questions?
    Let me know if anything is unclear.
    Kind regards,
    Øyvind
  • Great Öyvind!

    I think I understand. Key for me at the moment is "It doesn't matter whether A-GPS data is injected before or after starting GNSS, it will be used in both cases." 

    I take this to mean that injected A-GPS data will always be used, even if the injection occurs without being specifically requested by GNSS.

    I will close this ticket as answered in a day or so unless you disagree with my wording above.

    Many thanks,

    Per

Related