Zephyr API Documentation  3.7.0-rc2
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
gnss.h File Reference

Public GNSS API. More...

#include <zephyr/types.h>
#include <zephyr/device.h>
#include <zephyr/data/navigation.h>
#include <errno.h>
#include <zephyr/syscalls/gnss.h>

Go to the source code of this file.

Data Structures

struct  gnss_periodic_config
 GNSS periodic tracking configuration. More...
 
struct  gnss_info
 GNSS info data structure. More...
 
struct  gnss_time
 GNSS time data structure. More...
 
struct  gnss_driver_api
 GNSS API structure. More...
 
struct  gnss_data
 GNSS data structure. More...
 
struct  gnss_data_callback
 GNSS callback structure. More...
 
struct  gnss_satellite
 GNSS satellite structure. More...
 
struct  gnss_satellites_callback
 GNSS callback structure. More...
 

Macros

#define GNSS_DATA_CALLBACK_DEFINE(_dev, _callback)
 Register a callback structure for GNSS data published.
 
#define GNSS_SATELLITES_CALLBACK_DEFINE(_dev, _callback)
 Register a callback structure for GNSS satellites published.
 

Typedefs

typedef int(* gnss_set_fix_rate_t) (const struct device *dev, uint32_t fix_interval_ms)
 API for setting fix rate.
 
typedef int(* gnss_get_fix_rate_t) (const struct device *dev, uint32_t *fix_interval_ms)
 API for getting fix rate.
 
typedef int(* gnss_set_periodic_config_t) (const struct device *dev, const struct gnss_periodic_config *periodic_config)
 API for setting periodic tracking configuration.
 
typedef int(* gnss_get_periodic_config_t) (const struct device *dev, struct gnss_periodic_config *periodic_config)
 API for setting periodic tracking configuration.
 
typedef int(* gnss_set_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode mode)
 API for setting navigation mode.
 
typedef int(* gnss_get_navigation_mode_t) (const struct device *dev, enum gnss_navigation_mode *mode)
 API for getting navigation mode.
 
typedef uint32_t gnss_systems_t
 Type storing bitmask of GNSS systems.
 
typedef int(* gnss_set_enabled_systems_t) (const struct device *dev, gnss_systems_t systems)
 API for enabling systems.
 
typedef int(* gnss_get_enabled_systems_t) (const struct device *dev, gnss_systems_t *systems)
 API for getting enabled systems.
 
typedef int(* gnss_get_supported_systems_t) (const struct device *dev, gnss_systems_t *systems)
 API for getting enabled systems.
 
typedef void(* gnss_data_callback_t) (const struct device *dev, const struct gnss_data *data)
 Template for GNSS data callback.
 
typedef void(* gnss_satellites_callback_t) (const struct device *dev, const struct gnss_satellite *satellites, uint16_t size)
 Template for GNSS satellites callback.
 

Enumerations

enum  gnss_pps_mode { GNSS_PPS_MODE_DISABLED = 0 , GNSS_PPS_MODE_ENABLED = 1 , GNSS_PPS_MODE_ENABLED_AFTER_LOCK = 2 , GNSS_PPS_MODE_ENABLED_WHILE_LOCKED = 3 }
 GNSS PPS modes. More...
 
enum  gnss_navigation_mode { GNSS_NAVIGATION_MODE_ZERO_DYNAMICS = 0 , GNSS_NAVIGATION_MODE_LOW_DYNAMICS = 1 , GNSS_NAVIGATION_MODE_BALANCED_DYNAMICS = 2 , GNSS_NAVIGATION_MODE_HIGH_DYNAMICS = 3 }
 GNSS navigation modes. More...
 
enum  gnss_system {
  GNSS_SYSTEM_GPS = BIT(0) , GNSS_SYSTEM_GLONASS = BIT(1) , GNSS_SYSTEM_GALILEO = BIT(2) , GNSS_SYSTEM_BEIDOU = BIT(3) ,
  GNSS_SYSTEM_QZSS = BIT(4) , GNSS_SYSTEM_IRNSS = BIT(5) , GNSS_SYSTEM_SBAS = BIT(6) , GNSS_SYSTEM_IMES = BIT(7)
}
 Systems contained in gnss_systems_t. More...
 
enum  gnss_fix_status { GNSS_FIX_STATUS_NO_FIX = 0 , GNSS_FIX_STATUS_GNSS_FIX = 1 , GNSS_FIX_STATUS_DGNSS_FIX = 2 , GNSS_FIX_STATUS_ESTIMATED_FIX = 3 }
 GNSS fix status. More...
 
enum  gnss_fix_quality {
  GNSS_FIX_QUALITY_INVALID = 0 , GNSS_FIX_QUALITY_GNSS_SPS = 1 , GNSS_FIX_QUALITY_DGNSS = 2 , GNSS_FIX_QUALITY_GNSS_PPS = 3 ,
  GNSS_FIX_QUALITY_RTK = 4 , GNSS_FIX_QUALITY_FLOAT_RTK = 5 , GNSS_FIX_QUALITY_ESTIMATED = 6
}
 GNSS fix quality. More...
 

Functions

int gnss_set_fix_rate (const struct device *dev, uint32_t fix_interval_ms)
 Set the GNSS fix rate.
 
int gnss_get_fix_rate (const struct device *dev, uint32_t *fix_interval_ms)
 Get the GNSS fix rate.
 
int gnss_set_periodic_config (const struct device *dev, const struct gnss_periodic_config *config)
 Set the GNSS periodic tracking configuration.
 
int gnss_get_periodic_config (const struct device *dev, struct gnss_periodic_config *config)
 Get the GNSS periodic tracking configuration.
 
int gnss_set_navigation_mode (const struct device *dev, enum gnss_navigation_mode mode)
 Set the GNSS navigation mode.
 
int gnss_get_navigation_mode (const struct device *dev, enum gnss_navigation_mode *mode)
 Get the GNSS navigation mode.
 
int gnss_set_enabled_systems (const struct device *dev, gnss_systems_t systems)
 Set enabled GNSS systems.
 
int gnss_get_enabled_systems (const struct device *dev, gnss_systems_t *systems)
 Get enabled GNSS systems.
 
int gnss_get_supported_systems (const struct device *dev, gnss_systems_t *systems)
 Get supported GNSS systems.
 

Detailed Description

Public GNSS API.