nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ location_pgps_data_process()

int location_pgps_data_process ( const char *  buf,
size_t  buf_len 
)

#include <include/modem/location.h>

Feed in P-GPS data to be processed by library.

If Location library is not receiving P-GPS assistance data directly from nRF Cloud, it triggers the LOCATION_EVT_GNSS_PREDICTION_REQUEST event when assistance is needed. Once application has obtained the assistance data it can be handed over to Location library using this function.

Note that the data must be formatted similarly to the nRF Cloud P-GPS data, see for example nrf_cloud_pgps_schema_v1.h.

Parameters
[in]bufData received.
[in]buf_lenBuffer size of data to be processed.
Returns
0 on success, or negative error code on failure.
Return values
-EINVALGiven buffer is NULL or buffer length zero.
-ENOTSUP
embed:rst:inline :kconfig:option:`CONFIG_LOCATION_SERVICE_EXTERNAL` 
is not set.