We have built the gpsdemo project to read GPS data via the UART interface. We can see that the GPS module output shows raw data. To obtain the current position of our location with the GPS module, we should parse our GPS data. There are a number of libraries that we can use to parse GPS data.
For our project, we can use the minmea library (https://github.com/kosma/minmea). You can download the minmea project and extract it into components for our project. You can see how to to implement minmea as the ESP32 component in Figure 7.6:
Figure 7.6: The project structure for the gpsdemo project
Now we can modify our gpsdemo project. We do this by adding minmea.h in our main program file:
// minmea
#include "minmea.h"
We also define latitude, longitude, fix_quality, and satellites_tracked as variables to hold our current GPS data:
// GPS variables and initial...