One of the nice things about the MTK3339 is the built in data-logger. This basic data-logging capability can store date, time, latitude, longitude and altitude data into a 64K flash chip inside. Its not a high resolution logger - it only logs once every 15 seconds when there is a fix - but for 99% of projects that want to track location, this can be a great low power way to log data - no SD card or other EEPROM required! It can store up to 16 hours of data.

The GPS module does require a microcontroller to 'kick start' the logger by requesting it to start. If power is lost it will require another 'kick' to start. If you already have some data in the FLASH, a new trace will be created (so you wont lose old data) and if you run out of space it will simply halt and not overwrite old data. Despite this annoyance, its still a very nice extra and we have some library support to help you use it

For more details check out the LOCUS (built-in-datalogging system) user guide

First, we should try getting the logger to run.Open up the File→Examples→Adafruit_GPS→locus_start sketch. This will demonstrate how to start the logger (called LOCUS)

The key part is here:

Serial.print("STARTING LOGGING....");
  if (GPS.LOCUS_StartLogger())
    Serial.println(" STARTED!");
    Serial.println(" no response :(");
You should start the logger and then check the response:

Logging Status

Once you've seen that the GPS is OK with logging, you can load up the status sketch which will also give you more data. Upload File→Examples→Adafruit_GPS→locus_status

This output gives you some more information. the first entry is the Log #. This is how many log traces are in the memory. Every time you start and save data, a new log is made. Full Stop means that once the logger has run out of memory it will stop. Next the output indicates that we are logging only during fix data and at set intervals, with an interval delay of 15 seconds. We are not logging based on distance or speed. The current status is LOGGING (active), there's also the number of records we've stored. Each record is a timestamped location. We log once every 15 seconds, you can see the records increment from 344 to 345 here. Lastly, we can see how much of the internal flash storage is used, only 4% at this point

In real use, you'll probably want to start the loggging and then have your microcontroller go to sleep to reserve power, waking up once in a while to check up on the logging status.

Downloading Data

Finally, once we're done logging we need to extract the data. To do this we need to first get the raw data out of the FLASH and then decode the sentences. UploadFile→Examples→Adafruit_GPS→locus_dump to the Arduino and open up the serial monitor

PLEASE NOTE: Asking the Arduino, with 2K RAM buffer to handle 64KB of FLASH data and spit it out from the GPS can sometimes over-tax the processor. If you are having hiccups, check the GPS tool instructions below

Copy and paste all the text after the —-'s (starting with $PMTKLOX,0,86*67 and ending with $PMTK001,622,3*36) then paste it into the box located on this page


you can try this python tool that don has kindly donated to the community!

Using the GPS Tool

If you are having difficulty with the Arduino/javascript tool, you can also try using the GPS tool. The tool runs only under Windows but it is very powerful.

Connect the GPS module to an Arduino (connected with the Direct Wiring example) , FTDI adapter or other TTL converter and download the GPS Tool - connect to the GPS via the COM port of the Arduino/FTDI/TTL cable. You can then query, dump and delete the log memory

This guide was first published on Aug 23, 2012. It was last updated on 2023-12-05 10:09:35 -0500.

This page (Built In Logging) was last updated on Jul 30, 2012.

Text editor powered by tinymce.