All paths

GPS and navigation

A NEO-6M on the Uno: NMEA sentences read by hand, TinyGPS++, judging a fix by satellites, HDOP and age, the haversine distance and initial bearing, geofences with hysteresis, track logs on a microSD card, and a reverse geocache box that opens in one place on Earth.

Arduino Uno R3Free7 lessons6 h3 chapters1,887 XPEmbedded engineering · Intermediate+150 XP

0 of 7 done

What you will build

2 projects, built step by step

7 lessons in 3 chapters, about 6 hours on a simulated Arduino Uno R3. Free, in your browser, every step checked by the simulator.

Chapter 1 project

Fix quality

When to trust a position: the satellite count, HDOP (4 over the square root of the count, here), and the age of the last reading. Three satellites are too few for a 3D fix, and a lost fix is noticed within two seconds.

Open it in the simulator
Chapter 2 project

Track logs

A track log on a microSD card: a CSV row of GPS time, latitude and longitude every two seconds as the module heads north at 36 km/h, opened and closed per row so a power cut loses one row, then read back.

Open it in the simulator
The map

Chapter by chapter

Each lesson opens when the one before it is done, and each chapter ends in a project.

Chapter 1

What the module says

NMEA sentences, TinyGPS++, and when to trust a fix.

  1. Open218 XP

    NMEA sentences

    A GPS module is a serial port that talks text. Read the NEO-6M’s sentences a line at a time with no library, check each checksum by hand, split $GPRMC into fields, and turn ddmm.mmmm into degrees.

    0 of 6 steps

  2. Locked218 XP

    TinyGPS++

    TinyGPS++ parses every sentence for you: position, altitude, satellites, time, speed and course, each with isValid(), isUpdated() and age(). Plus why the Uno prints 38.889469, and the time zone the GPS does not know.

    0 of 6 steps

  3. ProjectLocked374 XP

    Fix quality

    When to trust a position: the satellite count, HDOP (4 over the square root of the count, here), and the age of the last reading. Three satellites are too few for a 3D fix, and a lost fix is noticed within two seconds.

    0 of 5 steps

5 questions, graded as you go.
Chapter 2

Navigating

Distance and bearing, geofences, and track logs.

  1. Locked187 XP

    Distance and bearing

    The haversine distance and the initial bearing from the module to the Lincoln Memorial, written out and checked against TinyGPS++: 1294 m on a course of 269 degrees, and 2266 m against 2267 to the Capitol.

    0 of 5 steps

  2. Locked218 XP

    Geofences

    A circular geofence around where the module started: the module drives east at 72 km/h, the distance climbs 20 m a second, the fence trips at 100 m and sounds the buzzer, and a hysteresis band stops it chattering on the line.

    0 of 6 steps

  3. ProjectLocked436 XP

    Track logs

    A track log on a microSD card: a CSV row of GPS time, latitude and longitude every two seconds as the module heads north at 36 km/h, opened and closed per row so a power cut loses one row, then read back.

    0 of 6 steps

5 questions, graded as you go.
Chapter 3

Boss project

A reverse geocache box that opens in one place.

  1. Locked236 XP

    Boss: a geocache box

    A reverse geocache: the box shows on its LCD how far it is from the one place it opens, logs every try to its card, refuses to judge without a fix, and lights its latch lamp and chirps only within 20 m of the Smithsonian Castle.

    0 of 6 steps

3 questions, graded as you go.
Syllabus

Every lesson in the course

All 7 lessons, in order, each with what it covers. Any of them opens in the editor right away.

Chapter 1

What the module says

  1. NMEA sentencesA GPS module is a serial port that talks text. Read the NEO-6M’s sentences a line at a time with no library, check each checksum by hand, split $GPRMC into fields, and turn ddmm.mmmm into degrees.
  2. TinyGPS++TinyGPS++ parses every sentence for you: position, altitude, satellites, time, speed and course, each with isValid(), isUpdated() and age(). Plus why the Uno prints 38.889469, and the time zone the GPS does not know.
  3. Fix qualityWhen to trust a position: the satellite count, HDOP (4 over the square root of the count, here), and the age of the last reading. Three satellites are too few for a 3D fix, and a lost fix is noticed within two seconds.
Chapter 2

Navigating

  1. Distance and bearingThe haversine distance and the initial bearing from the module to the Lincoln Memorial, written out and checked against TinyGPS++: 1294 m on a course of 269 degrees, and 2266 m against 2267 to the Capitol.
  2. GeofencesA circular geofence around where the module started: the module drives east at 72 km/h, the distance climbs 20 m a second, the fence trips at 100 m and sounds the buzzer, and a hysteresis band stops it chattering on the line.
  3. Track logsA track log on a microSD card: a CSV row of GPS time, latitude and longitude every two seconds as the module heads north at 36 km/h, opened and closed per row so a power cut loses one row, then read back.
Chapter 3

Boss project

  1. Boss: a geocache boxA reverse geocache: the box shows on its LCD how far it is from the one place it opens, logs every try to its card, refuses to judge without a fix, and lights its latch lamp and chirps only within 20 m of the Smithsonian Castle.
Kits

Build it on your bench too

Every lesson runs in the simulator with nothing to buy. When you want the real thing, these kits have the parts.

Have a kit already?

Find your kit

Pick the starter kit you own and run every lesson in its manual with the same parts on the same pins.

See every kit
Questions

About GPS and navigation

Is GPS and navigation free?

Yes. All 7 lessons of GPS and navigation are free and run in your browser, with nothing to install and no parts to buy before you start.

Do I need a real Arduino Uno R3?

No. Every lesson runs on a simulated Arduino Uno R3 with its parts on the canvas, and the simulator checks each step as you go. When you want to build it for real, the same wiring and code work on a real board.

How long does GPS and navigation take?

About 6 hours: 7 lessons in 3 chapters, each one a few short steps. Your progress is kept, so you can stop after any lesson and pick up where you left off.

What will I build?

Each chapter ends in a project that puts it together: Fix quality and Track logs.

Where do I start?

With "NMEA sentences", and each lesson builds on the one before it. New to circuits? Electronics basics is the course that starts from zero.