You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document new Kconfig options related to the new dedicated
P-GPS partition in flash. Add to release notes and
known issues.
This includes doc review edits.
Signed-off-by: Pete Skeggs <[email protected]>
Signed-off-by: Francesco Domenico Servidio <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/glossary.rst
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,10 @@ Glossary
13
13
Access Port Protection (APPROTECT)
14
14
A register used to prevent read and write access to all CPU registers and memory-mapped addresses.
15
15
16
+
Almanac data
17
+
In the :term:`Global Navigation Satellite System (GNSS)`, the data providing coarse orbit and status information for each satellite in the constellation.
18
+
Each satellite broadcasts Almanac data for all the satellites in the constellation.
19
+
16
20
Anycast addressing
17
21
An addressing type that routes datagrams to a single member of a group of potential receivers that are all identified by the same destination address.
18
22
This is a one-to-nearest association.
@@ -28,6 +32,11 @@ Glossary
28
32
Application Programming Interface (API)
29
33
A language and message format used by an application program to communicate with an operating system, application, or other services.
30
34
35
+
Assisted GPS (A-GPS)
36
+
A form of assistance provided to devices trying to obtain a :term:`Global Navigation Satellite System (GNSS)` fix.
37
+
It improves the :term:`Time to First Fix (TTFF)` by utilizing a connection (for example, over cellular) to the internet to retrieve the :term:`Almanac data` and :term:`Ephemeris data`.
38
+
A connection to an internet server that has the Almanac and Ephemeris data is several times quicker than using the data link to the GPS satellites.
39
+
31
40
Attribute Protocol (ATT)
32
41
"[It] allows a device referred to as the server to expose a set of attributes and their associated values to a peer device referred to as the client."
33
42
`Bluetooth Core Specification`_, Version 5.3, Vol 3, Part F, Section 1.1.
@@ -148,6 +157,10 @@ Glossary
148
157
Endpoint
149
158
In the context of a :ref:`Matter <ug_matter>` or :ref:`Zigbee <ug_zigbee>` network, an addressable container that contains *clusters* appropriate for a single device type such as a sensor or a light bulb.
150
159
160
+
Ephemeris data
161
+
In the :term:`Global Navigation Satellite System (GNSS)`, the data providing information about the orbit of the satellite transmitting it.
162
+
This data is valid for four hours and becomes inaccurate after that.
163
+
151
164
Evaluation Kit (EK)
152
165
A platform used to evaluate different development platforms.
153
166
@@ -448,6 +461,11 @@ Glossary
448
461
A feature introduced in 3GPP Release 12 to improve the battery life of IoT (Internet of Things) devices by minimizing energy consumption.
449
462
The device stays dormant during the PSM window.
450
463
464
+
Predicted GPS (P-GPS)
465
+
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.
466
+
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.
467
+
It is available through :term:`nRF Cloud`.
468
+
451
469
Preview Development Kit (PDK)
452
470
A development platform used for application development.
453
471
A Preview Development Kit uses an engineering sample of the chip and it is not production-ready in comparison to the Development Kit that uses a production-ready version of the chip.
@@ -570,6 +588,9 @@ Glossary
570
588
Target
571
589
The goal of an operation, for example, programming a specific image on a device, compiling a specific set of files, or removing previously generated files.
572
590
591
+
Time to First Fix (TTFF)
592
+
The time needed by a :term:`Global Navigation Satellite System (GNSS)` module to estimate its position.
593
+
573
594
Transmission Control Protocol (TCP)
574
595
A connection-oriented protocol that provides reliable transport.
575
596
This reliability comes at the cost of control packets overhead of the protocol itself, making it unsuitable for bandwidth-constrained applications.
CIA-604: ATv2 cannot be built for the ``thingy91_nrf9160_ns`` build target with ``SECURE_BOOT`` enabled
130
+
Due to the use of static partitions with the Thingy:91, there is insufficient room in the flash memory to enable both the primary and secondary bootloaders.
Copy file name to clipboardExpand all lines: doc/nrf/libraries/networking/nrf_cloud_pgps.rst
+55-30Lines changed: 55 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,32 +7,40 @@ nRF Cloud P-GPS
7
7
:local:
8
8
:depth: 2
9
9
10
-
The nRF Cloud P-GPS library enables applications to request and process predicted GPS data from `nRF Cloud`_ to be used with the nRF9160 SiP.
10
+
The nRF Cloud P-GPS library enables applications to request and process :term:`Predicted GPS (P-GPS)` data from `nRF Cloud`_ to be used with the nRF9160 SiP.
11
11
This library is an enhancement to the :ref:`lib_nrf_cloud` library.
12
-
It can be used with or without Assisted GPS (`A-GPS`_) data from nRF Cloud.
12
+
It can be used with or without :term:`Assisted GPS (A-GPS)` data from nRF Cloud.
13
13
14
-
P-GPS is intended for specific use cases.
15
-
It is not targeted for general use cases that already work with A-GPS.
16
-
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.
14
+
Overview
15
+
********
17
16
18
-
To get a position fix, a GNSS receiver needs information such as the satellite orbital data, exact date and time of the day, and accurate hardware clock frequency data.
17
+
To get a position fix, a :term:`Global Navigation Satellite System (GNSS)` receiver needs information such as the satellite orbital data, exact date and time of the day, and accurate hardware clock frequency data.
19
18
GPS satellites broadcast this information in a pattern, which repeats every 12.5 minutes.
20
-
Predicted GPS data contains information about the estimated orbits (`Ephemerides <Ephemeris_>`_) of the 32 GPS satellites for up to a two-week period, with each set of ephemerides predictions being valid for a specific four-hour period within the set of all provided predictions.
21
-
These ephemeris predictions are downloaded from the cloud, stored by the device in flash memory, and later injected into the GNSS module when needed.
19
+
20
+
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.
21
+
It is provided through :term:`nRF Cloud` services.
22
+
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.
23
+
Each set of ephemerides predictions is valid for a specific four-hour period within the set of all provided predictions.
24
+
A device using P-GPS downloads the ephemeris predictions from the cloud, it stores them in its flash memory, and later it injects them into the GNSS module when needed.
25
+
26
+
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.
27
+
This is possible because a device can download the broadcasted information and predictions of satellite data provided through P-GPS (or also A-GPS) at a faster rate from nRF Cloud than from the data links of the satellites.
28
+
However, P-GPS should not be used for general use cases that already work with :term:`Assisted GPS (A-GPS)` only.
22
29
23
30
.. note::
31
+
When using two-week ephemeris prediction sets, the TTFF towards the end of the second week will increase due to the accumulated errors in the predictions and the decrease in the number of satellite ephemerides in the later prediction periods.
24
32
25
-
If two-week prediction sets are used, TTFF towards the end of the second week will increase due to accumulated errors in the predictions and decrease in number of satellite ephemerides in the later prediction periods.
33
+
P-GPS requires a cloud connection approximately once a week, depending on the configuration settings.
34
+
A-GPS requires a cloud connection each time.
26
35
27
-
If nRF Cloud services such as A-GPS or P-GPS are used either individually or in combination, the broadcasted information and predictions of satellite data can be downloaded at a faster rate from nRF Cloud than from the satellites.
36
+
A device can use P-GPS together with A-GPS.
37
+
This provides the following advantages:
28
38
29
-
The use of P-GPS reduces Time to First Fix (TTFF) (time for a GNSS module to estimate its position) when compared to using no assistance at all.
30
-
Further, it only requires a cloud connection approximately once a week, depending on configuration.
31
-
On the other hand, when only A-GPS is used, a cloud connection is needed each time.
32
-
If you use P-GPS along with A-GPS, TTFF is faster compared to an implementation with P-GPS only.
33
-
The amount of cloud data needed for each fix is smaller during each fix compared to an implementation with A-GPS only.
34
-
With proper configuration, A-GPS can be used with P-GPS, when a cloud connection is available, and acquire fast fixes even without a cloud connection.
35
-
This is possible as long as the stored P-GPS data is still valid, and current date and time (accurate to a few seconds) and the most recent location (accurate to a few dozen kilometers) are known.
39
+
* It shortens TTFF compared to using only P-GPS.
40
+
* It requires less cloud data during each fix compared to using only A-GPS.
41
+
42
+
With proper configuration, A-GPS can be used with P-GPS when a cloud connection is available, and it can acquire fast fixes even without a cloud connection.
43
+
This is possible as long as the stored P-GPS data is still valid, and the current date and time (accurate to a few seconds) and the most recent location (accurate to a few dozen kilometers) are known.
36
44
37
45
.. note::
38
46
To use the nRF Cloud P-GPS service, an nRF Cloud account is needed, and the device needs to be associated with a user's account.
@@ -53,21 +61,37 @@ Configure these additional options to refine the behavior of P-GPS:
Configure the following option if you need your application to use A-GPS as well, for coarse time and position data and to get the fastest TTFF:
64
+
Configure the following option if you need your application to also use A-GPS, for coarse time and position data and to get the fastest TTFF:
57
65
58
66
* :kconfig:option:`CONFIG_NRF_CLOUD_AGPS`
59
67
60
-
If A-GPS is not desired (due to data costs, low power requirements, or expected frequent loss of cloud connectivity), you must disable the option.
68
+
.. note::
69
+
Disable this option if you do not want to use A-GPS (due to data costs, low power requirements, or expected frequent loss of cloud connectivity).
61
70
62
-
For an application that uses P-GPS, the following options must be configured for storing settings, for having accurate clock time, and for having a location to store predictions:
71
+
You must also configure the following options for storing settings, for having accurate clock time, and for having a location to store predictions:
63
72
64
73
* :kconfig:option:`CONFIG_FLASH`
65
74
* :kconfig:option:`CONFIG_FCB`
66
75
* :kconfig:option:`CONFIG_SETTINGS_FCB`
67
76
* :kconfig:option:`CONFIG_DATE_TIME`
68
-
* :kconfig:option:`CONFIG_BOOTLOADER_MCUBOOT`
69
-
* :kconfig:option:`CONFIG_IMG_MANAGER`
70
-
* :kconfig:option:`CONFIG_MCUBOOT_IMG_MANAGER`
77
+
78
+
The P-GPS library requires a storage location in the flash memory where to store the P-GPS prediction data.
79
+
There are three ways to define this storage location:
80
+
81
+
* To use a dedicated partition, enable the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_PARTITION` option.
82
+
* To use the MCUboot secondary partition as storage, enable the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_MCUBOOT_SECONDARY` option.
83
+
84
+
Use this option if the flash memory for your application is too full to use a dedicated partition, but the application uses MCUboot for FOTA updates but not for MCUboot itself.
85
+
Do not use this option if you are using MCUboot as a second-stage upgradable bootloader and also have FOTA updates enabled for MCUboot itself, and not just the application (using :kconfig:option:`CONFIG_SECURE_BOOT` and :kconfig:option:`CONFIG_BUILD_S1_VARIANT`).
86
+
The P-GPS library will otherwise prevent the MCUboot update from fully completing, and the first-stage immutable bootloader will revert MCUboot to its previous image.
87
+
88
+
* To use an application-specific storage, enable the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_CUSTOM` option.
89
+
You must also pass the address and the size of your custom location in the flash memory to the :c:func:`nrf_cloud_pgps_init` function.
90
+
91
+
.. note::
92
+
The address must be aligned to a flash page boundary, and the size must be equal to or greater than 2048 bytes times the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_NUM_PREDICTIONS` option.
93
+
94
+
Use this third option if you do not use MCUboot and if you want complete control over where to store P-GPS data in the flash memory.
71
95
72
96
See :ref:`configure_application` for information on how to change configuration options.
73
97
@@ -83,14 +107,11 @@ In these cases, predictions might be unavailable until a connection is establish
83
107
Each prediction requires 2 KB of flash. For prediction periods of 240 minutes (four hours), and with 42 predictions per week, the flash requirement adds up to 84 KB.
84
108
85
109
The P-GPS subsystem's :c:func:`nrf_cloud_pgps_init` function takes a pointer to a :c:struct:`nrf_cloud_pgps_init_param` structure.
86
-
The structure at a minimum must specify the storage base address and the storage size in flash, where P-GPS subsystem stores predictions.
110
+
The structure must specify, if :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_CUSTOM` is enabled, the storage base address and the storage size in the flash memory where the P-GPS subsystem stores predictions.
87
111
It can optionally pass a pointer to a :c:func:`pgps_event_handler_t` callback function.
88
112
89
-
As an example, the :ref:`gnss_sample` sample shows how to pass the address of the :ref:`secondary MCUboot partition <mcuboot_ncs>`.
90
-
The address is defined by the ``PM_MCUBOOT_SECONDARY_ADDRESS`` macro and the ``PM_MCUBOOT_SECONDARY_SIZE`` macro.
91
-
These are automatically defined by the build system in the file :file:`pm_config.h`.
92
-
This partition is safe to store data until a FOTA job is received.
93
-
To avoid loss during FOTA, application developers can opt to store predictions in another location.
113
+
.. note::
114
+
The storage base address must be aligned to a flash memory page boundary.
94
115
95
116
Time
96
117
****
@@ -114,6 +135,8 @@ P-GPS data can be requested from the cloud using one of the following methods:
114
135
* If :kconfig:option:`CONFIG_NRF_CLOUD_REST` is enabled:
115
136
116
137
* Pass a properly initialized :c:struct:`nrf_cloud_rest_pgps_request` structure to the :c:func:`nrf_cloud_rest_pgps_data_get` function.
138
+
* Pass the response to the :c:func:`nrf_cloud_pgps_process` function.
139
+
* If either call fails, call the :c:func:`nrf_cloud_pgps_request_reset` function.
117
140
118
141
* Indirectly:
119
142
@@ -125,7 +148,8 @@ P-GPS data can be requested from the cloud using one of the following methods:
125
148
126
149
* If :kconfig:option:`CONFIG_NRF_CLOUD_REST` is enabled:
The indirect methods are used in the :ref:`asset_tracker_v2` application.
131
155
They are simpler to use than the direct methods.
@@ -146,6 +170,7 @@ The indirect method is used in the :ref:`gnss_sample` sample and in the :ref:`as
146
170
147
171
The application can inject the data contained in the prediction to the GNSS module in the modem by calling the :c:func:`nrf_cloud_pgps_inject` function.
148
172
This must be done when event :c:enumerator:`NRF_MODEM_GNSS_EVT_AGPS_REQ` is received from the GNSS interface.
173
+
After injecting the prediction, call the :c:func:`nrf_cloud_pgps_preemptive_updates` function to update the prediction set as needed.
149
174
150
175
A prediction is also automatically injected to the modem every four hours whenever the current prediction expires and the next one begins (if the next one is available in flash).
Copy file name to clipboardExpand all lines: doc/nrf/releases/release-notes-changelog.rst
+30Lines changed: 30 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,6 +89,7 @@ nRF9160: Asset Tracker v2
89
89
* Support for :ref:`Bosch Software Environmental Cluster (BSEC) library <bosch_software_environmental_cluster_library>` driver.
90
90
* Support for Indoor Air Quality (IAQ) readings retrieved from the BME680 sensor on Thingy:91. For more information, see the :ref:`asset_tracker_v2_sensor_module`.
91
91
* Support for QEMU x86 emulation.
92
+
* Support for the :ref:`lib_nrf_cloud_pgps` flash memory partition under certain conditions.
92
93
93
94
* Updated:
94
95
@@ -112,6 +113,11 @@ nRF9160: Serial LTE modem
112
113
* Enhanced the ``#XSLEEP`` AT command to support data indication when idle.
113
114
* Enhanced the MQTT client to support the reception of large PUBLISH payloads.
114
115
116
+
* Fixed:
117
+
118
+
* The secondary MCUboot partition information is no longer passed to the P-GPS library if the P-GPS partition is enabled.
119
+
* The combined use of A-GPS and P-GPS so that ephemeris and almanac data is not requested via A-GPS, saving both power and bandwidth.
120
+
115
121
nRF Desktop
116
122
-----------
117
123
@@ -200,6 +206,7 @@ nRF9160 samples
200
206
* Iperf3 usage over Zephyr native TCP/IP stack and nRF9160 LTE default context.
201
207
* Support for the GNSS features introduced in modem firmware v1.3.2.
202
208
This includes several new fields in the PVT notification and a command to query the expiry times of assistance data.
209
+
* Support for the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_PARTITION` option.
203
210
204
211
* :ref:`nrf_cloud_rest_fota` sample:
205
212
@@ -226,6 +233,10 @@ nRF9160 samples
226
233
227
234
* Updated the default HTTPS URL and certificate due to the old link being broken.
228
235
236
+
* :ref:`gnss_sample` sample:
237
+
238
+
* Added support for the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_PARTITION` option.
239
+
229
240
OpenThread samples
230
241
------------------
231
242
@@ -378,6 +389,9 @@ Modem libraries
378
389
379
390
* Added:
380
391
392
+
* Support for the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_PARTITION` option.
393
+
* Improved integration of A-GPS and P-GPS when both are enabled.
394
+
* A missing call to the :c:func:`nrf_cloud_pgps_notify_prediction` function, when using the REST interface with P-GPS.
381
395
* Support for P-GPS data retrieval from an external source, implemented separately by the application.
382
396
Enabled by setting the :kconfig:option:`CONFIG_LOCATION_METHOD_GNSS_PGPS_EXTERNAL` option.
383
397
The library triggers a :c:enum:`LOCATION_EVT_GNSS_PREDICTION_REQUEST` event when assistance is needed.
@@ -469,6 +483,18 @@ Libraries for networking
469
483
470
484
* Added :kconfig:option:`CONFIG_AZURE_IOT_HUB_NATIVE_TLS` option to configure the socket to be native for TLS instead of offloading TLS operations to the modem.
471
485
486
+
* :ref:`lib_nrf_cloud_pgps` library:
487
+
488
+
* Added:
489
+
490
+
* The passing of the current prediction, if one is available, along with the ``PGPS_EVT_READY`` event.
491
+
* The following three ways to define the storage location in the flash memory:
492
+
493
+
* A dedicated P-GPS partition, enabled with the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_PARTITION` option.
494
+
* The use of the MCUboot secondary partition as storage, enabled with the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_MCUBOOT_SECONDARY` option.
495
+
* An application-specific storage, enabled with the :kconfig:option:`CONFIG_NRF_CLOUD_PGPS_STORAGE_CUSTOM` option.
496
+
497
+
472
498
Libraries for NFC
473
499
-----------------
474
500
@@ -528,6 +554,10 @@ Other libraries
528
554
529
555
* Fixed a compilation error for nRF52833.
530
556
557
+
* Partition Manager:
558
+
559
+
* Added the :file:`ncs/nrf/subsys/partition_manager/pm.yml.pgps` file.
0 commit comments