Instructables

Geo Data Logger: Arduino+GPS+SD+Accelerometer to log, time-stamp, and geo-tag sensor data

Featured

Step 9: FORMATTING GPS DATE/TIME OUTPUT FOR STAMPING DATA

Picture of FORMATTING GPS DATE/TIME OUTPUT FOR STAMPING DATA
Since time-stamping logged data is important for many projects, I will explain how to extract and format the GPS generated time/date data.

In this project, we hid all data columns in Excel except columns containing z-axis data, latitude, and longitude. If we wish to keep a date/time stamp to map and visualize along with the rest of the retained sensor and GPS data columns, we simply don't hide column E (time) and column M (date). 

The LS20031 GPS receiver, as with other GPS receivers of its class, updates its internal clock to sync with the GPS satellites' internal atomic clock which is accurate to 1 billionth of a second. 

The GPS receiver sends date/time stamped location fixes via a variety of NMEA text sentences.  We have chosen the RMC NMEA message for this project.  This is how an RMC sentence looks like. 

$GPRMC,093025.600,A,3157.8299,N,03551.5057,E,18.18,37.45,111112,,,A*6C

The boldfaced number from the left end of the NMEA sentence is the UTC Time. It's interpreted according to this format string: hhmmss.sss. So 093025.600 can be displayed as: 09:30:25. 

The second boldfaced number from the left is the date. It's interpreted according to this format string: ddmmyy. So 111112 can be displayed as 11-November-2012

UTC Time (Zulu) is Coordinated Universal Time. You can calculate your local time as needed by adding or subtracting hours and minutes before or after UTC time.


 
Remove these adsRemove these ads by Signing Up