GPS Basics

Contributors: Member #23999
Favorited Favorite 23


Lock Problems

Mikal Hart's TinyGPS++ library is excellent to get you up and running quickly with GPS. However, that might not be the case if you are between urban canyons, inside a concrete building, or a black pit of doom for all wireless signals to/from the outside world. The problem that we found is when GPS is used indoors, and, in the case of the SparkFun building, it makes seriously difficult to get a GPS lock. We have lots of concrete, metal girders, and a large solar array that wreaks havoc with GPS signals (and pretty much all cellular carriers for that matter).

Google map of our roof.

If you ever have issues seeing the GPS data when using a library or the output is incomplete, you may need to move to a different location to view more satellites. Sometimes moving the GPS module a few steps to a different spot or to the perimeter of a building can help. To check the amount of satellites in view, you can observe 6th and 7th field of the GPGAA sentence to see if you are having any lock problems. Below is an example GPGGA sentence when a GPS module does not have a satellite lock. As you can see, the output indicates that the data is invalid since there is no GPS fix and there are no satellites in view.


Baud Rate Mismatch

If you are passing data from the GPS module's serial UART to your serial monitor and all you see is "garbage" like the image below, check to make sure the baud rate set is correctly. Depending on the GPS module, the baud rate can be vary. Make sure to check the datasheet for your GPS module to ensure that the baud rate is the same.

Baud Rate Mismatch

Baud rate mismatch (aka garbage) as described in this Common Pitfalls section.