Some time ago I did some tests connecting a GPS module to LimiFrog.
I thought I would write a few words about what I did. Here they are…


The GPS module

I acquired the “Ultimate GPS Breakout” board from Adafruit (full description here). It’s based on an all-in-one GPS module from a company called GlobalTop and integrates everything including digital processing logic, RF receiver and even the antenna. At its heart is the MTK3339 system-on-chip from MediaTek, a rather well-know reference. It’s affordable (about 40USD/40EUR) and well documented.

Connecting it to LimiFrog is straightforward using LimiFrog’ extension connector. Just 4 connections are needed: Ground, 3.3V provided by LimiFrog, and UART Rx/Tx.

Adafruit GPS + LimiFrog

Optionally, 3 other pins of the GPS module may also be connected to positions available on LimiFrog’s extension port (set up as GPIO or perhaps interrupt sources): these are EN (global enable for the GPS module), FIX (fix indication signal from the GPS module — fix status is also available through messages from the module) — and PPS, an accurate 1Hz reference (pulse) obtained from the GPS satellites.

The code I used

Adafruit provides an Arduino library to communicate with the module. The library offers a number of convenient C++ functions to parse NMEA messages. Physically, all data is exchanged over a UART link between the micro-controller running the library and the GPS module.
I decided to do a quick (if not ultra-clean) port of this library to integrate it in the LimiFrog environment. It essentially consisted of porting the library from C++ to C and making use of of an STM32 UART available on the extension port.
I also wrote a program which allowed me to obtain geolocation information from the GPS module, display it on screen and also log it into LimiFrog’s file system as a .CSV file. The log file can then be read from PC via USB for further exploitation. The code is available on GitHub, as project “Demo_External_GPS“.

Adafruit GPS + LimiFrog

Results I got

The Adafruit break-out board can house a small coin cell battery as back-up power to retain previous fix information when the module is powered-off. Using this information at the next power-up drastically improves fix time. On cold starts (no battery back-up) I was able to obtain a fix in about 45 seconds outdoors and 1 to 2 mn with the module placed indoors, close to a window. With the battery back-up (warm start) it was a matter of a few seconds (less than 5 seconds in most cases).

I let my setup run at various places nearby my house, doing 2-3 series of measurements for each location, with at least one hour at each location. Converting to meters the changes over time in latitude/longitude, I measured a standard deviation of about 3 meters (with, however, one series that yielded a standard dev of 1km !  …perhaps there was something special with that one, although I don’t remember noticing anything).
The reported altitude (even with a warm start) often took some time to stabilize, to then report a fairly sensible value, with an accuracy of a few tens of meters. Similarly the reported speed took some time to stabilize, finally converging to some low, but non-zero value …while all measurements were made with the GPS module completely still.

Overall, I found Adafruit’s GPS module easy to use and was happy to be able to interface it very easily with LimiFrog.
The measured accuracy looks pretty good and seems in line with GlobalTop’s datasheet which specifies 3 meters at 50%CEP — despite the occasional odd results. Of course, more measurements with a strict methodology would be required to build a better view of the achievable performance.
Specifically, for a specific application of mine, I was interested in checking if the relative accuracy of GPS (measured over an hour or so) may be better than its absolute accuracy. Looks like the answer is no.

ShareTweet about this on TwitterShare on FacebookEmail this to someoneShare on Google+Share on LinkedInPin on Pinterest