Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/nrf/app_dev/device_guides/nrf91/nrf91_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,12 @@ See :ref:`nrfxlib:gnss_int_agps_data` for more information about the retrieval o
Predicted GPS (P-GPS)
---------------------

P-GPS is a form of assistance, where the device can download up to two weeks of predicted satellite ephemerides data.
P-GPS is a form of assistance, where the device can download predicted satellite ephemerides data for several days into the future.
Normally, devices connect to the cellular network approximately every two hours for up-to-date satellite ephemeris information or they download the ephemeris data from the acquired satellites.
P-GPS enables devices to determine the exact orbital location of the satellite without connecting to the network every two hours with a trade-off of reduced accuracy of the calculated position over time.
Note that P-GPS requires more memory compared to regular A-GNSS.

Also, note that due to satellite clock inaccuracies, not all functional satellites will have ephemerides data valid for two weeks in the downloaded P-GPS package.
Also, note that due to satellite clock inaccuracies, not all functional satellites will have ephemerides data valid when nearing the end of the prediction period in the downloaded P-GPS package.
This means that the number of satellites having valid predicted ephemerides reduces in number roughly after ten days.
Hence, the GNSS module needs to download the ephemeris data from the satellite broadcast if no predicted ephemeris is found for that satellite to be able to use the satellite.

Expand Down
2 changes: 1 addition & 1 deletion doc/nrf/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ Glossary
The process of securely generating and storing credentials in a device, then uploading a device ID and device certificate to a cloud account so that the device is ready to connect to the cloud.

Predicted GPS (P-GPS)
A form of assistance provided to devices trying to obtain a :term:`Global Navigation Satellite System (GNSS)` fix, where the device can download up to two weeks of predicted satellite Ephemerides data.
A form of assistance provided to devices trying to obtain a :term:`Global Navigation Satellite System (GNSS)` fix, where the device can download predicted satellite Ephemerides data for several days into the future.
It enables devices to determine the exact orbital location of the satellite without connecting to the network every two hours with a trade-off of reduced accuracy of the calculated position over time.
It is available through :term:`nRF Cloud`.

Expand Down
8 changes: 2 additions & 6 deletions doc/nrf/libraries/networking/nrf_cloud_pgps.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,15 @@ To get a position fix, a :term:`Global Navigation Satellite System (GNSS)` modul

Predicted GPS (P-GPS) is a form of assistance that reduces the :term:`Time to First Fix (TTFF)`, the time needed by a GNSS module to estimate its position.
It is provided through :term:`nRF Cloud` services.
In P-GPS, nRF Cloud provides data containing information about the estimated orbits (`Ephemerides <Ephemeris_>`_) of the 32 GPS satellites for up to two weeks.
In P-GPS, nRF Cloud provides data containing information about the estimated orbits (`Ephemerides <Ephemeris_>`_) of the 32 GPS satellites for multiple days into the future.
Each set of ephemerides predictions is valid for a specific four-hour period within the set of all provided predictions.
A device using P-GPS downloads the ephemeris predictions from the cloud, stores them in its flash memory, and later injects them into the GNSS module when needed.

P-GPS is designed for devices that are frequently disconnected from the cloud but need periodic GNSS fixes as quickly as possible to save power.
This is possible because a device does not need to download ephemerides from the satellite broadcast.
However, P-GPS should not be used for general use cases that already work with :term:`Assisted GNSS (A-GNSS)` only.

.. note::
When using two-week ephemeris prediction sets, the TTFF towards the end of the second week increases due to the accumulated errors in the predictions and the decreases in the number of satellite ephemerides in the later prediction periods.

P-GPS requires a cloud connection approximately once a week to download new predictions, depending on the configuration settings.
P-GPS requires a cloud connection to download new predictions.
With A-GNSS, new ephemerides are needed on average every two hours, or if the fix interval is longer, whenever GNSS is started.

.. note::
Expand All @@ -52,7 +49,6 @@ Configure one of the following options to control the network transport for down

Configure these additional options to refine the behavior of P-GPS:

* :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD`
* :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_NUM_PREDICTIONS`
* :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_REPLACEMENT_THRESHOLD`
* :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_DOWNLOAD_FRAGMENT_SIZE`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,10 @@ Multiprotocol Service Layer libraries
Libraries for networking
------------------------

|no_changes_yet_note|
* :ref:`lib_nrf_cloud_pgps` library:

* Updated the range for the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_NUM_PREDICTIONS` and :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_REPLACEMENT_THRESHOLD` Kconfig options to values supported by nRF Cloud.
* Removed the ``CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD`` Kconfig choice and related options (``CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD_120_MIN`` and ``CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD_240_MIN``).

Libraries for NFC
-----------------
Expand Down
29 changes: 3 additions & 26 deletions subsys/net/lib/nrf_cloud/Kconfig.nrf_cloud_pgps
Original file line number Diff line number Diff line change
Expand Up @@ -25,32 +25,9 @@ config NRF_CLOUD_PGPS_REQUEST_UPON_INIT
if only some of the predictions are in storage,
or if the replacement threshold is reached.

choice NRF_CLOUD_PGPS_PREDICTION_PERIOD
prompt "Desired time between predictions"
default NRF_CLOUD_PGPS_PREDICTION_PERIOD_240_MIN
help
This value is used when requesting predicted GPS data from the
cloud. More frequent predictions will result in more accurate
ephemeris values for any given time, but will take more storage
space in flash.

config NRF_CLOUD_PGPS_PREDICTION_PERIOD_120_MIN
bool "120 min prediction period"
help
Each prediction is used to cover 120 minutes. May increase fix
accuracy compared to 240 minute prediction period, but doubles
the amount of data transferred and storage space needed in flash.

config NRF_CLOUD_PGPS_PREDICTION_PERIOD_240_MIN
bool "240 min prediction period"
help
Each prediction is used to cover 240 minutes.

endchoice

config NRF_CLOUD_PGPS_NUM_PREDICTIONS
int "Desired number of predictions"
range 2 84
range 2 42
default 42
help
This value, together with the prediction period, determines the
Expand All @@ -60,7 +37,7 @@ config NRF_CLOUD_PGPS_NUM_PREDICTIONS

config NRF_CLOUD_PGPS_REPLACEMENT_THRESHOLD
int "Number of predictions remaining before fetching more"
range 0 82
range 0 40
default 0
help
When set to 0, no attempt will be made to update the prediction
Expand Down Expand Up @@ -175,7 +152,7 @@ config NRF_CLOUD_PGPS_PARTITION_SIZE
hex "Size of flash partition for P-GPS data storage"
default 0x15000
help
This must be at least 2048 bytes times NRF_COUND_PGPS_NUM_PREDICTIONS.
This must be at least 2048 bytes times NRF_CLOUD_PGPS_NUM_PREDICTIONS.

config NRF_CLOUD_PGPS_PARTITION_ALIGN
hex "Align P-GPS partition to flash block boundary"
Expand Down
4 changes: 0 additions & 4 deletions subsys/net/lib/nrf_cloud/common/src/nrf_cloud_pgps.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ LOG_MODULE_REGISTER(nrf_cloud_pgps, CONFIG_NRF_CLOUD_GPS_LOG_LEVEL);
#define DOWNLOAD_PROTOCOL "https://"
#define PGPS_DEBUG 0 /* set to 1 for extra logging */

#if defined(CONFIG_NRF_CLOUD_PGPS_PREDICTION_PERIOD_120_MIN)
#define PREDICTION_PERIOD 120
#else
#define PREDICTION_PERIOD 240
#endif
#define REPLACEMENT_THRESHOLD CONFIG_NRF_CLOUD_PGPS_REPLACEMENT_THRESHOLD
#define FRAGMENT_SIZE CONFIG_NRF_CLOUD_PGPS_DOWNLOAD_FRAGMENT_SIZE
#define PREDICTION_MIDPOINT_SHIFT_SEC (120 * SEC_PER_MIN)
Expand Down