Instructables

GPS time (UTC) to local time conversion using Arduino

Picture of GPS time (UTC) to local time conversion using Arduino
I have a GPS receiver, Holux M-1000, which you can use it with a laptop, a PDA, or a cellphone through Bluetooth.  I had used it for navigation with Palm TX and Treo700p (yes, I have long been a big fan of Palm PDA series) and Geocaching until I bought an Android smartphone which has a built-in GPS module. So Holux M-1000 has been in my drawer collecting dust for more than a year.

Recently, I wanted to make a small GPS device for measuring distance between two locations, for example, while you are playing golf you can measure how good your driver shot is. There are a lot of commercial product that can do this and much more, but buying is far less fun than making one by yourself (I'm sure Instructables visitor and author will strongly agree with me, right?) There are Android applications as well, but none of them attracts me.

My idea is to add a small LCD, similar size as the size of the GPS, and a microprocessor to acquire data from the GPS, calculate distance, and show it on the LCD along with time and date. I have ordered one of the popular LCD, Nokia 5110, and started doing research on how to get the GPS data, how to interprete the data, and what kind of data I can get.

Well, calculating distance seemed to be easy.  I could find a couple of ways to calculate the distance between two locations. However, converting GPS time(UTC) into local time seemed to be a little tricky, but it was fun to figure out the way to convert time to local time including daylight saving time and date.  I have already posted this part in my blog page and decided to share my Arduino program here. Once I get the LCDand finish assembling the device, I will post another Instructable with full program and pictures, too.  This Instructable includes only how to get the data from the GPS (Holux M-1000) through serial bus and how to convert the GPS time to local time.
 
Remove these adsRemove these ads by Signing Up
philip4225 days ago

Actually GPS time currently differs from UTC by 16 seconds, primarily because GPS doesn't add Leap Seconds. So you'll need to make that adjustment in your code.

I've got an excellent UTC app on my phone which shows GPS time vs. actual UTC and local time.