Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
gps_ubx_ucenter.c File Reference

Configure Ublox GPS. More...

+ Include dependency graph for gps_ubx_ucenter.c:

Go to the source code of this file.

Macros

#define GPS_UBX_UCENTER_STATUS_STOPPED   0
 
#define GPS_UBX_UCENTER_STATUS_AUTOBAUD   1
 
#define GPS_UBX_UCENTER_STATUS_CONFIG   2
 
#define GPS_UBX_UCENTER_REPLY_NONE   0
 
#define GPS_UBX_UCENTER_REPLY_ACK   1
 
#define GPS_UBX_UCENTER_REPLY_NACK   2
 
#define GPS_UBX_UCENTER_REPLY_VERSION   3
 
#define NAV_DYN_STATIONARY   1
 
#define NAV_DYN_PEDESTRIAN   2
 
#define NAV_DYN_AUTOMOTIVE   3
 
#define NAV_DYN_SEA   4
 
#define NAV_DYN_AIRBORNE_1G   5
 
#define NAV_DYN_AIRBORNE_2G   6
 
#define NAV_DYN_AIRBORNE_4G   7
 
#define NAV5_DYN_PORTABLE   0
 
#define NAV5_DYN_FIXED   1
 
#define NAV5_DYN_STATIONARY   2
 
#define NAV5_DYN_PEDESTRIAN   3
 
#define NAV5_DYN_AUTOMOTIVE   4
 
#define NAV5_DYN_SEA   5
 
#define NAV5_DYN_AIRBORNE_1G   6
 
#define NAV5_DYN_AIRBORNE_2G   7
 
#define NAV5_DYN_AIRBORNE_4G   8
 
#define NAV5_2D_ONLY   1
 
#define NAV5_3D_ONLY   2
 
#define NAV5_AUTO   3
 
#define IGNORED   0
 
#define RESERVED   0
 
#define UBX_PROTO_MASK   0x0001
 
#define NMEA_PROTO_MASK   0x0002
 
#define RTCM_PROTO_MASK   0x0004
 
#define GPS_PORT_DDC   0x00
 
#define GPS_PORT_UART1   0x01
 
#define GPS_PORT_UART2   0x02
 
#define GPS_PORT_USB   0x03
 
#define GPS_PORT_SPI   0x04
 
#define GPS_PORT_ID   GPS_PORT_UART1
 
#define __UBX_GPS_BAUD(_u)   _u##_BAUD
 
#define _UBX_GPS_BAUD(_u)   __UBX_GPS_BAUD(_u)
 
#define UBX_GPS_BAUD   _UBX_GPS_BAUD(GPS_LINK)
 
#define GPS_SBAS_ENABLED   0x01
 
#define GPS_SBAS_RANGING   0x01
 
#define GPS_SBAS_CORRECTIONS   0x02
 
#define GPS_SBAS_INTEGRITY   0x04
 
#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 

Functions

static bool_t gps_ubx_ucenter_autobaud (uint8_t nr)
 
static bool_t gps_ubx_ucenter_configure (uint8_t nr)
 
void gps_ubx_ucenter_init (void)
 
void gps_ubx_ucenter_periodic (void)
 
void gps_ubx_ucenter_event (void)
 
static void gps_ubx_ucenter_config_nav (void)
 
static void gps_ubx_ucenter_config_port (void)
 
static void gps_ubx_ucenter_config_sbas (void)
 
static void gps_ubx_ucenter_enable_msg (uint8_t class, uint8_t id, uint8_t rate)
 

Variables

struct gps_ubx_ucenter_struct gps_ubx_ucenter
 

Detailed Description

Configure Ublox GPS.

Definition in file gps_ubx_ucenter.c.

Macro Definition Documentation

#define __UBX_GPS_BAUD (   _u)    _u##_BAUD

Definition at line 284 of file gps_ubx_ucenter.c.

#define _UBX_GPS_BAUD (   _u)    __UBX_GPS_BAUD(_u)

Definition at line 285 of file gps_ubx_ucenter.c.

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 330 of file gps_ubx_ucenter.c.

#define GPS_PORT_DDC   0x00

Definition at line 274 of file gps_ubx_ucenter.c.

#define GPS_PORT_ID   GPS_PORT_UART1

Definition at line 281 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_port().

#define GPS_PORT_SPI   0x04

Definition at line 278 of file gps_ubx_ucenter.c.

#define GPS_PORT_UART1   0x01

Definition at line 275 of file gps_ubx_ucenter.c.

#define GPS_PORT_UART2   0x02

Definition at line 276 of file gps_ubx_ucenter.c.

#define GPS_PORT_USB   0x03

Definition at line 277 of file gps_ubx_ucenter.c.

#define GPS_SBAS_CORRECTIONS   0x02

Definition at line 303 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_sbas().

#define GPS_SBAS_ENABLED   0x01

Definition at line 300 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_sbas().

#define GPS_SBAS_INTEGRITY   0x04

Definition at line 304 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_sbas().

#define GPS_SBAS_RANGING   0x01

Definition at line 302 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_sbas().

#define GPS_UBX_UCENTER_REPLY_ACK   1

Definition at line 46 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_autobaud(), and gps_ubx_ucenter_event().

#define GPS_UBX_UCENTER_REPLY_NACK   2

Definition at line 47 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_event().

#define GPS_UBX_UCENTER_REPLY_NONE   0
#define GPS_UBX_UCENTER_REPLY_VERSION   3

Definition at line 48 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_event().

#define GPS_UBX_UCENTER_STATUS_AUTOBAUD   1

Definition at line 42 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_init(), and gps_ubx_ucenter_periodic().

#define GPS_UBX_UCENTER_STATUS_CONFIG   2

Definition at line 43 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_periodic().

#define GPS_UBX_UCENTER_STATUS_STOPPED   0

Definition at line 41 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_event(), and gps_ubx_ucenter_periodic().

#define IGNORED   0

Definition at line 249 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_nav().

#define NAV5_2D_ONLY   1

Definition at line 245 of file gps_ubx_ucenter.c.

#define NAV5_3D_ONLY   2

Definition at line 246 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_nav().

#define NAV5_AUTO   3

Definition at line 247 of file gps_ubx_ucenter.c.

#define NAV5_DYN_AIRBORNE_1G   6

Definition at line 241 of file gps_ubx_ucenter.c.

#define NAV5_DYN_AIRBORNE_2G   7

Definition at line 242 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_nav().

#define NAV5_DYN_AIRBORNE_4G   8

Definition at line 243 of file gps_ubx_ucenter.c.

#define NAV5_DYN_AUTOMOTIVE   4

Definition at line 239 of file gps_ubx_ucenter.c.

#define NAV5_DYN_FIXED   1

Definition at line 236 of file gps_ubx_ucenter.c.

#define NAV5_DYN_PEDESTRIAN   3

Definition at line 238 of file gps_ubx_ucenter.c.

#define NAV5_DYN_PORTABLE   0

Definition at line 235 of file gps_ubx_ucenter.c.

#define NAV5_DYN_SEA   5

Definition at line 240 of file gps_ubx_ucenter.c.

#define NAV5_DYN_STATIONARY   2

Definition at line 237 of file gps_ubx_ucenter.c.

#define NAV_DYN_AIRBORNE_1G   5

Definition at line 231 of file gps_ubx_ucenter.c.

#define NAV_DYN_AIRBORNE_2G   6

Definition at line 232 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_nav().

#define NAV_DYN_AIRBORNE_4G   7

Definition at line 233 of file gps_ubx_ucenter.c.

#define NAV_DYN_AUTOMOTIVE   3

Definition at line 229 of file gps_ubx_ucenter.c.

#define NAV_DYN_PEDESTRIAN   2

Definition at line 228 of file gps_ubx_ucenter.c.

#define NAV_DYN_SEA   4

Definition at line 230 of file gps_ubx_ucenter.c.

#define NAV_DYN_STATIONARY   1

Definition at line 227 of file gps_ubx_ucenter.c.

#define NMEA_PROTO_MASK   0x0002

Definition at line 271 of file gps_ubx_ucenter.c.

#define RESERVED   0

Definition at line 250 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_nav().

#define RTCM_PROTO_MASK   0x0004

Definition at line 272 of file gps_ubx_ucenter.c.

#define UBX_GPS_BAUD   _UBX_GPS_BAUD(GPS_LINK)

Definition at line 286 of file gps_ubx_ucenter.c.

#define UBX_PROTO_MASK   0x0001

Definition at line 270 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_config_port().

Function Documentation

static bool_t gps_ubx_ucenter_autobaud ( uint8_t  nr)
static
static void gps_ubx_ucenter_config_nav ( void  )
inlinestatic

Definition at line 252 of file gps_ubx_ucenter.c.

References gps_ubx_ucenter, IGNORED, NAV5_3D_ONLY, NAV5_DYN_AIRBORNE_2G, NAV_DYN_AIRBORNE_2G, RESERVED, and gps_ubx_ucenter_struct::sw_ver_h.

Referenced by gps_ubx_ucenter_configure().

+ Here is the caller graph for this function:

static void gps_ubx_ucenter_config_port ( void  )
inlinestatic

Definition at line 288 of file gps_ubx_ucenter.c.

References GPS_I2C_SLAVE_ADDR, GPS_PORT_ID, and UBX_PROTO_MASK.

Referenced by gps_ubx_ucenter_configure().

+ Here is the caller graph for this function:

static void gps_ubx_ucenter_config_sbas ( void  )
inlinestatic

Definition at line 306 of file gps_ubx_ucenter.c.

References GPS_SBAS_CORRECTIONS, GPS_SBAS_ENABLED, GPS_SBAS_INTEGRITY, and GPS_SBAS_RANGING.

Referenced by gps_ubx_ucenter_configure().

+ Here is the caller graph for this function:

static void gps_ubx_ucenter_enable_msg ( uint8_t  class,
uint8_t  id,
uint8_t  rate 
)
inlinestatic

Definition at line 314 of file gps_ubx_ucenter.c.

Referenced by gps_ubx_ucenter_configure().

+ Here is the caller graph for this function:

Variable Documentation