nrfxlib API 2.8.99
Loading...
Searching...
No Matches
nrf_modem_gnss.h File Reference
#include <stdint.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  nrf_modem_gnss_1pps_config
 Configuration for the nrf_modem_gnss_1pps_enable function. More...
 
struct  nrf_modem_gnss_datetime
 Date and time. More...
 
struct  nrf_modem_gnss_sv
 Space Vehicle (SV) information. More...
 
struct  nrf_modem_gnss_pvt_data_frame
 Position, Velocity and Time (PVT) data frame. More...
 
struct  nrf_modem_gnss_nmea_data_frame
 Single null-terminated NMEA sentence. More...
 
struct  nrf_modem_gnss_agnss_system_data_need
 Ephemeris and almanac data need for a system. More...
 
struct  nrf_modem_gnss_agnss_data_frame
 A-GNSS notification data frame used by GNSS to let the application know it needs new assistance data. More...
 
struct  nrf_modem_gnss_agnss_sv_expiry
 Ephemeris and almanac expiry times for a satellite. More...
 
struct  nrf_modem_gnss_agnss_expiry
 A-GNSS data expiry. More...
 
struct  nrf_modem_gnss_agnss_gps_data_utc
 A-GNSS GPS UTC parameters. More...
 
struct  nrf_modem_gnss_agnss_gps_data_ephemeris
 A-GNSS GPS/QZSS ephemeris data. More...
 
struct  nrf_modem_gnss_agnss_gps_data_almanac
 A-GNSS GPS/QZSS almanac data. More...
 
struct  nrf_modem_gnss_agnss_data_klobuchar
 A-GNSS Klobuchar ionospheric correction data. More...
 
struct  nrf_modem_gnss_agnss_data_nequick
 A-GNSS NeQuick ionospheric correction data. More...
 
struct  nrf_modem_gnss_agnss_gps_data_tow_element
 A-GNSS GPS TOW assistance data for a satellite. More...
 
struct  nrf_modem_gnss_agnss_gps_data_system_time_and_sv_tow
 A-GNSS GPS system time and satellite TOW data. More...
 
struct  nrf_modem_gnss_agnss_data_location
 A-GNSS location data. More...
 
struct  nrf_modem_gnss_agps_data_integrity
 A-GPS satellite integrity data. More...
 
struct  nrf_modem_gnss_agnss_data_signal_integrity
 A-GNSS satellite integrity mask for a signal. More...
 
struct  nrf_modem_gnss_agnss_data_integrity
 A-GNSS satellite integrity data. More...
 

Macros

#define NRF_MODEM_GNSS_MAX_SYSTEMS   4
 
#define NRF_MODEM_GNSS_MAX_SIGNALS   4
 
#define NRF_MODEM_GNSS_MAX_SATELLITES   12
 Maximum number of satellites that can be tracked at the same time.
 
#define NRF_MODEM_GNSS_NUM_GPS_SATELLITES   32
 
#define NRF_MODEM_GNSS_SYSTEM_INVALID   0
 Invalid.
 
#define NRF_MODEM_GNSS_SYSTEM_GPS   1
 GPS.
 
#define NRF_MODEM_GNSS_SYSTEM_QZSS   3
 QZSS.
 
#define NRF_MODEM_GNSS_SIGNAL_INVALID   0
 Invalid.
 
#define NRF_MODEM_GNSS_SIGNAL_GPS_L1_CA   1
 GPS L1 C/A.
 
#define NRF_MODEM_GNSS_SIGNAL_QZSS_L1_CA   3
 QZSS L1 C/A.
 
#define NRF_MODEM_GNSS_SYSTEM_GPS_L1_CA_MASK   0x01
 Global Positioning System (GPS) L1 C/A.
 
#define NRF_MODEM_GNSS_SYSTEM_QZSS_L1_CA_MASK   0x04
 Quasi-Zenith Satellite System (QZSS) L1 C/A.
 
#define NRF_MODEM_GNSS_NMEA_GGA_MASK   0x01
 Enables Global Positioning System Fix Data.
 
#define NRF_MODEM_GNSS_NMEA_GLL_MASK   0x02
 Enables Geographic Position Latitude/Longitude and time.
 
#define NRF_MODEM_GNSS_NMEA_GSA_MASK   0x04
 Enables DOP and active satellites.
 
#define NRF_MODEM_GNSS_NMEA_GSV_MASK   0x08
 Enables Satellites in view.
 
#define NRF_MODEM_GNSS_NMEA_RMC_MASK   0x10
 Enables Recommended minimum specific GPS/Transit data.
 
#define NRF_MODEM_GNSS_PSM_DISABLED   0
 No power save mode is enabled.
 
#define NRF_MODEM_GNSS_PSM_DUTY_CYCLING_PERFORMANCE   1
 Enables duty-cycling performance policy power save mode.
 
#define NRF_MODEM_GNSS_PSM_DUTY_CYCLING_POWER   2
 Enables duty-cycling power policy power save mode.
 
#define NRF_MODEM_GNSS_USE_CASE_MULTIPLE_HOT_START   0x01
 Multiple hot starts performance mode.
 
#define NRF_MODEM_GNSS_USE_CASE_LOW_ACCURACY   0x02
 Low accuracy fixes allowed.
 
#define NRF_MODEM_GNSS_USE_CASE_SCHED_DOWNLOAD_DISABLE   0x04
 Disable scheduled downloads.
 
#define NRF_MODEM_GNSS_PVT_FLAG_FIX_VALID   0x01
 A valid fix has been acquired.
 
#define NRF_MODEM_GNSS_PVT_FLAG_LEAP_SECOND_VALID   0x02
 The leap second information is valid.
 
#define NRF_MODEM_GNSS_PVT_FLAG_SLEEP_BETWEEN_PVT   0x04
 At least one sleep period has passed since the last PVT notification.
 
#define NRF_MODEM_GNSS_PVT_FLAG_DEADLINE_MISSED   0x08
 Notification deadline was missed.
 
#define NRF_MODEM_GNSS_PVT_FLAG_NOT_ENOUGH_WINDOW_TIME   0x10
 Average time windows granted to GNSS may be too short.
 
#define NRF_MODEM_GNSS_PVT_FLAG_VELOCITY_VALID   0x20
 The velocity estimate is valid.
 
#define NRF_MODEM_GNSS_PVT_FLAG_SCHED_DOWNLOAD   0x40
 The PVT notification was sent because of a scheduled download.
 
#define NRF_MODEM_GNSS_SV_FLAG_USED_IN_FIX   0x02
 The satellite is used in the position calculation.
 
#define NRF_MODEM_GNSS_SV_FLAG_UNHEALTHY   0x08
 The satellite is unhealthy.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_UTC_PARAMETERS   1
 GPS UTC assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_EPHEMERIDES   2
 GPS/QZSS ephemeris assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_ALMANAC   3
 GPS/QZSS almanac assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_AGNSS_KLOBUCHAR_IONOSPHERIC_CORRECTION   4
 Ionospheric assistance A-GNSS parameters, Klobuchar model.
 
#define NRF_MODEM_GNSS_AGNSS_NEQUICK_IONOSPHERIC_CORRECTION   5
 Ionospheric assistance A-GNSS parameters, NeQuick model.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_SYSTEM_CLOCK_AND_TOWS   6
 GPS system time and satellite TOW assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_AGNSS_LOCATION   7
 Location assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_AGPS_INTEGRITY   8
 Integrity assistance A-GPS parameters.
 
#define NRF_MODEM_GNSS_AGNSS_INTEGRITY   9
 Integrity assistance A-GNSS parameters.
 
#define NRF_MODEM_GNSS_EVT_PVT   1
 PVT event.
 
#define NRF_MODEM_GNSS_EVT_FIX   2
 GNSS fix event.
 
#define NRF_MODEM_GNSS_EVT_NMEA   3
 NMEA event.
 
#define NRF_MODEM_GNSS_EVT_AGNSS_REQ   4
 Need new A-GNSS data event.
 
#define NRF_MODEM_GNSS_EVT_BLOCKED   5
 GNSS is blocked by LTE event.
 
#define NRF_MODEM_GNSS_EVT_UNBLOCKED   6
 GNSS is unblocked by LTE event.
 
#define NRF_MODEM_GNSS_EVT_PERIODIC_WAKEUP   7
 GNSS woke up in periodic mode.
 
#define NRF_MODEM_GNSS_EVT_SLEEP_AFTER_TIMEOUT   8
 GNSS enters sleep because fix retry timeout was reached in periodic or single fix mode.
 
#define NRF_MODEM_GNSS_EVT_SLEEP_AFTER_FIX   9
 GNSS enters sleep because fix was achieved in periodic mode.
 
#define NRF_MODEM_GNSS_EVT_REF_ALT_EXPIRED   10
 Reference altitude for 3-satellite fix expired.
 
#define NRF_MODEM_GNSS_DATA_PVT   1
 PVT (Position-Velocity-Time) data.
 
#define NRF_MODEM_GNSS_DATA_NMEA   2
 NMEA data.
 
#define NRF_MODEM_GNSS_DATA_AGNSS_REQ   3
 A-GNSS request data.
 
#define NRF_MODEM_GNSS_TIMING_SOURCE_RTC   0
 Real time clock (RTC).
 
#define NRF_MODEM_GNSS_TIMING_SOURCE_TCXO   1
 Temperature compensated crystal oscillator (TCXO).
 
#define NRF_MODEM_GNSS_QZSS_NMEA_MODE_STANDARD   0
 Standard NMEA reporting.
 
#define NRF_MODEM_GNSS_QZSS_NMEA_MODE_CUSTOM   1
 Custom NMEA reporting with QZSS satellites.
 
#define NRF_MODEM_GNSS_NMEA_MAX_LEN   83
 Maximum length of an NMEA string including the null-terminator.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_UTC_REQUEST   0x01
 GPS UTC parameters assistance data.
 
#define NRF_MODEM_GNSS_AGNSS_KLOBUCHAR_REQUEST   0x02
 Klobuchar ionospheric correction parameters assistance data.
 
#define NRF_MODEM_GNSS_AGNSS_NEQUICK_REQUEST   0x04
 NeQuick ionospheric correction parameters assistance data.
 
#define NRF_MODEM_GNSS_AGNSS_GPS_SYS_TIME_AND_SV_TOW_REQUEST   0x08
 GPS system time and SV TOWs assistance data.
 
#define NRF_MODEM_GNSS_AGNSS_POSITION_REQUEST   0x10
 Position assistance parameters assistance data.
 
#define NRF_MODEM_GNSS_AGNSS_INTEGRITY_REQUEST   0x20
 Integrity assistance parameters assistance data.
 
#define NRF_MODEM_GNSS_MAX_SV_EXPIRY_TIMES   127
 
#define NRF_MODEM_GNSS_AGNSS_GPS_MAX_SV_TOW   32
 Maximum number of TOW elements in the TOW array.
 
#define NRF_MODEM_GNSS_DELETE_EPHEMERIDES   0x001
 Ephemerides.
 
#define NRF_MODEM_GNSS_DELETE_ALMANACS   0x002
 Almanacs (excluding leap second and ionospheric correction).
 
#define NRF_MODEM_GNSS_DELETE_IONO_CORRECTION_DATA   0x004
 Ionospheric correction parameters.
 
#define NRF_MODEM_GNSS_DELETE_LAST_GOOD_FIX   0x008
 Last good fix (the last position).
 
#define NRF_MODEM_GNSS_DELETE_GPS_TOW   0x010
 GPS time-of-week (TOW).
 
#define NRF_MODEM_GNSS_DELETE_GPS_WEEK   0x020
 GPS week number.
 
#define NRF_MODEM_GNSS_DELETE_UTC_DATA   0x040
 Leap second (UTC parameters).
 
#define NRF_MODEM_GNSS_DELETE_TCXO_OFFSET   0x080
 Local clock (TCXO) frequency offset.
 
#define NRF_MODEM_GNSS_DELETE_GPS_TOW_PRECISION   0x100
 Precision estimate of GPS time-of-week (TOW).
 
#define NRF_MODEM_GNSS_DELETE_EKF   0x400
 Extended Kalman Filter (EKF) state (last position/velocity/time solution).
 
#define NRF_MODEM_GNSS_DYNAMICS_GENERAL_PURPOSE   0
 General purpose mode. Assumed maximum speed 100 km/h.
 
#define NRF_MODEM_GNSS_DYNAMICS_STATIONARY   1
 Optimize for stationary use case. Assumed maximum speed 5 km/h.
 
#define NRF_MODEM_GNSS_DYNAMICS_PEDESTRIAN   2
 Optimize for pedestrian use case. Assumed maximum speed 30 km/h.
 
#define NRF_MODEM_GNSS_DYNAMICS_AUTOMOTIVE   3
 Optimize for automotive use case. Assumed maximum speed > 100 km/h.
 

Typedefs

typedef void(* nrf_modem_gnss_event_handler_type_t) (int event)
 Event handler prototype.
 

Functions

int32_t nrf_modem_gnss_event_handler_set (nrf_modem_gnss_event_handler_type_t handler)
 Sets the GNSS event handler.
 
int32_t nrf_modem_gnss_signal_mask_set (uint8_t signal_mask)
 Sets the supported GNSS signals. Signals which have the corresponding bit set are enabled.
 
int32_t nrf_modem_gnss_elevation_threshold_set (uint8_t angle)
 Set below which elevation angle GNSS should stop tracking a satellite.
 
int32_t nrf_modem_gnss_use_case_set (uint8_t use_case)
 Sets targeted start and runtime performance.
 
int32_t nrf_modem_gnss_fix_interval_set (uint16_t fix_interval)
 Sets the GNSS fix interval in seconds.
 
int32_t nrf_modem_gnss_fix_retry_set (uint16_t fix_retry)
 Sets the GNSS fix retry period in seconds.
 
int32_t nrf_modem_gnss_nmea_mask_set (uint16_t nmea_mask)
 Sets which NMEA strings are enabled.
 
int32_t nrf_modem_gnss_power_mode_set (uint8_t power_mode)
 Sets the used power saving mode.
 
int32_t nrf_modem_gnss_timing_source_set (uint8_t timing_source)
 Sets the used timing source during GNSS sleep.
 
int32_t nrf_modem_gnss_qzss_nmea_mode_set (uint8_t nmea_mode)
 Sets the used QZSS NMEA mode.
 
int32_t nrf_modem_gnss_qzss_prn_mask_set (uint16_t prn_mask)
 Sets which QZSS PRNs are enabled.
 
int32_t nrf_modem_gnss_start (void)
 Starts GNSS.
 
int32_t nrf_modem_gnss_stop (void)
 Stops GNSS.
 
int32_t nrf_modem_gnss_nv_data_delete (uint32_t delete_mask)
 Deletes GNSS data from non-volatile memory.
 
int32_t nrf_modem_gnss_prio_mode_enable (void)
 Enables GNSS priority over LTE idle mode procedures.
 
int32_t nrf_modem_gnss_prio_mode_disable (void)
 Disables GNSS priority over LTE idle mode procedures.
 
int32_t nrf_modem_gnss_dyn_mode_change (uint32_t mode)
 Changes GNSS dynamics mode.
 
int32_t nrf_modem_gnss_1pps_enable (const struct nrf_modem_gnss_1pps_config *config)
 Enables 1PPS functionality.
 
int32_t nrf_modem_gnss_1pps_disable (void)
 Disables 1PPS functionality.
 
int32_t nrf_modem_gnss_read (void *buf, int32_t buf_len, int type)
 Reads data from GNSS.
 
int32_t nrf_modem_gnss_agnss_write (void *buf, int32_t buf_len, uint16_t type)
 Writes A-GNSS data to GNSS.
 
int32_t nrf_modem_gnss_agnss_expiry_get (struct nrf_modem_gnss_agnss_expiry *agnss_expiry)
 Reads the current A-GNSS data need and expiry times from GNSS.