From 38c0514f1f0b5121538bfc7809d5d8cda6769633 Mon Sep 17 00:00:00 2001 From: Robert <3704942+JasonRJ@users.noreply.github.com> Date: Sun, 29 Nov 2020 10:27:35 -0500 Subject: [PATCH] Adding support for u-blox generation 7 NAV-PVT will allow current examples using NAV-PVT to be backwards compatable. Protocol >= 15 (Gen 8 and beyond) has a message length of 92 Protocol = 14 (Gen 7) has a message length of 84 Protocol < 14 (Gen 6 and eariler) does not support NAV-PVT Fields added in protocol 15 (headVeh, magDec, magAcc) are not being parsed in current version of the library. --- src/SparkFun_Ublox_Arduino_Library.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SparkFun_Ublox_Arduino_Library.cpp b/src/SparkFun_Ublox_Arduino_Library.cpp index 81994a1..04b2b3f 100644 --- a/src/SparkFun_Ublox_Arduino_Library.cpp +++ b/src/SparkFun_Ublox_Arduino_Library.cpp @@ -962,7 +962,7 @@ void SFE_UBLOX_GPS::processUBXpacket(ubxPacket *msg) switch (msg->cls) { case UBX_CLASS_NAV: - if (msg->id == UBX_NAV_PVT && msg->len == 92) + if (msg->id == UBX_NAV_PVT && (msg->len == 92 || (msg->len == 84 && getProtocolVersionHigh(defaultMaxWait) == 14))) { //Parse various byte fields into global vars constexpr int startingSpot = 0; //fixed value used in processUBX