GPS and GNSS in embedded systems: modules, NMEA and accuracy

GPS and GNSS in embedded systems: modules, NMEA and accuracy

GPS and GNSS: from theory to electronic modules for embedded systems

Introduction

The Global Positioning System (GPS) it is a pervasive technology, present in smartphones, navigation systems, drones, wearables and critical infrastructures. Born in the 70s as a project of the United States Department of Defense, today it is part of a larger ecosystem (GNSS – Global Navigation Satellite Systems) which provides positioning, navigation and time synchronization with high reliability.

This article examines the working principles, the alternative constellations, the structure of GPS/GNSS modules, interfacing with microcontrollers and the standard NMEA 0183, including precision techniques (A-GPS, SBAS, RTK) and practical integration considerations.

The GPS system: origins and characteristics

GPS becomes fully operational in 1995 with at least 24 satellites active on 6 orbital planes about 20,200 km of altitude. Every satellite It completes two orbits per day and is equipped with highly stable atomic clocks. Radio signals are transmitted on multiple bands.

GPS satellites transmit on different frequency bands. The best known is the L1 (1575.42 MHz), historically the most used in the civil sector. Next to this there is the L2 (1227.60 MHz), initially reserved for military applications but today also used for correction techniques such as RTK. Finally, the most recent L5 (1176.45 MHz) is dedicated to civil applications which they require maximum precision and reliability, like aviation.

The position is calculated via trilateration: measuring the propagation time of the signal from multiple satellites and knowing the speed of light, the receiver obtains the distance to each satellite. With at least four satellites you get latitude, longitude, altitude and correction of the internal clock.

Fundamental aspect: the relativistic corrections. Differences in gravity and orbital velocity they would cause the clocks on board to diverge from those on Earth; without such fixes, errors of position would accumulate kilometers a day.

GNSS: beyond GPS

In addition to GPS, other constellations are operational: GLONASS (Russia), Galileo (EU), BeiDou (China) and regional systems QZSS (Japan) e NavIC (India). Modern receivers are typically multi-constellation and combine heterogeneous signals to improve precision, robustness and fix times.

In addition the systems operate SBAS satellite correction as WAAS (USA) ed EGNOS (Europe), which further reduce errors via differential correction messages.

Precision and advanced techniques

Under standard conditions a consumer receiver has an accuracy of approx 2–5 meters. The use of corrective techniques such as DGPS reduces the error to 1–3 meters. With advanced systems likeRTK, which exploits the carrier phase, is possible achieve centimeter precision. Finally, theA-GPS, commonly used in smartphones, it allows you to drastically reduce initial fix times by downloading the orbital information via cellular network or Internet.

Electronic architecture of a GPS/GNSS module

A typical GPS/GNSS module consists of multiple integrated elements. THE'antenna, that it can be a ceramic patch or an active solution with low noise amplifier, receives signals extremely weak, of the order of −130 dBm. These pass through the RF front end, which provides filtering and amplification. Subsequently the baseband processor demodulates and decodes the signals, calculating the position. An internal memory stores orbital data to reduce startup times, while different communication interfaces (UART, I²C, SPI, USB, Bluetooth) allow you to connect the module to microcontrollers or more complex systems.

gpsinfo
Functional integration diagram in an embedded system.

Popular GPS/GNSS modules

  • u-blox Neo-6M: cheap, reliable, UART 9600 baud; accuracy ~2.5 m.
  • u-blox Neo-M8N: multi-constellation (GPS/GLONASS/Galileo/BeiDou), reduced TTFF; popular in drones.
  • Quectel L80: integrated patch antenna and low consumption for battery-powered devices.
  • MediaTek MT3339: low-cost solution up to 66 channels; widely used in trackers.

Interfacing with microcontrollers (MCU)

The typical connection is via UART: VCC (3.3/5 V), GND, Module TX → MCU RX, Module RX → MCU TX (optional). Modules with USB, I²C or SPI are available when different requirements are needed (e.g. throughput, consumption or ease of connection to PC).

Operation sequence: power on → satellite search → fix (cold start: up to 1–2 min; warm/hot start: a few seconds) → continuous output of NMEA sentences for position, speed, altitude and UTC time.

NMEA 0183 protocol

The standard NMEA 0183 defines ASCII messages (“sentence”) typically sent to 9600 baud (some modules support higher speeds such as 115200 baud). Every sentence begins with the character $, has fields separated by commas and ends with a hexadecimal checksum preceded by *. Many modules allow you to select which sentences to transmit to reduce load computational system.

GPGGA example

$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47

UTC time = 12:35:19; Lat = 48°07.038' N; Lon = 11°31.000' E; Fix = valid (1); Satellites = 8; HDOP = 0.9; Altitude = 545.4 m; geoidal separation = 46.9 m.

.table-nmea { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; background-color: #929292ff; } .table-nmea th, .table-nmea td { border: 1px solid #ccc; padding: 8px 12px; text-align: left; } .table-nmea thead { background-color: #505050ff; font-weight: bold; }

Main sentences

Sentence Meaning Information
$GPGGA Fix Data Time, position, altitude, satellites, HDOP
$GPRMC Recommended Minimum Fix status, position, speed, course
$GPGSV Satellites in sight Number, elevation, azimuth, SNR
$GPGSA DOP & Active Satellites PDOP, HDOP, VDOP, used satellites
$GPVTG Track & Ground Speed Direction and speed relative to the ground

Limitations and challenges

  • Multipath in an urban context (reflections on buildings).
  • Poor indoor coverage (tunnels, buildings, underground areas).
  • TTFF high without A-GPS or ephemeris memories.
  • Vulnerability a jamming And spoofing.

Applications

The applications of GNSS systems are now ubiquitous. In addition to the land navigation, maritime and air, GPS modules are the basis of the fleet and asset tracking, as well as the control of drones and autonomous robotic systems. They are present in sports and outdoor devices, such as smartwatches and trackers, and are integrated into embedded data logger for recording routes. Finally, GPS plays a critical role in time synchronization telecommunications and electricity networks.

References and insights

Conclusion

GPS and, more generally, GNSS systems represent an exemplary integration of physics, electronics and computer science. Thanks to the multi-constellation modules and the standard NMEA 0183, integration into embedded systems ranges from simple data loggers up to professional navigation solutions and the synchronization of critical infrastructures.

Behind the simplicity of a pair of coordinates lies a complex and sophisticated system, made reliable by relativistic corrections, precision improvement techniques and a processing chain with attention to every detail.

Do you have a project to carry out?

Silicon LogiX provides embedded development expertise for integration of GPS/GNSS modules in custom projects. From the management of NMEA protocols to interfacing with microcontrollers and dedicated firmware, up to processing and data visualization: the entire flow of a GPS-based project can be followed with reliability and precision.

Contact me

Working on a similar problem?

IoT and connected-device work

Practical patterns for connected devices, web UIs, MQTT, Wi-Fi and network protocols.

View service Technical audit 90 minutes Discuss your project

Continue the path

Related resources

IoT and connected-device work

Practical patterns for connected devices, web UIs, MQTT, Wi-Fi and network protocols.

ESP32 local IoT with a web UI

Related deep dive in the Local IoT, ESP32 and connectivity path.

SLX Memory Map Explorer

Visualize memory maps, linker maps and firmware layout for MCU analysis and debugging.

Related articles

Back to English news