Adventures in Science: How GPS Works

Let's gaze upward and look at how some of those nifty satellites can give us position data.

Favorited Favorite 4

This week, we're taking a look at how the ever-popular Global Positioning System (GPS) works. There's a good bit of complicated technology flying around in the satellites, so I try to simplify it as much as possible.

To use GPS, we'll need a receiver and something to interpret the NMEA messages that it spits out. Oh, and an open view of the sky can't hurt, either. NMEA data contains several different message types, so sites like this prove quite useful in interpreting and parsing the data.

In the video above, I show how to print raw NMEA data to the console, as well as to parse just time and position data. If you are interested in the code for that, it can be found here:

Knowing your position on the surface of the Earth is helpful when you're trying to drive to Grandma's house, but when it comes to robotics and self-driving cars, it's invaluable. GPS is accurate to a few meters, so it's great for larger robots (e.g., autonomous vehicles), but it lacks the precision to navigate some smaller vehicles.

Have you used GPS for AVC before? How well did it work, and do you have any tips to share that would help increase its accuracy?

Comments 5 comments

  • carmoca / about 7 years ago / 1

    This was an amazingly well done video on GPS! I knew you needed at least 3 satellites for position information but I had the wrong reasons for how they were used - I learned something from watching this video. The inclusion of the fourth one was completely new! And the 3D spherical representations really hammered home the point. Bravo!

  • Ted M / about 7 years ago / 1

    I've found that putting a largish metal ground-plane under the GPS antenna can really help.

    As for the AVC, the course the past couple of years was small enough that GPS was not quite accurate enough in my opinion. Now, if RTK could be used, that would be a game changer! I agree with Shawn that it would be great to get away from localization problems and start working on other interesting innovations like obstacle avoidance.

  • Member #286247 / about 7 years ago * / 1

    SparkFun should look at investing in an RTK base permanently located at your facility with a transmit only 2.4Ghz radio signal. AVC competitor could invest in a single frequency L1 RTK system and receiving radio. L1 typically takes a few minutes to reach Fixed Mode but once it's there, participants will have cm level accuracy all around the track. Hemisphere GPS probably has the least expensive single frequency RTK system on the market and there are some Chinese knock offs that are fairly reasonably priced. If the base is Hemisphere, for example, then the rovers would all have to be Hemisphere too. There is the CMR correction string that can be transmitted that from most any Base and that can be received as a correction string by many branded receivers out there.

    I was quoted $150 for the P102. Probably $150 for a decent antenna.

    • Once you plot the entire track, where's the innovation? The challenge then becomes who can build the fastest RC car again. I always thought the goal of AVC was to eventually get to a point where GPS wasn't the only sensor used.

    • Getting cm accuracy at AVC would be a great addition. I don't think we'll be able to get it for this event, but I'll bring it up as a possibility for next year.However, like Casey said, we're moving more toward having obstacles that aren't predetermined before the race, which means you'll need to use a combination of sensors.

Related Posts

Recent Posts


All Tags