ULTIMATE GPS Logger - accurately time stamping datafiles

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
mnaylor
 
Posts: 4
Joined: Mon Aug 30, 2021 4:04 am

ULTIMATE GPS Logger - accurately time stamping datafiles

Post by mnaylor »

Hi,
I am wanting to find a best practice guide for how to combine very accurate timestamp data from the RTK in the GPS unit with data being read over the SPI and write this to the SD card. Presumably using PPS?
Whilst there are many ways to get this started, I want to be sure I am following best practice for getting highly accurate timestamps written to the file.
I assume this is a well understood problem, but have not been able to find a tutorial that discusses this issue.
Any pointers would be greatly appreciated.
Mark

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: ULTIMATE GPS Logger - accurately time stamping datafiles

Post by adafruit_support_mike »

The timestamps in the NMEA messages are measured from the beginning of each GPS second, and over time the GPS module will sync its PPS to within 10ns of the satellite constellation. It can take several hours to reach that kind of synchronization though.

Trying to use PPS data to manage SD writes is about the same as measuring the growth of a tree with a stopwatch.. the process you're trying to control is so much slower than the timing signal that any accuracy in your fast signal gets lost in rounding errors of the slow system. SD writes are measured in tens of milliseconds, putting them six orders of magnitude away from the PPS signal's precision.

In practice, any timestamp you get from a GPS module that has a fix is more precise than the timing of the SD card it's written to.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”