Add get/setProcessNMEAMask to allow selection of which messages are passed to processNMEA
This commit is contained in:
@@ -145,8 +145,8 @@ void setup()
|
||||
myGNSS.enableNMEAMessage(UBX_NMEA_GSA, COM_PORT_I2C, 1); // Ensure the GxGSA (GNSS DOP and Active satellites) message is enabled. Send every measurement.
|
||||
myGNSS.enableNMEAMessage(UBX_NMEA_GSV, COM_PORT_I2C, 1); // Ensure the GxGSV (GNSS satellites in view) message is enabled. Send every measurement.
|
||||
|
||||
myGNSS.setNMEALoggingMask(SFE_UBLOX_LOG_NMEA_ALL); // Enable logging of all enabled NMEA messages
|
||||
//myGNSS.setNMEALoggingMask(SFE_UBLOX_LOG_NMEA_GGA | SFE_UBLOX_LOG_NMEA_GSA); // Or we can, for example, log only GxGGA and GxGSA. Ignore GxGSV
|
||||
myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_ALL); // Enable logging of all enabled NMEA messages
|
||||
//myGNSS.setNMEALoggingMask(SFE_UBLOX_FILTER_NMEA_GGA | SFE_UBLOX_FILTER_NMEA_GSA); // Or we can, for example, log only GxGGA & GxGSA and ignore GxGSV
|
||||
|
||||
Serial.println(F("Press any key to stop logging."));
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ void setup()
|
||||
Serial.println(F("u-blox GNSS not detected at default I2C address. Please check wiring. Freezing."));
|
||||
while (1);
|
||||
}
|
||||
|
||||
myGNSS.setProcessNMEAMask(SFE_UBLOX_FILTER_NMEA_ALL); // Make sure the library is passing all NMEA messages to processNMEA
|
||||
|
||||
myGNSS.setProcessNMEAMask(SFE_UBLOX_FILTER_NMEA_GGA); // Or, we can be kind to MicroNMEA and _only_ pass the GGA messages to it
|
||||
}
|
||||
|
||||
void loop()
|
||||
@@ -60,12 +64,12 @@ void loop()
|
||||
Serial.println(latitude_mdeg / 1000000., 6);
|
||||
Serial.print("Longitude (deg): ");
|
||||
Serial.println(longitude_mdeg / 1000000., 6);
|
||||
|
||||
nmea.clear(); // Clear the MicroNMEA storage to make sure we are getting fresh data
|
||||
}
|
||||
else
|
||||
{
|
||||
Serial.print("No Fix - ");
|
||||
Serial.print("Num. satellites: ");
|
||||
Serial.println(nmea.getNumSatellites());
|
||||
Serial.println("Waiting for fresh data");
|
||||
}
|
||||
|
||||
delay(250); //Don't pound too hard on the I2C bus
|
||||
|
||||
+24
-22
@@ -384,6 +384,8 @@ logHNRPVT KEYWORD2
|
||||
|
||||
setNMEALoggingMask KEYWORD2
|
||||
getNMEALoggingMask KEYWORD2
|
||||
setProcessNMEAMask KEYWORD2
|
||||
getProcessNMEAMask KEYWORD2
|
||||
|
||||
setNavigationFrequency KEYWORD2
|
||||
getNavigationFrequency KEYWORD2
|
||||
@@ -559,28 +561,28 @@ UBX_NMEA_VLW LITERAL1
|
||||
UBX_NMEA_VTG LITERAL1
|
||||
UBX_NMEA_ZDA LITERAL1
|
||||
|
||||
SFE_UBLOX_LOG_NMEA_ALL LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_DTM LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GAQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GBQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GBS LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GGA LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GLL LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GLQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GNQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GNS LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GPQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GQQ LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GRS LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GSA LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GST LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_GSV LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_RLM LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_RMC LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_TXT LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_VLW LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_VTG LITERAL1
|
||||
SFE_UBLOX_LOG_NMEA_ZDA LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_ALL LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_DTM LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GAQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GBQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GBS LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GGA LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GLL LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GLQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GNQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GNS LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GPQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GQQ LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GRS LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GSA LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GST LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_GSV LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_RLM LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_RMC LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_TXT LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_VLW LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_VTG LITERAL1
|
||||
SFE_UBLOX_FILTER_NMEA_ZDA LITERAL1
|
||||
|
||||
UBX_NAV_ATT LITERAL1
|
||||
UBX_NAV_CLOCK LITERAL1
|
||||
|
||||
@@ -51,7 +51,8 @@ SFE_UBLOX_GNSS::SFE_UBLOX_GNSS(void)
|
||||
digitalWrite((uint8_t)debugPin, HIGH);
|
||||
}
|
||||
|
||||
_logNMEA.all = 0; // Default to logging no NMEA messages
|
||||
_logNMEA.all = 0; // Default to passing no NMEA messages to the file buffer
|
||||
_processNMEA.all = SFE_UBLOX_FILTER_NMEA_ALL; // Default to passing all NMEA messages to process NMEA
|
||||
}
|
||||
|
||||
//Stop all automatic message processing. Free all used RAM
|
||||
@@ -1266,12 +1267,24 @@ void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t r
|
||||
{
|
||||
storeFileBytes(&nmeaAddressField[0], 6); // Add start character and address field to the file buffer
|
||||
}
|
||||
// Check if it should be passed to processNMEA
|
||||
if (processThisNMEA())
|
||||
{
|
||||
processNMEA(nmeaAddressField[0]); //Process the start character and address field
|
||||
processNMEA(nmeaAddressField[1]);
|
||||
processNMEA(nmeaAddressField[2]);
|
||||
processNMEA(nmeaAddressField[3]);
|
||||
processNMEA(nmeaAddressField[4]);
|
||||
processNMEA(nmeaAddressField[5]);
|
||||
}
|
||||
}
|
||||
|
||||
if ((nmeaByteCounter > 5) || (nmeaByteCounter < 0)) // Should we add incoming to the file buffer?
|
||||
if ((nmeaByteCounter > 5) || (nmeaByteCounter < 0)) // Should we add incoming to the file buffer and/or pass it to processNMEA?
|
||||
{
|
||||
if (logThisNMEA())
|
||||
storeFileBytes(&incoming, 1); // Add incoming to the file buffer
|
||||
if (processThisNMEA())
|
||||
processNMEA(incoming); // Pass incoming to processNMEA
|
||||
}
|
||||
|
||||
if (incoming == '*')
|
||||
@@ -1284,8 +1297,6 @@ void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t r
|
||||
|
||||
if (nmeaByteCounter == 0) // Check if we are done
|
||||
currentSentence = NONE; // All done!
|
||||
|
||||
processNMEA(incoming); //Process each and every NMEA character
|
||||
}
|
||||
else if (currentSentence == RTCM)
|
||||
{
|
||||
@@ -1293,25 +1304,28 @@ void SFE_UBLOX_GNSS::process(uint8_t incoming, ubxPacket *incomingUBX, uint8_t r
|
||||
}
|
||||
}
|
||||
|
||||
// PRIVATE: Return true if we should log this NMEA message
|
||||
// PRIVATE: Return true if we should add this NMEA message to the file buffer for logging
|
||||
boolean SFE_UBLOX_GNSS::logThisNMEA()
|
||||
{
|
||||
if (_logNMEA.bits.all == 1) return (true);
|
||||
if ((nmeaAddressField[3] == 'D') && (nmeaAddressField[4] == 'T') && (nmeaAddressField[5] == 'M') && (_logNMEA.bits.UBX_NMEA_DTM == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'A') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GAQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GBQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GBS == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'G') && (nmeaAddressField[5] == 'A') && (_logNMEA.bits.UBX_NMEA_GGA == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'L') && (_logNMEA.bits.UBX_NMEA_GLL == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GLQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GNQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GNS == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'P') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GPQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'Q') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GQQ == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'R') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GRS == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'A') && (_logNMEA.bits.UBX_NMEA_GSA == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'T') && (_logNMEA.bits.UBX_NMEA_GST == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'G') && (nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'V') && (_logNMEA.bits.UBX_NMEA_GSV == 1)) return (true);
|
||||
if (nmeaAddressField[3] == 'G')
|
||||
{
|
||||
if ((nmeaAddressField[4] == 'A') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GAQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GBQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GBS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'G') && (nmeaAddressField[5] == 'A') && (_logNMEA.bits.UBX_NMEA_GGA == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'L') && (_logNMEA.bits.UBX_NMEA_GLL == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GLQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GNQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GNS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'P') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GPQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'Q') && (nmeaAddressField[5] == 'Q') && (_logNMEA.bits.UBX_NMEA_GQQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'R') && (nmeaAddressField[5] == 'S') && (_logNMEA.bits.UBX_NMEA_GRS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'A') && (_logNMEA.bits.UBX_NMEA_GSA == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'T') && (_logNMEA.bits.UBX_NMEA_GST == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'V') && (_logNMEA.bits.UBX_NMEA_GSV == 1)) return (true);
|
||||
}
|
||||
if ((nmeaAddressField[3] == 'R') && (nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'M') && (_logNMEA.bits.UBX_NMEA_RLM == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'R') && (nmeaAddressField[4] == 'M') && (nmeaAddressField[5] == 'C') && (_logNMEA.bits.UBX_NMEA_RMC == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'T') && (nmeaAddressField[4] == 'X') && (nmeaAddressField[5] == 'T') && (_logNMEA.bits.UBX_NMEA_TXT == 1)) return (true);
|
||||
@@ -1321,6 +1335,37 @@ boolean SFE_UBLOX_GNSS::logThisNMEA()
|
||||
return (false);
|
||||
}
|
||||
|
||||
// PRIVATE: Return true if we should pass this NMEA message to processNMEA
|
||||
boolean SFE_UBLOX_GNSS::processThisNMEA()
|
||||
{
|
||||
if (_processNMEA.bits.all == 1) return (true);
|
||||
if ((nmeaAddressField[3] == 'D') && (nmeaAddressField[4] == 'T') && (nmeaAddressField[5] == 'M') && (_processNMEA.bits.UBX_NMEA_DTM == 1)) return (true);
|
||||
if (nmeaAddressField[3] == 'G')
|
||||
{
|
||||
if ((nmeaAddressField[4] == 'A') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GAQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GBQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'B') && (nmeaAddressField[5] == 'S') && (_processNMEA.bits.UBX_NMEA_GBS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'G') && (nmeaAddressField[5] == 'A') && (_processNMEA.bits.UBX_NMEA_GGA == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'L') && (_processNMEA.bits.UBX_NMEA_GLL == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GLQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GNQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'N') && (nmeaAddressField[5] == 'S') && (_processNMEA.bits.UBX_NMEA_GNS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'P') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GPQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'Q') && (nmeaAddressField[5] == 'Q') && (_processNMEA.bits.UBX_NMEA_GQQ == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'R') && (nmeaAddressField[5] == 'S') && (_processNMEA.bits.UBX_NMEA_GRS == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'A') && (_processNMEA.bits.UBX_NMEA_GSA == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'T') && (_processNMEA.bits.UBX_NMEA_GST == 1)) return (true);
|
||||
if ((nmeaAddressField[4] == 'S') && (nmeaAddressField[5] == 'V') && (_processNMEA.bits.UBX_NMEA_GSV == 1)) return (true);
|
||||
}
|
||||
if ((nmeaAddressField[3] == 'R') && (nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'M') && (_processNMEA.bits.UBX_NMEA_RLM == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'R') && (nmeaAddressField[4] == 'M') && (nmeaAddressField[5] == 'C') && (_processNMEA.bits.UBX_NMEA_RMC == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'T') && (nmeaAddressField[4] == 'X') && (nmeaAddressField[5] == 'T') && (_processNMEA.bits.UBX_NMEA_TXT == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'V') && (nmeaAddressField[4] == 'L') && (nmeaAddressField[5] == 'W') && (_processNMEA.bits.UBX_NMEA_VLW == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'V') && (nmeaAddressField[4] == 'T') && (nmeaAddressField[5] == 'G') && (_processNMEA.bits.UBX_NMEA_VTG == 1)) return (true);
|
||||
if ((nmeaAddressField[3] == 'Z') && (nmeaAddressField[4] == 'D') && (nmeaAddressField[5] == 'A') && (_processNMEA.bits.UBX_NMEA_ZDA == 1)) return (true);
|
||||
return (false);
|
||||
}
|
||||
|
||||
//This is the default or generic NMEA processor. We're only going to pipe the data to serial port so we can see it.
|
||||
//User could overwrite this function to pipe characters to nmea.process(c) of tinyGPS or MicroNMEA
|
||||
//Or user could pipe each character to a buffer, radio, etc.
|
||||
@@ -9143,7 +9188,7 @@ void SFE_UBLOX_GNSS::logHNRPVT(boolean enabled)
|
||||
packetUBXHNRPVT->automaticFlags.flags.bits.addToFileBuffer = (uint8_t)enabled;
|
||||
}
|
||||
|
||||
// ***** Helper Functions for NMEA Logging
|
||||
// ***** Helper Functions for NMEA Logging / Processing
|
||||
|
||||
// Log selected NMEA messages to file buffer - if the messages are enabled and if the file buffer exists
|
||||
// User needs to call setFileBufferSize before .begin
|
||||
@@ -9156,6 +9201,16 @@ uint32_t SFE_UBLOX_GNSS::getNMEALoggingMask()
|
||||
return (_logNMEA.all);
|
||||
}
|
||||
|
||||
// Pass selected NMEA messages to processNMEA
|
||||
void SFE_UBLOX_GNSS::setProcessNMEAMask(uint32_t messages)
|
||||
{
|
||||
_processNMEA.all = messages;
|
||||
}
|
||||
uint32_t SFE_UBLOX_GNSS::getProcessNMEAMask()
|
||||
{
|
||||
return (_processNMEA.all);
|
||||
}
|
||||
|
||||
// ***** CFG RATE Helper Functions
|
||||
|
||||
//Set the rate at which the module will give us an updated navigation solution
|
||||
|
||||
@@ -99,7 +99,9 @@ typedef enum
|
||||
SFE_UBLOX_PACKET_PACKETAUTO
|
||||
} sfe_ublox_packet_buffer_e;
|
||||
|
||||
// Define a struct to allow selective logging of NMEA messages
|
||||
// Define a struct to allow selective logging / processing of NMEA messages
|
||||
// Set the individual bits to pass the NMEA messages to the file buffer and/or processNMEA
|
||||
// Setting bits.all will pass all messages to the file buffer and processNMEA
|
||||
typedef struct
|
||||
{
|
||||
union
|
||||
@@ -131,33 +133,34 @@ typedef struct
|
||||
uint32_t UBX_NMEA_ZDA : 1;
|
||||
} bits;
|
||||
};
|
||||
} sfe_ublox_nmea_logging_t;
|
||||
// Define an enum to make it easy to enable/disable selected NMEA messages for logging
|
||||
} sfe_ublox_nmea_filtering_t;
|
||||
|
||||
// Define an enum to make it easy to enable/disable selected NMEA messages for logging / processing
|
||||
typedef enum
|
||||
{
|
||||
SFE_UBLOX_LOG_NMEA_ALL = 0x00000001,
|
||||
SFE_UBLOX_LOG_NMEA_DTM = 0x00000002,
|
||||
SFE_UBLOX_LOG_NMEA_GAQ = 0x00000004,
|
||||
SFE_UBLOX_LOG_NMEA_GBQ = 0x00000008,
|
||||
SFE_UBLOX_LOG_NMEA_GBS = 0x00000010,
|
||||
SFE_UBLOX_LOG_NMEA_GGA = 0x00000020,
|
||||
SFE_UBLOX_LOG_NMEA_GLL = 0x00000040,
|
||||
SFE_UBLOX_LOG_NMEA_GLQ = 0x00000080,
|
||||
SFE_UBLOX_LOG_NMEA_GNQ = 0x00000100,
|
||||
SFE_UBLOX_LOG_NMEA_GNS = 0x00000200,
|
||||
SFE_UBLOX_LOG_NMEA_GPQ = 0x00000400,
|
||||
SFE_UBLOX_LOG_NMEA_GQQ = 0x00000800,
|
||||
SFE_UBLOX_LOG_NMEA_GRS = 0x00001000,
|
||||
SFE_UBLOX_LOG_NMEA_GSA = 0x00002000,
|
||||
SFE_UBLOX_LOG_NMEA_GST = 0x00004000,
|
||||
SFE_UBLOX_LOG_NMEA_GSV = 0x00008000,
|
||||
SFE_UBLOX_LOG_NMEA_RLM = 0x00010000,
|
||||
SFE_UBLOX_LOG_NMEA_RMC = 0x00020000,
|
||||
SFE_UBLOX_LOG_NMEA_TXT = 0x00040000,
|
||||
SFE_UBLOX_LOG_NMEA_VLW = 0x00080000,
|
||||
SFE_UBLOX_LOG_NMEA_VTG = 0x00100000,
|
||||
SFE_UBLOX_LOG_NMEA_ZDA = 0x00200000
|
||||
} sfe_ublox_nmea_logging_selective_e;
|
||||
SFE_UBLOX_FILTER_NMEA_ALL = 0x00000001,
|
||||
SFE_UBLOX_FILTER_NMEA_DTM = 0x00000002,
|
||||
SFE_UBLOX_FILTER_NMEA_GAQ = 0x00000004,
|
||||
SFE_UBLOX_FILTER_NMEA_GBQ = 0x00000008,
|
||||
SFE_UBLOX_FILTER_NMEA_GBS = 0x00000010,
|
||||
SFE_UBLOX_FILTER_NMEA_GGA = 0x00000020,
|
||||
SFE_UBLOX_FILTER_NMEA_GLL = 0x00000040,
|
||||
SFE_UBLOX_FILTER_NMEA_GLQ = 0x00000080,
|
||||
SFE_UBLOX_FILTER_NMEA_GNQ = 0x00000100,
|
||||
SFE_UBLOX_FILTER_NMEA_GNS = 0x00000200,
|
||||
SFE_UBLOX_FILTER_NMEA_GPQ = 0x00000400,
|
||||
SFE_UBLOX_FILTER_NMEA_GQQ = 0x00000800,
|
||||
SFE_UBLOX_FILTER_NMEA_GRS = 0x00001000,
|
||||
SFE_UBLOX_FILTER_NMEA_GSA = 0x00002000,
|
||||
SFE_UBLOX_FILTER_NMEA_GST = 0x00004000,
|
||||
SFE_UBLOX_FILTER_NMEA_GSV = 0x00008000,
|
||||
SFE_UBLOX_FILTER_NMEA_RLM = 0x00010000,
|
||||
SFE_UBLOX_FILTER_NMEA_RMC = 0x00020000,
|
||||
SFE_UBLOX_FILTER_NMEA_TXT = 0x00040000,
|
||||
SFE_UBLOX_FILTER_NMEA_VLW = 0x00080000,
|
||||
SFE_UBLOX_FILTER_NMEA_VTG = 0x00100000,
|
||||
SFE_UBLOX_FILTER_NMEA_ZDA = 0x00200000
|
||||
} sfe_ublox_nmea_filtering_e;
|
||||
|
||||
//Registers
|
||||
const uint8_t UBX_SYNCH_1 = 0xB5;
|
||||
@@ -991,9 +994,13 @@ public:
|
||||
void logHNRPVT(boolean enabled = true); // Log data to file buffer
|
||||
|
||||
// Helper functions for NMEA logging
|
||||
void setNMEALoggingMask(uint32_t messages = SFE_UBLOX_LOG_NMEA_ALL); // Log selected NMEA messages to file buffer - if enabled
|
||||
void setNMEALoggingMask(uint32_t messages = SFE_UBLOX_FILTER_NMEA_ALL); // Add selected NMEA messages to file buffer - if enabled. Default to adding ALL messages to the file buffer
|
||||
uint32_t getNMEALoggingMask(); // Return which NMEA messages are selected for logging to the file buffer - if enabled
|
||||
|
||||
// Helper functions to control which NMEA messages are passed to processNMEA
|
||||
void setProcessNMEAMask(uint32_t messages = SFE_UBLOX_FILTER_NMEA_ALL); // Control which NMEA messages are passed to processNMEA. Default to passing ALL messages
|
||||
uint32_t getProcessNMEAMask(); // Return which NMEA messages are passed to processNMEA
|
||||
|
||||
// Helper functions for CFG RATE
|
||||
|
||||
boolean setNavigationFrequency(uint8_t navFreq, uint16_t maxWait = defaultMaxWait); //Set the number of nav solutions sent per second
|
||||
@@ -1249,7 +1256,8 @@ private:
|
||||
|
||||
boolean ubx7FcheckDisabled = false; // Flag to indicate if the "7F" check should be ignored in checkUbloxI2C
|
||||
|
||||
sfe_ublox_nmea_logging_t _logNMEA; // Flags to indicate which NMEA messages should be added to the file buffer for logging
|
||||
sfe_ublox_nmea_filtering_t _logNMEA; // Flags to indicate which NMEA messages should be added to the file buffer for logging
|
||||
sfe_ublox_nmea_filtering_t _processNMEA; // Flags to indicate which NMEA messages should be passed to processNMEA
|
||||
|
||||
//The packet buffers
|
||||
//These are pointed at from within the ubxPacket
|
||||
@@ -1289,6 +1297,7 @@ private:
|
||||
const int16_t maxNMEAByteCount = 1024; // Abort NMEA message reception if nmeaByteCounter exceeds this
|
||||
uint8_t nmeaAddressField[6]; // NMEA Address Field - includes the start character (*)
|
||||
boolean logThisNMEA(); // Return true if we should log this NMEA message
|
||||
boolean processThisNMEA(); // Return true if we should pass this NMEA message to processNMEA
|
||||
|
||||
uint16_t rtcmLen = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user