Greater Accuracy with TinyGPS 13

Posted on September 1st, 2013 at 1:45 pm by

0


TinyGPS 13 has been released. This latest revision improves the algorithm used to transform the raw NMEA latitude and longitude values into floating-point numbers representing decimal degrees. You may not have noticed any problem, but prior versions of TinyGPS generated values that were accurate to only about 5 decimal digits, or about 1 meter. Version 13 is accurate to about one millionth of a degree (six decimal digits), or about 4 inches.

Before you get too excited about being able to locate your quadcopter within 4 inches, let me remind you that most commercial GPS receivers don’t have anywhere near that accuracy. What TinyGPS 13 promises to do is be as faithful as possible to the data it was given. But it can’t cure hardware inaccuracies.

It is worth mentioning that if you are using an ARM or x86–that is, a processor that can support 64-bit C++ “double”s–you can gain still a bit more accuracy by changing all the “float”s in TinyGPS.h and TinyGPS.cpp to “double”. It makes no difference at all on an Arduino Uno or Mega, because on these processors “float” and “double” are both 32-bit. True accuracy to millionths of a degree is just slightly beyond the capacity of a 32-bit float. (We didn’t make the change to double ourselves, because that would break too many already-written programs, including, for example, our own Reverse Geocache™ Puzzle sample code.)

A forthcoming derivative, TinyGPS++, will have this feature and many more.