Skip to content

Commit 63849d0

Browse files
committed
Clarify the timing of PVT (in the context of TIM TP)
1 parent 2ee8e58 commit 63849d0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

examples/Basics/Example32_TIMTP/Example32_TIMTP.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*
22
Displaying the TIM TP timing information for the _next_ TP time pulse
3-
(PVT provides the time of the _previous_ pulse)
43
By: Paul Clark
54
SparkFun Electronics
65
Date: March 24th, 2023
76
License: MIT. See license file for more information.
87
98
This example shows how to query a u-blox module for the TIM TP time-pulse-of-week.
109
This contains the timing information for the _next_ time pulse. I.e. it is output
11-
_ahead_ of time. PVT contains the time of the _previous_ pulse.
10+
_ahead_ of time. PVT provides the time of the navigation solution which is usually
11+
aligned with the _previous_ pulse.
1212
1313
Feel like supporting open source hardware?
1414
Buy a board from SparkFun!
@@ -78,7 +78,8 @@ void loop()
7878
// Then getPVT will poll NAV PVT, wait and return true when the NAV PVT data arrives.
7979
// The TIM TP data will then be one second old.
8080
// Because TIM TP provides the time of the _next_ time pulse and NAV PVT provides
81-
// the time of the _previous_ time pulse, the two Epochs should be the same!
81+
// the time of the navigation solution close to the _previous_ time pulse,
82+
// the two Epochs should be the same!
8283
if (myGNSS.getTIMTP() && myGNSS.getPVT())
8384
{
8485
// Read the time pulse of week as Unix Epoch
@@ -101,7 +102,7 @@ void loop()
101102
uint32_t epochPVT = myGNSS.getUnixEpoch(microsPVT); //Read the time of week as Unix Epoch
102103

103104
Serial.print("NAV PVT as Epoch: ");
104-
Serial.print(epochPVT); //Print the time of the previous pulse
105+
Serial.print(epochPVT); //Print the time of the previous navigation solution
105106
Serial.print(".");
106107
if (microsPVT < 100000) Serial.print("0"); //Pad the zeros if needed
107108
if (microsPVT < 10000) Serial.print("0");

src/u-blox_structs.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,8 @@ typedef struct
19221922

19231923
// UBX-TIM-TP (0x0D 0x01): Time pulse time data
19241924
// Contains the Time-Pulse-Of-Week for the _next_ time pulse
1925-
// (PVT etc. provide the time of the _previous_ time pulse)
1925+
// (PVT provides the time of the navigation solution which is usually
1926+
// aligned with the _previous_ pulse)
19261927
const uint16_t UBX_TIM_TP_LEN = 16;
19271928

19281929
typedef struct

0 commit comments

Comments
 (0)