PyTrack GPS library only works with GLONASS derived positions
-
The L76GNSS.py library for the PyTrack only looks for GNGLL sentences from the GPS. However the Quectel L76 documentation states that when the signal is derived from GPS satellites only it will send GPGLL sentences. This means that when you have good GPS signals but no GLONASS signal the Pytrack will report no fix (None, None)
This may explain a lot of the 'issues' people are having with the PyTrack and getting and maintaining a GPS lock
The fix is to change this statement in L76GNSS.py to allow for GPGLL and GNGLL
gngll_idx = nmea.find(b'GNGLL')From the L76_Series_GNSS_Protocol_Specification:
When the firmware supports GPS and GLONASS systems, the NMEA sentences output as below:
- If the receiver is fixed by GPS only, it will print GPRMC, GPVTG, GPGGA, GPGSA, GPGSV and
GPGLL. - If the receiver is fixed by GPS only, and can also search QZSS satellite, it will print GPRMC,
GPVTG, GPGGA, GPGSA, QZQSA, GPGSV, QZGSV and GPGLL. - If the receiver is fixed by GLONASS only, it will print GNRMC, GPVTG, GPGGA, GNGSA,
GPGSV, GLGSV and GNGLL. - If the receiver is fixed by GPS and GLONASS, it will print GNRMC, GPVTG, GPGGA, GNGSA,
GPGSV, GLGSV and GNGLL. - In the state of no satellite positioning, it will print initial state of NMEA, such as GPRMC, GPVTG,
GPGGA, GPGSA, GPGSV and GPGLL. The time before satellite positioning after cold start,
warm start or hot start is belong to this situation.
B. When the firmware supports GPS and BeiDou systems, the NMEA sentences output as below: - If the receiver is fixed by GPS only, it will print GPRMC, GPVTG, GPGGA, GPGSA, GPGSV and GPGLL.
- If the receiver is fixed by BeiDou only, it will print BDRMC, BDVTG, BDGGA, BDGSA, BDGSV and BDGLL.
- If the receiver is fixed by GPS and BeiDou, it will print GNRMC, GNVTG, GNGGA,GPGSA, BDGSA ,GPGSV, BDGSV and GNGLL.
- In the state of no satellite positioning, it will print initial state of NMEA, such as GNRMC, GNVTG, GNGGA and GNGLL. The time before satellite positioning after cold start, warm start or hot start is belong to this situation.
- If the receiver is fixed by GPS only, it will print GPRMC, GPVTG, GPGGA, GPGSA, GPGSV and
-
@abhishek2101 you could print the NMEA and change the if statement in the lib based on what it returns?
-
@dan
i did that, but it is not working :(
-
@abhishek2101 I've already added it to the library in pycom-libraries. So just download/pull the lib from that repo and it may work.
-
@agmatthews said in PyTrack GPS library only works with GLONASS derived positions:
gngll_idx = nmea.find(b'GNGLL')
so where do i need to add this line in L76GNSS.py
-
@agmatthews Hi. A little self promotion. I wrote my own Library to decode the messages from the L76 receiver. To get a fix I search for any xxGLL messages. It can take some time to get a fix (up to 3 minutes in a bad location, but outside I get a fix in under a minute). You can find my library here: https://github.com/andrethemac/L76GLNSV4/blob/master/L76GNSV4.py
It is not perfect, I'm not an experienced python programmer.
-
Hi @livius, yes I agree, I'm happily using the https://github.com/inmcm/micropyGPS library. It was when I realised that I had to modify micropyGPS.py to add the "GNGLL" sentence and other GN sentences that I went back to the Pycom library and noticed that it was missing the "GPGLL" sentences.
What I was trying to do was show that there was a simple fix for a lot of the issues some users were having with 'bad GPS' or 'slow GPS' on the PyTrack when using the Pycom library. I was seeing 50% of my fixes being ignored by the micropyGPS and pycom L76GNSS libraries before the fixes. Searching the forum shows lots of people reporting PyTrack GPS issues.
With that said I'd also recommend the micropyGPS library for all PyTrack users
I'm not sure if it matters where you are in the world with respect to the various GPS/GLONASS/Galileo/BeiDou signals the L76 GPS can use, and therefore the issues with the Pycom Library. I'm in Australia, and see GPS and GLONASS fixes. We also see augmentation on some GPS positions from the Japanese satellite in the curious QZSS orbit.
-
@agmatthews
library attached by pycom is only a sample of use
and because of this near all people use something like
https://github.com/inmcm/micropyGPS