Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# nmea.h

Go to the documentation of this file.

    00001 /*! \file nmea.h \brief NMEA protocol function library. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'nmea.h'
    00005 // Title        : NMEA protocol function library
    00006 // Author       : Pascal Stang - Copyright (C) 2002
    00007 // Created      : 2002.08.27
    00008 // Revised      : 2002.08.27
    00009 // Version      : 0.1
    00010 // Target MCU   : Atmel AVR Series
    00011 // Editor Tabs  : 4
    00012 //
    00013 // NOTE: This code is currently below version 1.0, and therefore is considered
    00014 // to be lacking in some functionality or documentation, or may not be fully
    00015 // tested.  Nonetheless, you can expect most functions to work.
    00016 //
    00017 /// \ingroup driver_hw
    00018 /// \defgroup nmea NMEA Packet Interface for GPS Receivers (nmea.c)
    00019 /// \code #include "nmea.h" \endcode
    00020 /// \par Overview
    00021 ///     This library parses and decodes the standard NMEA data stream from a
    00022 /// GPS and stores the position, velocity, and time solutions in the gps.c
    00023 /// library.
    00024 //
    00025 // This code is distributed under the GNU Public License
    00026 //      which can be found at http://www.gnu.org/licenses/gpl.txt
    00027 //
    00028 //*****************************************************************************
    00029
    00030 #ifndef NMEA_H
    00031 #define NMEA_H
    00032
    00033 #include "global.h"
    00034 #include "buffer.h"
    00035
    00036 // constants/macros/typdefs
    00037 #define NMEA_BUFFERSIZE     80
    00038
    00039 // Message Codes
    00040 #define NMEA_NODATA     0   // No data. Packet not available, bad, or not decoded
    00041 #define NMEA_GPGGA      1   // Global Positioning System Fix Data
    00042 #define NMEA_GPVTG      2   // Course over ground and ground speed
    00043 #define NMEA_GPGLL      3   // Geographic position - latitude/longitude
    00044 #define NMEA_GPGSV      4   // GPS satellites in view
    00045 #define NMEA_GPGSA      5   // GPS DOP and active satellites
    00046 #define NMEA_GPRMC      6   // Recommended minimum specific GPS data
    00047 #define NMEA_UNKNOWN    0xFF// Packet received but not known
    00048
    00049 // Debugging
    00050 //#define NMEA_DEBUG_PKT    ///< define to enable debug of all NMEA messages
    00051 //#define NMEA_DEBUG_GGA    ///< define to enable debug of GGA messages
    00052 //#define NMEA_DEBUG_VTG    ///< define to enable debug of VTG messages
    00053
    00054 // functions
    00055 void nmeaInit(void);
    00056 u08* nmeaGetPacketBuffer(void);
    00057 u08 nmeaProcess(cBuffer* rxBuffer);
    00058 void nmeaProcessGPGGA(u08* packet);
    00059 void nmeaProcessGPVTG(u08* packet);
    00060
    00061 #endif