You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// To prevent this, uncomment the line two lines below
3787
3787
if ((packetUBXRXMPMPmessage != NULL) && (packetUBXRXMPMPmessage->callbackData != NULL)
3788
3788
//&& (packetUBXRXMPMPmessage->automaticFlags.flags.bits.callbackCopyValid == false) // <=== Uncomment this line to prevent new data from overwriting 'old'
uint32_t t = SFE_UBLOX_DAYS_FROM_1970_TO_2020; // Jan 1st 2020 as days from Jan 1st 1970
16390
-
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_2020[packetUBXNAVPVT->data.year - 2020]; // Add on the number of days since 2020
16389
+
uint32_t t = SFE_UBLOX_DAYS_FROM_1970_TO_2020; // Jan 1st 2020 as days from Jan 1st 1970
16390
+
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_2020[packetUBXNAVPVT->data.year - 2020]; // Add on the number of days since 2020
16391
16391
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_MONTH[packetUBXNAVPVT->data.year % 4 == 0 ? 0 : 1][packetUBXNAVPVT->data.month - 1]; // Add on the number of days since Jan 1st
16392
-
t += (uint32_t)packetUBXNAVPVT->data.day - 1; // Add on the number of days since the 1st of the month
16393
-
t *= 24; // Convert to hours
16394
-
t += (uint32_t)packetUBXNAVPVT->data.hour; // Add on the hour
16395
-
t *= 60; // Convert to minutes
16396
-
t += (uint32_t)packetUBXNAVPVT->data.min; // Add on the minute
16397
-
t *= 60; // Convert to seconds
16398
-
t += (uint32_t)packetUBXNAVPVT->data.sec; // Add on the second
16392
+
t += (uint32_t)packetUBXNAVPVT->data.day - 1; // Add on the number of days since the 1st of the month
16393
+
t *= 24; // Convert to hours
16394
+
t += (uint32_t)packetUBXNAVPVT->data.hour; // Add on the hour
16395
+
t *= 60; // Convert to minutes
16396
+
t += (uint32_t)packetUBXNAVPVT->data.min; // Add on the minute
16397
+
t *= 60; // Convert to seconds
16398
+
t += (uint32_t)packetUBXNAVPVT->data.sec; // Add on the second
uint32_t t = SFE_UBLOX_DAYS_FROM_1970_TO_2020; // Jan 1st 2020 as days from Jan 1st 1970
16421
-
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_2020[packetUBXNAVPVT->data.year - 2020]; // Add on the number of days since 2020
16420
+
uint32_t t = SFE_UBLOX_DAYS_FROM_1970_TO_2020; // Jan 1st 2020 as days from Jan 1st 1970
16421
+
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_2020[packetUBXNAVPVT->data.year - 2020]; // Add on the number of days since 2020
16422
16422
t += (uint32_t)SFE_UBLOX_DAYS_SINCE_MONTH[packetUBXNAVPVT->data.year % 4 == 0 ? 0 : 1][packetUBXNAVPVT->data.month - 1]; // Add on the number of days since Jan 1st
16423
-
t += (uint32_t)packetUBXNAVPVT->data.day - 1; // Add on the number of days since the 1st of the month
16424
-
t *= 24; // Convert to hours
16425
-
t += (uint32_t)packetUBXNAVPVT->data.hour; // Add on the hour
16426
-
t *= 60; // Convert to minutes
16427
-
t += (uint32_t)packetUBXNAVPVT->data.min; // Add on the minute
16428
-
t *= 60; // Convert to seconds
16429
-
t += (uint32_t)packetUBXNAVPVT->data.sec; // Add on the second
16430
-
int32_t us = packetUBXNAVPVT->data.nano / 1000; // Convert nanos to micros
16431
-
microsecond = (uint32_t)us; // Could be -ve!
16423
+
t += (uint32_t)packetUBXNAVPVT->data.day - 1; // Add on the number of days since the 1st of the month
16424
+
t *= 24; // Convert to hours
16425
+
t += (uint32_t)packetUBXNAVPVT->data.hour; // Add on the hour
16426
+
t *= 60; // Convert to minutes
16427
+
t += (uint32_t)packetUBXNAVPVT->data.min; // Add on the minute
16428
+
t *= 60; // Convert to seconds
16429
+
t += (uint32_t)packetUBXNAVPVT->data.sec; // Add on the second
16430
+
int32_t us = packetUBXNAVPVT->data.nano / 1000; // Convert nanos to micros
16431
+
microsecond = (uint32_t)us; // Could be -ve!
16432
16432
// Adjust t if nano is negative
16433
16433
if (us < 0)
16434
16434
{
16435
16435
microsecond = (uint32_t)(us + 1000000); // Make nano +ve
Copy file name to clipboardExpand all lines: src/SparkFun_u-blox_GNSS_Arduino_Library.h
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -1110,14 +1110,14 @@ class SFE_UBLOX_GNSS
1110
1110
voidflushNAVCLOCK(); // Mark all the data as read/stale
1111
1111
voidlogNAVCLOCK(bool enabled = true); // Log data to file buffer
1112
1112
1113
-
boolgetSurveyStatus(uint16_t maxWait = 2100); // NAV SVIN - Reads survey in status
1114
-
boolsetAutoNAVSVIN(bool enabled, uint16_t maxWait = defaultMaxWait); // Enable/disable automatic survey in reports at the navigation frequency
1115
-
boolsetAutoNAVSVIN(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); // Enable/disable automatic survey in reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update
1116
-
boolsetAutoNAVSVINrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); // Set the rate for automatic SVIN reports
1117
-
boolsetAutoNAVSVINcallbackPtr(void (*callbackPointerPtr)(UBX_NAV_SVIN_data_t *), uint16_t maxWait = defaultMaxWait); // Enable automatic SVIN reports at the navigation frequency. Data is accessed from the callback.
1118
-
boolassumeAutoNAVSVIN(bool enabled, bool implicitUpdate = true); // In case no config access to the GPS is possible and survey in is send cyclically already
1119
-
voidflushNAVSVIN(); // Mark all the data as read/stale
1120
-
voidlogNAVSVIN(bool enabled = true); // Log data to file buffer
1113
+
boolgetSurveyStatus(uint16_t maxWait = 2100); // NAV SVIN - Reads survey in status
1114
+
boolsetAutoNAVSVIN(bool enabled, uint16_t maxWait = defaultMaxWait); // Enable/disable automatic survey in reports at the navigation frequency
1115
+
boolsetAutoNAVSVIN(bool enabled, bool implicitUpdate, uint16_t maxWait = defaultMaxWait); // Enable/disable automatic survey in reports at the navigation frequency, with implicitUpdate == false accessing stale data will not issue parsing of data in the rxbuffer of your interface, instead you have to call checkUblox when you want to perform an update
1116
+
boolsetAutoNAVSVINrate(uint8_t rate, bool implicitUpdate = true, uint16_t maxWait = defaultMaxWait); // Set the rate for automatic SVIN reports
1117
+
boolsetAutoNAVSVINcallbackPtr(void (*callbackPointerPtr)(UBX_NAV_SVIN_data_t *), uint16_t maxWait = defaultMaxWait); // Enable automatic SVIN reports at the navigation frequency. Data is accessed from the callback.
1118
+
boolassumeAutoNAVSVIN(bool enabled, bool implicitUpdate = true); // In case no config access to the GPS is possible and survey in is send cyclically already
1119
+
voidflushNAVSVIN(); // Mark all the data as read/stale
1120
+
voidlogNAVSVIN(bool enabled = true); // Log data to file buffer
1121
1121
1122
1122
// Add "auto" support for NAV TIMELS - to avoid needing 'global' storage
1123
1123
boolgetLeapSecondEvent(uint16_t maxWait = defaultMaxWait); // Reads leap second event info
0 commit comments