2 ******************************************************************************
5 * @author Sami Korhonen Copyright (C) 2010.
6 * @addtogroup GCSPlugins GCS Plugins
8 * @addtogroup GPSGadgetPlugin GPS Gadget Plugin
10 * @brief A gadget that displays GPS status and enables basic configuration
11 *****************************************************************************/
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
35 #include "gpsparser.h"
37 // constants/macros/typdefs
38 #define NMEA_BUFFERSIZE 128
40 typedef struct struct_GpsData
{
51 double GeoidSeparation
;
56 class NMEAParser
: public GPSParser
{
60 NMEAParser(QObject
*parent
= 0);
62 void processInputStream(char c
);
63 char *nmeaGetPacketBuffer(void);
64 char nmeaChecksum(char *gps_buffer
);
65 void nmeaTerminateAtChecksum(char *gps_buffer
);
66 uint8_t nmeaProcess(cBuffer
*rxBuffer
);
67 void nmeaProcessGPGGA(char *packet
);
68 void nmeaProcessGPRMC(char *packet
);
69 void nmeaProcessGPVTG(char *packet
);
70 void nmeaProcessGPGSA(char *packet
);
71 void nmeaProcessGPGSV(char *packet
);
72 void nmeaProcessGPZDA(char *packet
);
76 char NmeaPacket
[NMEA_BUFFERSIZE
];
79 int32_t gpsRxOverflow
;
82 #endif // NMEAPARSER_H