Getting UTC Atomic Clock Time and Date from GPS and Raspberry Pi Pico W

In this video lesson we show how you can get extremely accurate time reference from your Adafruit Ultimate GPS V3. We show that atomic clock time is encoded in the NMEA sentences, and is in UTC. We show how to retrieve the data, and convert to your local time. In this video I compensated for the clock rolling from one day to the next, for positive UTC correction time, but did not account for clock rollover for negative UTC correction times. Also, several pointed out that you have to also compensate for calendar rollover at the end of the month, and the end of the year. The video shows how we are approaching the problem, and then the code below includes the compensations we did not do in the video. The code is heavily commented so hopefully you will be able to follow it.

Pi Pico GPS
Schematic for our GPS Tracker with OLED Display

For your convenience, the code developed in the lesson is presented below: