PyTrack slow parsing NMEA
L76.get_location() L76.getUTCDateTime() L76.get_speed()
in my 'while True:' loop, and it takes between 5 and 20 seconds to run each loop. Looking at the library, I can't figure out why it takes that long for those three things to parse.
Also, I'm not sure if this delay is causing a bad connection, because I struggle to get more than 3 or 4 satellites when the unit is by the window (with the Adafruit gps next to it getting 10 satellites in the same spot).
@Alex-Dew note that the L76-L only supports GPS and Glonass, not Galileo.
@jcaron Thanks for pointing out that each of those calls waits for a new sentence. I switched to just calling the RMC and GGA sentences and parsing all at once.
My problem with connection I have narrowed down to what must be an issue with the antenna. Even when Glonass and Galileo satellites are closer than GPS satellites that I'm locked on, they won't lock, so I only ever have between 4 and 6 satellites, all from the GPS constellation. I have set the PMTK353 to show all, but still only get GPS.
@jcaron Ok, thanks. I tried running them in threads but they weren't updating (even if I gave my main loop a 0.25 second sleep). Is there any way to update them without interfering with my sensors and other calculations?
If I can get the unit to report just rmc and gga:
PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0and just try to parse the info at the same time, it would only be waiting on two updates I guess, but that would still be too much time to see if there was a ~300ms action happening from a sensor/input.
Yeah, I can turn on the debug. What should I be looking for?
@Alex-Dew That library does not cache any data, so anytime you call any of the functions, it has to wait for the next update sent by the chip. I believe the default rate is 1 Hz, so it should take about 3 seconds to go through the loop (depends on the relative order of the messages required by those calls and the messages send by the chip). It can take longer if there's no "fix" yet.
Can you set
truewhen you instantiate