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

Data Structures

struct  location_datetime
struct  location_data_details_gnss
struct  location_data_details_cellular
struct  location_data_details_wifi
struct  location_data_details
struct  location_data
struct  location_data_error
struct  location_data_unknown
struct  location_data_fallback
struct  location_data_cloud
struct  location_event_data
struct  location_gnss_config
struct  location_cellular_config
struct  location_wifi_channel
struct  location_wifi_config
struct  location_method_config
struct  location_config

Macros

#define LOCATION_WIFI_BAND_2_4_GHZ   BIT(0)
#define LOCATION_WIFI_BAND_5_GHZ   BIT(1)

Typedefs

typedef void(* location_event_handler_t) (const struct location_event_data *event_data)
 Event handler prototype.

Enumerations

enum  location_method { LOCATION_METHOD_CELLULAR = 1 , LOCATION_METHOD_GNSS , LOCATION_METHOD_WIFI , LOCATION_METHOD_WIFI_CELLULAR }
enum  location_req_mode { LOCATION_REQ_MODE_FALLBACK = 0 , LOCATION_REQ_MODE_ALL }
enum  location_event_id {
  LOCATION_EVT_LOCATION = 1 , LOCATION_EVT_TIMEOUT , LOCATION_EVT_ERROR , LOCATION_EVT_RESULT_UNKNOWN ,
  LOCATION_EVT_GNSS_ASSISTANCE_REQUEST , LOCATION_EVT_GNSS_PREDICTION_REQUEST , LOCATION_EVT_CLOUD_LOCATION_EXT_REQUEST , LOCATION_EVT_STARTED ,
  LOCATION_EVT_FALLBACK , LOCATION_EVT_CANCELLED
}
enum  location_ext_result { LOCATION_EXT_RESULT_SUCCESS , LOCATION_EXT_RESULT_UNKNOWN , LOCATION_EXT_RESULT_ERROR }
enum  location_accuracy { LOCATION_ACCURACY_LOW , LOCATION_ACCURACY_NORMAL , LOCATION_ACCURACY_HIGH }
enum  location_wifi_scan_type { LOCATION_WIFI_SCAN_TYPE_ACTIVE = 0 , LOCATION_WIFI_SCAN_TYPE_PASSIVE }

Functions

int location_handler_register (location_event_handler_t handler)
int location_handler_deregister (location_event_handler_t handler)
int location_init (location_event_handler_t handler)
 Initializes the library.
int location_request (const struct location_config *config)
 Requests the current position or starts periodic position updates.
int location_request_cancel (void)
 Cancels periodic position updates.
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.
const char * location_method_str (enum location_method method)
 Return location method as a string.
const struct location_data_details * location_details_get (const struct location_event_data *event_data)
 Get location data details from the location event data.
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.
void location_cloud_location_ext_result_set (enum location_ext_result result, struct location_data *location)
 Pass cloud location result to the library.

Detailed Description