Skip to content
Guillaume W. Bres edited this page Jun 21, 2018 · 8 revisions

Welcome to the Wiki!

The idea behind this project is to have a portable GPS logger with low power consumption.

Check the PCB page to learn more about the custom board


Graphical User Interface

gps-logger/python/gui.py is a Graphical User Interface to control the module over USB or manipulate GPS data.

To run the GUI you need a Python 3 interpreter with the following packages:

  • PyQt5
  • Pyqtgraph
  • Pyserial

To fully take advantage of it, you need to clone the following git repository within the python subfolder:

cd gps-logger/python
git clone https://github.com/eyllanesc/qMap

otherwise you will not be able to visualize the GPS track on the map.

Use 'File->Import' to import one or several GPS tracks. The map allows you to visualize the waypoints and other informations are also provided like instantaneous speed or elevation gain throughout the track.

A GPS track can be built from four types of files:

  • an NMEA (.nmea) log file
  • a KML (.kml) log file
  • a GPX (.gpx) log file
  • a LOCUS (.locus) log file (from PMTK/GPS receiver)

Use the console to call and use the API.


API

The API is made of three objects:

  • Waypoint.py is a GPS waypoint with optional timestamp
  • GPSTrack.py is a list of waypoints
  • PMTK.py to optionnaly control the module over USB/serial

GPS Waypoints can be manipulated individually:

wp1 = Waypoint(latDeg=6.3,lonDeg=70.0)
wp2 = Waypoint(latDeg=6.1,longDeg=71.3)
fd = open("log.nmea","r")
wp3 = Waypoint(nmea=fd.readline())

print(wp1)
print(wp1.toDMS()) # D°M'S" format for both lat/lon
print(wp1.distance(wp2))

A GPS Track is made of several waypoints, it can be built from an NMEA, a KML, a GPX log or from individual waypoints:

track = GPSTrack("log.kml")
track = GPSTrack("log.nmea")
track = GPSTrack([wp1,wp2,wp3])
print(track)
print(len(track))
print(track.totalDistance())
print(track.evelationProfile())
print(track[1].distance(track[0]))
track.append(wp1)
track.append([wp1,wp2])

A GPS track can be dumped into a KML (Google Earth) or a GPX log (Open Street Map):

track.toKML('track1.kml')
track.toGPX('track1.gpx')

The PMTK object controls the GPS receiver through USB/serial:

GPS = PMTK("/dev/ttyUSB0")
print(GPS.status()) # status+flash usage
GPS.startLogger() # kick start from host
GPS.setNMEAMode("RMC-GGA") # $RMC & $GGA only
GPS.setNMEARate('100mHz')
Clone this wiki locally