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
nmeaGSV.h
Go to the documentation of this file.
1
28#pragma once
29
30#include "../nmeaMessage.h"
31
33{
34
36 class nmeaGSV : public nmeaMessage
37 {
38 public:
39 const char msgId[4] = "GSV";
40
41 const uint8_t supportedVersions = 1;
42
43 const uint8_t numCallbackCopies = 54;
44
45 // NMEA defines a maximum length of 82 characters including the $ and CR LF
47
48 // Header: xxGSV, numMsg, msgNum, numSV. Footer: signalId. numFields is interpreted as
49 // excluding the repeated blocks - see nmeaMessage::extractFieldFrom().
50 static const uint8_t numHeaderFields = 4;
51 static const uint8_t numFields = 5;
52
53 // One block per satellite: svid, elv, az, cno.
54 static const uint8_t numBlockFields = 4;
55 static const uint8_t maxNumBlocks = 4;
56
59 {"xxGSV", nmeaDataTypeString, 0}, // Header (implied by fieldNumber < numHeaderFields)
60 {"numMsg", nmeaDataTypeDigit, 1}, // Header (implied by fieldNumber < numHeaderFields)
61 {"msgNum", nmeaDataTypeDigit, 2}, // Header (implied by fieldNumber < numHeaderFields)
62 {"numSV", nmeaDataTypeNumeric, 3}, // Header (implied by fieldNumber < numHeaderFields)
63 {"signalId", nmeaDataTypeString, 4}, // Footer (implied by fieldNumber >= numHeaderFields). Hexadecimal - kept as String, not Numeric
64 };
65
68 {"svid", nmeaDataTypeNumeric, 0},
69 {"elv", nmeaDataTypeNumeric, 1},
70 {"az", nmeaDataTypeNumeric, 2},
71 {"cno", nmeaDataTypeNumeric, 3},
72 };
73
81 nmeaGSV(void)
82 {
84 (const void *)&nmeaFields,
86 }
87 };
88
90
91} // namespace SparkFun_Iridium_9604
The NMEA GSV message: GNSS satellites in view.
Definition: nmeaGSV.h:37
const uint8_t messageLength
The maximum message length (bytes).
Definition: nmeaGSV.h:46
const char msgId[4]
The message identifier.
Definition: nmeaGSV.h:39
const nmeaField nmeaFields[numFields]
The message fields, by name.
Definition: nmeaGSV.h:58
static const uint8_t maxNumBlocks
Up to 4 satellites per GSV sentence.
Definition: nmeaGSV.h:55
const uint8_t supportedVersions
Reserved for future use.
Definition: nmeaGSV.h:41
const uint8_t numCallbackCopies
Up to 9 GSV messages per constellation, 6 constellations;.
Definition: nmeaGSV.h:43
const nmeaField nmeaBlockFields[numBlockFields]
The repeated block fields, by name.
Definition: nmeaGSV.h:67
static const uint8_t numBlockFields
The number of fields in each repeated block.
Definition: nmeaGSV.h:54
nmeaGSV(void)
Construct a new nmeaGSV object and register it with the NMEA message registry.
Definition: nmeaGSV.h:81
static const uint8_t numHeaderFields
The number of header fields.
Definition: nmeaGSV.h:50
static const uint8_t numFields
numHeaderFields (4) + footer (1)
Definition: nmeaGSV.h:51
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
Definition: nmeaMessage.h:30
const uint8_t NMEA_GSV_MAX_LENGTH
Variable length - up to 4 satellite blocks.
Definition: nmeaMessage.h:42
@ nmeaDataTypeDigit
A single ASCII digit: 0-9.
Definition: nmeaMessage.h:70
@ 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