13#if (defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_NRF_CLOUD_AGNSS)) ||\
14 defined(CONFIG_LOCATION_DATA_DETAILS)
15#include <nrf_modem_gnss.h>
17#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_NRF_CLOUD_PGPS)
20#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_LOCATION_METHOD_CELLULAR)
23#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_LOCATION_METHOD_WIFI)
172#if defined(CONFIG_LOCATION_DATA_DETAILS)
225#if defined(CONFIG_LOCATION_METHOD_GNSS)
229#if defined(CONFIG_LOCATION_METHOD_CELLULAR)
233#if defined(CONFIG_LOCATION_METHOD_WIFI)
251#if defined(CONFIG_LOCATION_DATA_DETAILS)
257#if defined(CONFIG_LOCATION_DATA_DETAILS)
287#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_LOCATION_METHOD_CELLULAR)
291#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_LOCATION_METHOD_WIFI)
309#if defined(CONFIG_LOCATION_DATA_DETAILS)
330#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_NRF_CLOUD_AGNSS)
337#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) && defined(CONFIG_NRF_CLOUD_PGPS)
344#if defined(CONFIG_LOCATION_SERVICE_EXTERNAL) &&\
345 (defined(CONFIG_LOCATION_METHOD_CELLULAR) || defined(CONFIG_LOCATION_METHOD_WIFI))
667 uint8_t methods_count,
void location_cloud_location_ext_result_set(enum location_ext_result result, struct location_data *location)
Pass cloud location result to the library.
int location_agnss_data_process(const char *buf, size_t buf_len)
Feed in A-GNSS data to be processed by library.
int location_pgps_data_process(const char *buf, size_t buf_len)
Feed in P-GPS data to be processed by library.
location_ext_result
Definition location.h:128
@ LOCATION_EXT_RESULT_SUCCESS
Definition location.h:130
@ LOCATION_EXT_RESULT_UNKNOWN
Definition location.h:137
@ LOCATION_EXT_RESULT_ERROR
Definition location.h:139
location_req_mode
Definition location.h:62
@ LOCATION_REQ_MODE_FALLBACK
Definition location.h:64
@ LOCATION_REQ_MODE_ALL
Definition location.h:66
int location_request_cancel(void)
Cancels periodic position updates.
int location_init(location_event_handler_t handler)
Initializes the library.
void location_config_defaults_set(struct location_config *config, uint8_t methods_count, enum location_method *method_types)
Sets the default values to a given configuration.
int location_handler_register(location_event_handler_t handler)
void(* location_event_handler_t)(const struct location_event_data *event_data)
Event handler prototype.
Definition location.h:580
int location_handler_deregister(location_event_handler_t handler)
const struct location_data_details * location_details_get(const struct location_event_data *event_data)
Get location data details from the location event data.
const char * location_method_str(enum location_method method)
Return location method as a string.
int location_request(const struct location_config *config)
Requests the current position or starts periodic position updates.
location_accuracy
Definition location.h:143
@ LOCATION_ACCURACY_LOW
Definition location.h:145
@ LOCATION_ACCURACY_NORMAL
Definition location.h:147
@ LOCATION_ACCURACY_HIGH
Definition location.h:149
location_event_id
Definition location.h:70
@ LOCATION_EVT_RESULT_UNKNOWN
Definition location.h:83
@ LOCATION_EVT_STARTED
Definition location.h:109
@ LOCATION_EVT_GNSS_ASSISTANCE_REQUEST
Definition location.h:89
@ LOCATION_EVT_ERROR
Definition location.h:76
@ LOCATION_EVT_LOCATION
Definition location.h:72
@ LOCATION_EVT_CANCELLED
Definition location.h:124
@ LOCATION_EVT_GNSS_PREDICTION_REQUEST
Definition location.h:95
@ LOCATION_EVT_CLOUD_LOCATION_EXT_REQUEST
Definition location.h:103
@ LOCATION_EVT_FALLBACK
Definition location.h:117
@ LOCATION_EVT_TIMEOUT
Definition location.h:74
location_method
Definition location.h:39
@ LOCATION_METHOD_CELLULAR
Definition location.h:41
@ LOCATION_METHOD_WIFI_CELLULAR
Definition location.h:58
@ LOCATION_METHOD_WIFI
Definition location.h:45
@ LOCATION_METHOD_GNSS
Definition location.h:43
Module to provide nRF Cloud Predicted GPS (P-GPS) support to nRF9160 SiP.
P-GPS request type.
Definition nrf_cloud_pgps.h:86
uint8_t cell_count
Number of cells to be requested for cellular positioning.
Definition location.h:482
int32_t timeout
Timeout (in milliseconds) of how long the cellular positioning procedure can take....
Definition location.h:459
Definition location.h:443
struct location_method_config methods[CONFIG_LOCATION_METHODS_LIST_SIZE]
Selected location methods and associated configurations in priority order.
Definition location.h:536
enum location_req_mode mode
Location acquisition mode.
Definition location.h:572
int32_t timeout
Timeout (in milliseconds) for the entire location request.
Definition location.h:564
uint8_t methods_count
Definition location.h:523
uint16_t interval
Position update interval in seconds.
Definition location.h:548
Definition location.h:521
const struct lte_lc_cells_info * cell_data
Definition location.h:289
const struct wifi_scan_info * wifi_data
Definition location.h:293
Definition location.h:286
uint8_t ncells_count
Definition location.h:196
uint8_t gci_cells_count
Definition location.h:198
Definition location.h:194
uint32_t elapsed_time_gnss
Definition location.h:190
struct nrf_modem_gnss_pvt_data_frame pvt_data
Definition location.h:180
uint8_t satellites_tracked
Definition location.h:176
uint8_t satellites_used
Definition location.h:178
Definition location.h:174
uint16_t ap_count
Definition location.h:204
Definition location.h:202
struct location_data_details_cellular cellular
Definition location.h:231
uint32_t elapsed_time_method
Definition location.h:223
struct location_data_details_wifi wifi
Definition location.h:235
Definition location.h:215
struct location_data_details details
Definition location.h:261
Definition location.h:259
enum location_method next_method
Definition location.h:273
struct location_data_details details
Definition location.h:281
enum location_event_id cause
Definition location.h:279
Definition location.h:271
struct location_data_details details
Definition location.h:267
Definition location.h:265
double latitude
Definition location.h:243
float accuracy
Definition location.h:247
double longitude
Definition location.h:245
struct location_data_details details
Definition location.h:253
struct location_datetime datetime
Definition location.h:249
Definition location.h:241
uint8_t day
Definition location.h:161
uint8_t second
Definition location.h:167
uint16_t ms
Definition location.h:169
bool valid
Definition location.h:155
uint8_t minute
Definition location.h:165
uint8_t hour
Definition location.h:163
uint16_t year
Definition location.h:157
uint8_t month
Definition location.h:159
Definition location.h:153
struct location_data_cloud cloud_location_request
Definition location.h:351
struct gps_pgps_request pgps_request
Definition location.h:342
struct location_data_unknown unknown
Definition location.h:320
enum location_method method
Definition location.h:302
struct location_data_error error
Definition location.h:314
struct location_data_fallback fallback
Definition location.h:327
struct nrf_modem_gnss_agnss_data_frame agnss_request
Definition location.h:335
enum location_event_id id
Definition location.h:300
struct location_data location
Definition location.h:307
Definition location.h:298
int32_t timeout
Timeout (in milliseconds), meaning how long GNSS is allowed to run when trying to acquire a fix....
Definition location.h:374
enum location_accuracy accuracy
Desired accuracy level.
Definition location.h:388
bool priority_mode
Enable GNSS priority mode if GNSS does not get enough runtime due to LTE idle mode operations.
Definition location.h:439
bool visibility_detection
Obstructed visibility detection. If set to true, the library tries to detect situations where getting...
Definition location.h:417
uint8_t num_consecutive_fixes
The number of fixes GNSS is allowed to produce before the library outputs the current location when a...
Definition location.h:401
Definition location.h:357
enum location_method method
Definition location.h:509
struct location_gnss_config gnss
Definition location.h:514
struct location_cellular_config cellular
Definition location.h:512
struct location_wifi_config wifi
Definition location.h:516
Definition location.h:507
int32_t timeout
Timeout (in milliseconds) of how long the Wi-Fi positioning procedure can take. SYS_FOREVER_MS means ...
Definition location.h:503
Definition location.h:486
Results of neighbor cell measurements.
Definition lte_lc.h:673
Access points found during a Wi-Fi scan.
Definition wifi_location_common.h:29