Decoding NMEA Data with TinyGPS++

Overview

From the previous experiment, we learned how to read NMEA data from the software serial. In this experiment, we will use TinyGPS++ to parse the GPS data. TinyGPS++ is a simple GPS library that can parse NMEA data, extracting useful information.

Components and Supplies

Wiring

# GY-NEO6MV2 Arduino UNO R3
1 VCC 5V
2 GND GND
3 TX 2
4 RX 3

Library

Lonely Binary Github Library
TinyGPSPlus

Search for TinyGPSPlus by Mikal Hart in the library manager on Arduino IDE, and install this library.

Installing a library is a straightforward process that can be done swiftly. To begin, launch the Arduino IDE. Once the editor is open, direct your attention to the left column. Here, you'll notice a few icons. Locate and click on the "library" icon. Instantly, a comprehensive list of all the libraries at your disposal will materialize. You also have the option to search for a specific library. Once you've identified the desired library, simply click on the "INSTALL" button, and the installation process will commence.

Lonely Binary Arduino IDE Libaray Installation

Result

After successfully receiving GPS signals, the GPS module’s LED light starts blinking. Open the serial monitor, set the baud rate to 9600, and then we can see the parsed GPS data.

The time in GPS NMEA data is provided in UTC format. UTC is a global time standard, unaffected by any specific time zone or daylight saving adjustments. If you need local time, you need to adjust the UTC time according to your geographical location. For example, if you are in Sydney, Australia, you would add 11 hours to the UTC time to get the local time.

After obtaining the GPS latitude and longitude, we can copy it to Google Maps or Baidu Maps to search and view the location.

Lonely Binary Lab Result

LONELY BINARY LEARNING CENTRE

Leave a comment

Your email address will not be published. Required fields are marked *

Please note, comments must be approved before they are published