Recently I intended to make a small project using GPS Module (UBLOX Neo) and ESPectro. This is not my first time using a GPS Module in an embedded system, but this time something sparks my curiosity on how the GPS module works and what should I expect to do with it. As I embark on a journey to understand what the module really do, I come across interesting question from my friend about the conspiracy theory that GPS works not with satellite, instead there are some base nodes which use triangulation to tell the location of a module, but it is a discussion for later date. For now I will share what I learn as I try to complete this project.
My phone says it needs internet to locate me, does it too?
Actually even our phone could locate you without using internet, since internet connection is not a necessity in GPS localization. But as we could expect from a relatively small device and quite a long distance from us to the satellite, by using GPS alone, we couldn’t pinpoint our exact location, some may have around 3 meter or up to 10 meter of accuracy depending on several factors, but by using the help of internet connection (Assisted-GPS) it is possible to pinpoint our location down to 1 meter of accuracy and at a quite short time at that.
So it is possible to use GPS without internet location, because GPS has its own antenna to receive data from satellite and from there the data can be used to determine ones location.
So, I need to communicate with satellite? I bet using GPS is hard as hell
Well yeah if we design the low level system (the GPS module itself) but using a GPS module is as easy as reading a serial communication. We don’t really need to communicate to the module itself let alone the satellite, because to use it (in the simplest way) we only need to listen for what it says to us (or your computer/ micro controller) and they will tell us where we are or whether they could locate us or not. So all we need to do to use this GPS module is to listen, neat right?
Really? how do I listen to it?
Well.. we won’t hear it says anything audible, two things we need to know to be able to listen properly is how it talks, whether using text, sound, or morse, etc. And what language does it use. In this case, GPS module talks using Serial Communication (USART) and the ‘language’ it speaks in is called NMEA Sentences, a protocol commonly used for GPS localization. By establising communication using USART, and by understanding the language of NMEA, we could listen properly and understand what the module say to us. The easiest way to do this is to conect your GPS module to the computer and use U-Center, a GNSS Software from U-Blox which we could use to translate the sentences to a more readable data.
To get hands on with the GPS please visit my project page, which I will update soon 🙂