May 31 2025

Building a Real-Time GPS Dashboard with Python and SparkFun NEO-M9N (GPS-17285)


Author: Shafeeque Olassery Kunnikkal | Category: GPS, IoT, Raspberry Pi, Sparkfun Qwiic Breakout Modules | Leave a Comment

Developed using Gemini with contributions from gr4ytips

In an age where precise location data powers everything from everyday navigation to high-efficiency logistics, the ability to visualize and analyze GPS information in real time is a game-changer. This project introduces a Python-based desktop application designed to interface with the SparkFun GPS Breakout – NEO-M9N (SMA, Qwiic), offering real-time tracking, geofencing, data logging, and advanced trip analysis.

This application was entirely developed using Gemini as part of my personal learning journey into SparkFun Qwiic Breakout Modules and the Qwiic ecosystem.

📥 Download the project:
https://github.com/gr4ytips/Sparkfun_Qwiic.git


1. Project Objective

The main goal of this project was to develop an intuitive and feature-rich desktop tool that can interface with a U-Blox GPS module to provide:

  • Live GPS data: Display key metrics such as latitude, longitude, altitude, speed, and heading.
  • Situational awareness: Include a dynamic driving dashboard and satellite skyplot for added context.
  • Persistent data logging: Store GPS data in multiple formats for post-processing and analysis.
  • Intelligent features: Implement geofencing alerts and in-depth trip analytics (e.g., hard braking, sharp turns).
  • Offline simulation: Replay previously recorded trips for simulation or analysis.

2. Development Approach

The GPS Dashboard was developed using a modular and iterative strategy. The application’s graphical interface is built with Python’s tkinter and styled with ttkbootstrap for a clean, modern look. Visualization and mapping are handled by matplotlib and folium.

Architecture Overview

  • gps_handler.py – Manages serial connections and parses GPS data.
  • data_logger.py – Logs parsed data into CSV, JSONL, and raw NMEA formats.
  • settings_manager.py – Loads and persists user settings.
  • map_generator.py – Uses folium to generate route maps.
  • playback_manager.py – Simulates previously logged GPS sessions.
  • utils.py – Utility functions for conversions, formatting, and math.
  • config.py – Configuration constants.
  • gps_dashboard_app.py – Main entry point that coordinates modules and GUI.

A multithreaded design ensures the GUI remains responsive during continuous data collection.


3. Hardware and Software Requirements

Software

  • Python ≥ 3.8
  • pip – for installing dependencies

Install required libraries:

pip install ttkbootstrap matplotlib pyserial folium tkhtmlview numpy sparkfun-ublox-gps

Or use:

pip install -r requirements.txt

Dependencies

  • ttkbootstrap, matplotlib, pyserial, folium, tkhtmlview, numpy, sparkfun-ublox-gps

Hardware

  • SparkFun NEO-M9N GPS Module (SMA, Qwiic)
  • USB-to-Serial Adapter (e.g., FTDI or CP2102)
  • OS Support: Linux, Windows, macOS

4. User Interface Overview

The application interface is divided into several functional tabs:

  • Driving Dashboard: Speed, altitude, heading, and trip stats.
  • GPS Data: Raw and processed GPS metrics with satellite details.
  • Satellite Skyplot: Polar and bar plots of satellite signal strength.
  • Map View: Real-time tracking via an interactive folium map.
  • Geofencing: Define zones and get entry/exit alerts.
  • NMEA Console: Live raw NMEA feed for debugging.
  • Trend Data: Graphs of GPS metrics over time.
  • Travel History: Tabular view of GPS log points.
  • Trip Analysis: Reports on speed, distance, and driving behavior.
  • Log File Map: Replay past trips from logs.
  • Settings: Theme, units, logging, and port preferences.

5. Conclusion

This GPS Dashboard project demonstrates how Python can create a powerful real-time location data tool with advanced analytics and offline playback. It modularly combines multiple libraries and techniques to produce a flexible, developer-friendly application.

This work is part of my broader learning experience with the SparkFun Qwiic system. The collaborative effort between Gemini (code generation and structure) and myself (testing and feedback) led to a fully functional, scalable solution.

📥 Download the project:
https://github.com/gr4ytips/Sparkfun_Qwiic.git


Legal and Licensing

Disclaimer

This software is provided “as is”, without warranty of any kind. Use at your own risk.

Limitation of Liability

The developers are not liable for damages from use, including data loss or malfunction.

Warning

This app is not intended for navigation-critical or life-critical applications. GPS data may be inaccurate due to many environmental or hardware factors.

License

Licensed under the MIT License. Refer to the LICENSE file in the project root.


Related Posts

Leave a Reply

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

Categories

Tags

Archives