SELKIELogger  1.0.0
NMEATypes.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Swansea University
3  *
4  * This file is part of the SELKIELogger suite of tools.
5  *
6  * SELKIELogger is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License as published by the Free
8  * Software Foundation, either version 3 of the License, or (at your option)
9  * any later version.
10  *
11  * SELKIELogger is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14  * more details.
15  *
16  * You should have received a copy of the GNU General Public License along
17  * with this SELKIELogger product.
18  * If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef SELKIELoggerNMEA_Types
22 #define SELKIELoggerNMEA_Types
23 
36 #include "SELKIELoggerBase.h"
37 
44 #define NMEA_START_BYTE1 0x24
45 
47 #define NMEA_START_BYTE2 0x21
48 
50 #define NMEA_CSUM_MARK 0x2a
51 
53 #define NMEA_END_BYTE1 0x0d
54 
56 #define NMEA_END_BYTE2 0x0a
57 
71 
78 typedef struct {
79  bool encapsulated;
80  char talker[4];
81  char message[3];
82  uint8_t rawlen;
83  uint8_t raw[80];
86  uint8_t checksum;
87 } nmea_msg_t;
88 
90 #endif
Generic NMEA message structure.
Definition: NMEATypes.h:78
strarray fields
If parsed, array of fields.
Definition: NMEATypes.h:85
bool encapsulated
Encapsulated message (all data in raw)
Definition: NMEATypes.h:79
uint8_t checksum
Message Checksum.
Definition: NMEATypes.h:86
uint8_t rawlen
Length of data stored in raw.
Definition: NMEATypes.h:82
Array of strings.
Definition: strarray.h:43