SparkFun Iridium 9604  v1.0.0
Library for the Iridium 9604 Hybrid LTE-M Cellular + Iridium Satellite (SBD) + GNSS IoT module
Loading...
Searching...
No Matches
nmeaVTG.h
Go to the documentation of this file.
1
23#pragma once
24
25#include "../nmeaMessage.h"
26
28{
29
31 class nmeaVTG : public nmeaMessage
32 {
33 public:
34 const char msgId[4] = "VTG";
35
36 const uint8_t supportedVersions = 1;
37
38 const uint8_t numCallbackCopies = 1;
39
40 // NMEA defines a maximum length of 82 characters including the $ and CR LF
42
43 static const uint8_t numFields = 10;
44
47 {"xxVTG", nmeaDataTypeString, 0},
48 {"cogt", nmeaDataTypeNumeric, 1},
49 {"cogtUnit", nmeaDataTypeChar, 2},
50 {"cogm", nmeaDataTypeNumeric, 3},
51 {"cogmUnit", nmeaDataTypeChar, 4},
52 {"sogn", nmeaDataTypeNumeric, 5},
53 {"sognUnit", nmeaDataTypeChar, 6},
54 {"sogk", nmeaDataTypeNumeric, 7},
55 {"sogkUnit", nmeaDataTypeChar, 8},
56 {"posMode", nmeaDataTypeChar, 9},
57 };
58
66 nmeaVTG(void)
67 {
69 (const void *)&nmeaFields);
70 }
71 };
72
74
75} // namespace SparkFun_Iridium_9604
The base class for the NMEA messages. Each message stores its latest copy and a ring buffer of copies...
Definition: nmeaMessage.h:88
void addNMEA(const char *msgId, uint8_t messageLength, uint8_t numCallbackCopies, uint8_t numFields, const void *nmeaFields, const void *blockFields=nullptr, uint8_t numBlockFields=0, uint8_t numHeaderFields=0, uint8_t maxNumBlocks=0)
Register this message's identity, field table and metadata with the base class.
Definition: nmeaMessage.h:482
The NMEA VTG message: Course over ground and ground speed.
Definition: nmeaVTG.h:32
const char msgId[4]
The message identifier.
Definition: nmeaVTG.h:34
const uint8_t numCallbackCopies
The number of copies stored for the callback.
Definition: nmeaVTG.h:38
static const uint8_t numFields
The number of fields.
Definition: nmeaVTG.h:43
const uint8_t messageLength
The maximum message length (bytes).
Definition: nmeaVTG.h:41
const nmeaField nmeaFields[numFields]
The message fields, by name.
Definition: nmeaVTG.h:46
nmeaVTG(void)
Construct a new nmeaVTG object and register it with the NMEA message registry.
Definition: nmeaVTG.h:66
const uint8_t supportedVersions
Reserved for future use.
Definition: nmeaVTG.h:36
Definition: nmeaMessage.h:30
const uint8_t NMEA_VTG_MAX_LENGTH
The maximum length of the NMEA VTG message (bytes).
Definition: nmeaMessage.h:45
@ nmeaDataTypeChar
A single ASCII character: e.g. N S E W M.
Definition: nmeaMessage.h:69
@ nmeaDataTypeString
An array of ASCII char.
Definition: nmeaMessage.h:65
@ nmeaDataTypeNumeric
A numeric: could be integer or floating point; could be negative.
Definition: nmeaMessage.h:71
#define nmeaRegisterMessage(kMessage)
Declare a file-scope static builder that self-registers an NMEA message class.
Definition: nmeaMessageRegistry.h:113
One entry per field in the message payload.
Definition: nmeaMessage.h:94