Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
gps_nmea.h File Reference

NMEA protocol specific code. More...

#include "mcu_periph/uart.h"
+ Include dependency graph for gps_nmea.h:

Go to the source code of this file.

Data Structures

struct  GpsNmea
 

Macros

#define GPS_NB_CHANNELS   16
 
#define NMEA_PRINT(...)   {};
 
#define NMEA_MAXLEN   255
 
#define __GpsLink(dev, _x)   dev##_x
 
#define _GpsLink(dev, _x)   __GpsLink(dev, _x)
 
#define GpsLink(_x)   _GpsLink(GPS_LINK, _x)
 
#define GpsBuffer()   GpsLink(ChAvailable())
 
#define GpsEvent(_sol_available_callback)
 
#define ReadGpsBuffer()
 
#define gps_nmea_Reset(_val)   { }
 

Functions

void nmea_parse_char (uint8_t c)
 The function to be called when a characted friom the device is available. More...
 
void nmea_parse_msg (void)
 parse_nmea_char() has a complete line. More...
 

Variables

struct GpsNmea gps_nmea
 

Detailed Description

NMEA protocol specific code.

Definition in file gps_nmea.h.

Macro Definition Documentation

#define __GpsLink (   dev,
  _x 
)    dev##_x

Definition at line 58 of file gps_nmea.h.

#define _GpsLink (   dev,
  _x 
)    __GpsLink(dev, _x)

Definition at line 59 of file gps_nmea.h.

#define GPS_NB_CHANNELS   16

Definition at line 34 of file gps_nmea.h.

Referenced by gps_ubx_read_message(), and parse_ins_msg().

#define gps_nmea_Reset (   _val)    { }

Definition at line 94 of file gps_nmea.h.

#define GpsBuffer ( )    GpsLink(ChAvailable())

Definition at line 62 of file gps_nmea.h.

#define GpsEvent (   _sol_available_callback)
Value:
{ \
if (GpsBuffer()) { \
} \
if (gps.fix == GPS_FIX_3D) { \
} \
_sol_available_callback(); \
} \
} \
}
bool_t pos_available
Definition: gps_nmea.h:46
#define ReadGpsBuffer()
Definition: gps_nmea.h:81
uint32_t last_fix_time
cpu time in sec at last valid fix
Definition: gps.h:85
#define GpsBuffer()
Definition: gps_nmea.h:62
uint8_t fix
status of fix
Definition: gps.h:77
#define GPS_FIX_3D
Definition: gps.h:42
#define cpu_time_ticks
Definition: sys_time.h:65
#define FALSE
Definition: imu_chimu.h:141
uint32_t last_fix_ticks
cpu time in ticks at last valid fix
Definition: gps.h:84
void nmea_parse_msg(void)
parse_nmea_char() has a complete line.
Definition: gps_nmea.c:371
struct GpsNmea gps_nmea
Definition: gps_nmea.c:54
bool_t msg_available
Definition: gps_nmea.h:45
volatile uint32_t nb_sec
full seconds since startup
Definition: sys_time.h:55
struct GpsState gps
global GPS state
Definition: gps.c:31

Definition at line 64 of file gps_nmea.h.

#define GpsLink (   _x)    _GpsLink(GPS_LINK, _x)

Definition at line 60 of file gps_nmea.h.

#define NMEA_MAXLEN   255

Definition at line 42 of file gps_nmea.h.

Referenced by nmea_parse_char().

#define NMEA_PRINT (   ...)    {};

Definition at line 39 of file gps_nmea.h.

Referenced by nmea_parse_msg(), parse_nmea_GPGGA(), parse_nmea_GPGSA(), and parse_nmea_GPRMC().

#define ReadGpsBuffer ( )
Value:
{ \
while (GpsLink(ChAvailable())&&!gps_nmea.msg_available) \
}
#define GpsLink(_x)
Definition: gps_nmea.h:60
struct GpsNmea gps_nmea
Definition: gps_nmea.c:54
bool_t msg_available
Definition: gps_nmea.h:45
void nmea_parse_char(uint8_t c)
The function to be called when a characted friom the device is available.
Definition: gps_nmea.c:410

Definition at line 81 of file gps_nmea.h.

Function Documentation

void nmea_parse_char ( uint8_t  c)

The function to be called when a characted friom the device is available.

The function to be called when a characted friom the device is available.

It reads one character at a time setting gps_nmea.msg_available to TRUE after a full line.

Definition at line 410 of file gps_nmea.c.

References c, gps_nmea, GpsNmea::msg_available, GpsNmea::msg_buf, GpsNmea::msg_len, NMEA_MAXLEN, and TRUE.

void nmea_parse_msg ( void  )

parse_nmea_char() has a complete line.

Find out what type of message it is and hand it to the parser for that type.

Definition at line 371 of file gps_nmea.c.

References gps_nmea, GpsNmea::msg_buf, GpsNmea::msg_len, NMEA_PRINT, parse_nmea_GPGGA(), parse_nmea_GPGSA(), and parse_nmea_GPRMC().

+ Here is the call graph for this function:

Variable Documentation