Open bamapookie opened 5 years ago
Have you found a workaround for this?
The workaround is to compare the seconds in the GNZDA message to the elapsed time since the PPS signal to calculate the message delay, then add the delay to the GNZDA value to get the correct time. It would be much better to handle this in the library, though.
I am testing with the SyncTime example, and I have noticed that the second does not increment until the first NMEA message of the second rolls in at 140 ms into the second in the example below.
I am testing using a ZDA message and an interrupt to catch a PPS signal. I am receiving the ZDA message 10 times a second (10Hz) and I have all other messages turned off. I have the PPS signal coming in on pin 4 and have an interrupt to catch it and set UTCsecondStart(micros()). Here is example output from the slightly modified SyncTime script:
I put the modified files in a gist here: https://gist.github.com/bamapookie/6cb23fd289c21d5ebafa86fc5efe6b12 I added a debug output for the NMEA message to NMEAGPS.cpp also.
Also, I noticed that the ZDA message was not included in the #if defined directive, so I added that as well.