Using GPS data
The most common type of GPS data these days is the Garmin GPX format. We covered this XML format in Chapter 4, Geospatial Python Toolbox, which has become an unofficial industry standard. Because it is an XML format, all of the well documented rules of XML apply. However, there is another type of GPS data that pre-dates XML and GPX called National Marine Electronics Association (NMEA). These data are ASCII text sentences designed to be streamed. You occasionally bump into this format from time to time because even though it is older and esoteric, it is still very much alive and well especially to communicate ship locations via the Automated Identification System (AIS), which tracks ships globally. But as usual, you have a good option in pure Python. The pynmea
module is available on PyPI.
Take a look at the following small sample of NMEA sentences:
$GPRMC,012417.859,V,1856.599,N,15145.602,W,12.0,7.27,020713,,E*4F $GPGGA,012418.859,1856.599,N,15145.602,W,0,00,,,M,,M,,*54 $GPGLL...