7#ifndef NRF_CLOUD_LOCATION_H_
8#define NRF_CLOUD_LOCATION_H_
14#include <zephyr/kernel.h>
15#include <zephyr/sys/slist.h>
29#define NRF_CLOUD_LOCATION_WIFI_OMIT_RSSI (INT8_MAX)
31#define NRF_CLOUD_LOCATION_WIFI_OMIT_CHAN (0)
34#define NRF_CLOUD_LOCATION_WIFI_AP_CNT_MIN 2
37#define NRF_CLOUD_LOCATION_ANCHOR_NAME_MAX 32
57#define NRF_CLOUD_ANCHOR_LIST_BUF_MIN_SZ (sizeof(struct nrf_cloud_anchor_list_node) + \
58 NRF_CLOUD_LOCATION_ANCHOR_NAME_MAX + 1)
112#define NRF_CLOUD_LOCATION_CELL_OMIT_TIME_ADV LTE_LC_CELL_TIMING_ADVANCE_INVALID
114#define NRF_CLOUD_LOCATION_CELL_OMIT_RSRQ LTE_LC_CELL_RSRQ_INVALID
116#define NRF_CLOUD_LOCATION_CELL_OMIT_RSRP LTE_LC_CELL_RSRP_INVALID
118#define NRF_CLOUD_LOCATION_CELL_OMIT_EARFCN UINT32_MAX
121#define NRF_CLOUD_LOCATION_CELL_TIME_ADV_MAX LTE_LC_CELL_TIMING_ADVANCE_MAX
123#if defined(CONFIG_NRF_CLOUD_MQTT)
void(* nrf_cloud_location_response_t)(const struct nrf_cloud_location_result *const pos)
Cloud location result handler function type.
Definition nrf_cloud_location.h:129
int nrf_cloud_location_request(const struct lte_lc_cells_info *const cells_inf, const struct wifi_scan_info *const wifi_inf, const struct nrf_cloud_location_config *const config, nrf_cloud_location_response_t cb)
Perform an nRF Cloud location request over MQTT.
int nrf_cloud_location_process(const char *buf, struct nrf_cloud_location_result *result)
Process location data received from nRF Cloud over MQTT or REST.
nrf_cloud_location_type
Location request type.
Definition nrf_cloud_location.h:40
@ LOCATION_TYPE__INVALID
Definition nrf_cloud_location.h:45
@ LOCATION_TYPE_WIFI
Definition nrf_cloud_location.h:43
@ LOCATION_TYPE_SINGLE_CELL
Definition nrf_cloud_location.h:41
@ LOCATION_TYPE_MULTI_CELL
Definition nrf_cloud_location.h:42
int nrf_cloud_location_scell_data_get(struct lte_lc_cell *const cell_inf)
Get the cellular network information from the modem that is required for a single-cell location reque...
nrf_cloud_error
nRF Cloud error codes. See the Error Codes section of nRF Cloud API documentation for more informatio...
Definition nrf_cloud.h:210
sys_snode_t node
Definition nrf_cloud_location.h:50
char name[]
Definition nrf_cloud_location.h:51
Anchor name list node, to be used with sys_slist_t APIs.
Definition nrf_cloud_location.h:49
bool hi_conf
Definition nrf_cloud_location.h:103
bool fallback
Definition nrf_cloud_location.h:108
bool do_reply
Definition nrf_cloud_location.h:101
Location request config.
Definition nrf_cloud_location.h:97
double lon
Definition nrf_cloud_location.h:67
uint32_t anchor_cnt
Definition nrf_cloud_location.h:76
char * anchor_buf
Definition nrf_cloud_location.h:90
enum nrf_cloud_error err
Definition nrf_cloud_location.h:73
double lat
Definition nrf_cloud_location.h:65
size_t anchor_buf_sz
Definition nrf_cloud_location.h:93
sys_slist_t anchor_list
Definition nrf_cloud_location.h:82
enum nrf_cloud_location_type type
Definition nrf_cloud_location.h:63
uint32_t unc
Definition nrf_cloud_location.h:71
Location request result.
Definition nrf_cloud_location.h:61
Access points found during a Wi-Fi scan.
Definition wifi_location_common.h:29