Closed sgofferj closed 1 year ago
Have you tried GNGSA
Have you tried GNGSA
The Rx doesn't provide that.
Found the issue. I have a vTaskDelay(1);
inside the while loop in feedGPS(). Apparently, that caused some bytes to drop and thus checksum errors. Removed that and it works now...
@sgofferj i would not expect the vTaskDelay(1) causing that issue. The ESP32 is by far fast enough to feed the tinygps parser. I'm using much longer delays in the feed loop, and this works stable with 115200 bps on the serial interface. To ensure this you can validate the NMEA sentence cheksums.
For me this looks like a task priority / RTOS task starvation issue. Try to INCREASE the second vTaskDelay, and LOWER the task priorities by INCREASING the prio number. Watch the task states.
It sure is not an issue of TinyGps. It's inside your code / flow.
I'm using much longer delays in the feed loop
Actually, you don't :smiley: . In your inner while loop - the one which feeds the bytes from the serial to TGPS+ - there's no delay like I had. I changed my feedGPS function now to that and it works without flaws.
void feedGPS (void * parameter) {
for (;;) {
while (gpsPort.available() > 0)
gps.encode(gpsPort.read());
vTaskDelay(10);
}
}
To ensure this you can validate the NMEA sentence cheksums.
Yeah, that was actually how I got to look at feeGPS. I Serial.println()'d the number of bad checksum packets.
I'm trying to extract the fix mode from the GPGSA sentence but it seems to always stay empty. The general parsing, however, seems to work. Here is my relevant code:
The GPGSA sentence from the GPS rx does come and it does seem correct to me. The rx is a genuine uBlox Neo-6M.
I tried to get different elements and c&p the example but I can't get it to work. All custom fields remain empty:
My setup: