Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
gps_ubx.h File Reference

UBX protocol specific code. More...

#include "modules/gps/gps.h"
#include "mcu_periph/uart.h"
#include "pprzlink/pprzlink_device.h"
Include dependency graph for gps_ubx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GpsUbx

Macros

#define GPS_UBX_NB   1
#define PRIMARY_GPS   GPS_UBX
#define GPS_UBX_NB_CHANNELS   40
#define GPS_UBX_MAX_PAYLOAD   1024
 e.g. UBX-NAV-SAT is 8 + 12 * numSvs bytes

Functions

void gps_ubx_init (void)
void gps_ubx_event (void)
void gps_ubx_parse_HITL_UBX (uint8_t *buf)
void ubx_header (struct link_device *dev, uint8_t nav_id, uint8_t msg_id, uint16_t len)
void ubx_trailer (struct link_device *dev)
void ubx_send_bytes (struct link_device *dev, uint8_t len, uint8_t *bytes)
void ubx_send_cfg_rst (struct link_device *dev, uint16_t bbr, uint8_t reset_mode)
void gps_ubx_periodic_check (void)

Variables

struct GpsUbx gps_ubx [GPS_UBX_NB]
uint8_t gps_ubx_reset

Detailed Description

UBX protocol specific code.

Definition in file gps_ubx.h.


Data Structure Documentation

◆ GpsUbx

struct GpsUbx

Definition at line 55 of file gps_ubx.h.

Collaboration diagram for GpsUbx:
Data Fields
uint8_t ck_a
uint8_t ck_b
struct link_device * dev
uint8_t error_cnt
uint8_t error_last
uint8_t gnss_in_use Satellite systems used in the solution (UBX-NAV-SAT): 1 GPS, 2 GLONASS, 4 BeiDou, 8 Galileo.
uint16_t len
bool msg_available
uint8_t msg_buf[GPS_UBX_MAX_PAYLOAD]
uint8_t msg_class
uint8_t msg_id
uint16_t msg_idx
bool pacc_valid
uint8_t send_ck_a
uint8_t send_ck_b
uint8_t sol_flags
struct GpsState state
uint8_t status
uint8_t status_flags

Macro Definition Documentation

◆ GPS_UBX_MAX_PAYLOAD

#define GPS_UBX_MAX_PAYLOAD   1024

e.g. UBX-NAV-SAT is 8 + 12 * numSvs bytes

Definition at line 52 of file gps_ubx.h.

Referenced by gps_ubx_parse(), and ubx_process().

◆ GPS_UBX_NB

#define GPS_UBX_NB   1

◆ GPS_UBX_NB_CHANNELS

#define GPS_UBX_NB_CHANNELS   40

Definition at line 50 of file gps_ubx.h.

◆ PRIMARY_GPS

#define PRIMARY_GPS   GPS_UBX

Definition at line 43 of file gps_ubx.h.

Function Documentation

◆ gps_ubx_event()

void gps_ubx_event ( void )
extern

◆ gps_ubx_init()

void gps_ubx_init ( void )
extern

◆ gps_ubx_parse_HITL_UBX()

void gps_ubx_parse_HITL_UBX ( uint8_t * buf)
extern

This code simulates gps_ubx.c:parse_ubx()

Definition at line 185 of file gps_ubx.c.

References gps_ubx, and GPS_UBX_ERR_OVERRUN.

◆ gps_ubx_periodic_check()

void gps_ubx_periodic_check ( void )
extern

Definition at line 797 of file gps_ubx.c.

References gps_periodic_check(), gps_ubx, GPS_UBX_NB, and state.

Here is the call graph for this function:

◆ ubx_header()

void ubx_header ( struct link_device * dev,
uint8_t nav_id,
uint8_t msg_id,
uint16_t len )
extern

Definition at line 717 of file gps_ubx.c.

References dev, gps_ubx, GPS_UBX_NB, and ubx_send_1byte().

Here is the call graph for this function:

◆ ubx_send_bytes()

void ubx_send_bytes ( struct link_device * dev,
uint8_t len,
uint8_t * bytes )
extern

Definition at line 746 of file gps_ubx.c.

References dev, and ubx_send_1byte().

Here is the call graph for this function:

◆ ubx_send_cfg_rst()

void ubx_send_cfg_rst ( struct link_device * dev,
uint16_t bbr,
uint8_t reset_mode )
extern

References dev.

◆ ubx_trailer()

void ubx_trailer ( struct link_device * dev)
extern

Definition at line 734 of file gps_ubx.c.

References dev, gps_ubx, and GPS_UBX_NB.

Variable Documentation

◆ gps_ubx

◆ gps_ubx_reset

uint8_t gps_ubx_reset
extern

Definition at line 98 of file gps_ubx.c.

Referenced by gps_ubx_event(), and gps_ubx_init().