CSV File Format

All of the data from the Arduino GPS data logger is recorded in a CSV (comma separated values) file on the SD card. This information is then uploaded to Google Maps where it will produce a nice map of all the locations that your GPS data logger has been.

We chose CSV format for the data because it is easy to produce with the Arduino and also easy to manipulate, upload and use to produce useful information, such as the Google Map. Each line ends with a CR (carriage return) and LF (line feed). Below is an explanation of the data file format.

In this project we are capturing fields (or parameters) from the GPS and logging them into the GPS.LOG file. We are capturing report type, mac address, time and date, latitude, longitude, altitude, speed and heading.

CSV Field breakdown

  • Report Type - We wanted to be able to distinguish between the different types of reports that the GPS data logger can make. Basically, there are four types of reports possible.
    • U (unspecified) - This is basically an error. There should never actually be any report types of U in the CSV file.
    • I (Incremental) - This is a report based on time. The program defaults are set so that every 30 minutes the data logger will log a position report regardless.
    • R (Regular) - This is a report based on heading changes. If the GPS heading changes more than 30 degrees from its past reading the a report will be made.
    • D (Distance version 2 only) - This is a report based on distance traveled. If the data logger has traveled more than 3/4 of a mile a report will be made.
  • MAC Address - Media Access Control addresses are hexidecimal addresses generally assigned to network devices such as LAN cards. In the case of our data logger project this is an arbitrary address used to distinguish one tracker from another. It can be any address or type of identifier you wish. In a future project this will become important because there will be multiple devices being tracked.
  • Time and Date - This is the time and date in UTC (Universal Coordinated Time) of the report. Field format is mm-dd-yyyy hh:mm:ss. Time is 24-hour format. This actually comes from the GPS receiver. The Arduino does not have a RTC (real-time clock) so unless you attach one to it or connect to an NTP (network time protocol) server the Arduino won't know the correct time.
  • Latitude - This is the latitude of the GPS data logger as reported by the GPS receiver. I'm reporting the latitude to five decimal places which should be enough resolution for most vehicle applications. The amount of data returned is controllable in the program.
  • Longitude - This is the longitude of the GPS data logger as reported by the GPS receiver. Longitude is reported to five decimal places.
  • Altitude - This is the elevation of the GPS data logger as reported by the receiver. The program converts it to feet above sea level.
  • Speed - Speed of the GPS logger in miles per hour as reported by the GPS receiver.
  • Heading - Heading or direction of travel expressed in degrees.