Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    PyTrack GPS library only works with GLONASS derived positions

    Scheduled Pinned Locked Moved Expansion Board
    gps pytrack
    8 Posts 5 Posters 2.1k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      agmatthews
      last edited by

      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:

      1. If the receiver is fixed by GPS only, it will print GPRMC, GPVTG, GPGGA, GPGSA, GPGSV and
        GPGLL.
      2. 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.
      3. If the receiver is fixed by GLONASS only, it will print GNRMC, GPVTG, GPGGA, GNGSA,
        GPGSV, GLGSV and GNGLL.
      4. If the receiver is fixed by GPS and GLONASS, it will print GNRMC, GPVTG, GPGGA, GNGSA,
        GPGSV, GLGSV and GNGLL.
      5. 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:
      6. If the receiver is fixed by GPS only, it will print GPRMC, GPVTG, GPGGA, GPGSA, GPGSV and GPGLL.
      7. If the receiver is fixed by BeiDou only, it will print BDRMC, BDVTG, BDGGA, BDGSA, BDGSV and BDGLL.
      8. If the receiver is fixed by GPS and BeiDou, it will print GNRMC, GNVTG, GNGGA,GPGSA, BDGSA ,GPGSV, BDGSV and GNGLL.
      9. 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.
      L A A 3 Replies Last reply Reply Quote 2
      • L Offline
        livius @agmatthews
        last edited by

        @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

        think about people first, then computers

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          agmatthews @livius
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • A Offline
            andrethemac @agmatthews
            last edited by

            @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.

            1 Reply Last reply Reply Quote 2
            • A Offline
              abhishek2101 @agmatthews
              last edited by

              @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

              danD 1 Reply Last reply Reply Quote 0
              • danD Offline
                dan @abhishek2101
                last edited by

                @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.

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  abhishek2101 @dan
                  last edited by

                  @dan
                  i did that, but it is not working :(

                  danD 1 Reply Last reply Reply Quote 0
                  • danD Offline
                    dan @abhishek2101
                    last edited by dan

                    @abhishek2101 you could print the NMEA and change the if statement in the lib based on what it returns?

                    1 Reply Last reply Reply Quote 0

                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                    With your input, this post could be even better 💗

                    Register Login
                    • 1 / 1
                    • First post
                      Last post

                    Pycom on Twitter

                    Pycom