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 API

    Scheduled Pinned Locked Moved Enhancements
    pytrack
    51 Posts 13 Posters 15.9k Views 20 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.
    • bmarkusB Offline
      bmarkus @johncaipa
      last edited by

      @johncaipa said in Pytrack GPS API:

      @bmarkus I am not an expert in this topic, I need to send the coordinate and accuracy as possible in my project, plus some way to detect when it is moving to send the message. If that parameter HDOP works for me, I'll keep it in mind.

      There are no accuracy available in terms of meters. HDOP is a factor in determining the relative accuracy of a horizontal position. The smaller the DOP number, the better the geometry.

      1 Reply Last reply Reply Quote 0
      • X Offline
        xbolshe
        last edited by

        @bmarkus HDOP can be recalculated to meters. So, an accuracy is a function of HDOP.

        1 Reply Last reply Reply Quote 0
        • A Offline
          Alex Dew @Neuromystix
          last edited by

          @Neuromystix Did you ever figure out a way to get faster fixes? Is it really just a hardware issue or is there some programming that can make it faster?

          1 Reply Last reply Reply Quote 0
          • G Offline
            Gijs
            last edited by

            I had a short discussion with someone here: https://github.com/pycom/pycom-libraries/pull/143 where they used an undocumented message ID to improve fix time. I did not yet get around to testing that, but perhaps it can help you out

            A 1 Reply Last reply Reply Quote 1
            • A Offline
              Alex Dew @Gijs
              last edited by

              @Gijs Thanks for your reply. I have been following what @Neuromystix and @andrethemac have been doing and it looks like there is also a check in L76GNSV4.py for the 2nd character.
              I feel like there is something missing, because one day, sitting at my desk inside, I got between 8 and 10 satellites (even 12 at one point) on the pytrack, just like I consistently do for the Adafruit gps, but then most of the time I struggle to get 3 satellites on the pytrack in the same spot and it takes forever to get data returned from the messages.

              J 1 Reply Last reply Reply Quote 0
              • G Offline
                Gijs
                last edited by

                I understand your issue, but I cannot be conclusive about what is causing this. There's both different hardware and software on the adafruit GPS (not sure which make and model you're talking about there) and the Pytrack that can have effect on the GPS reception and signal handling, next to that, they probably use a different antenna as well, making the direct comparison even more difficult.

                There's plenty of GPS systems out there, all with different price points and capabilities and its hard to do a 1 on 1 comparison between different modules.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jcaron @Alex Dew
                  last edited by

                  @Alex-Dew Don't own a Pytrack, but a few things you could explore:

                  • Try changing the networks (GPS or Glonass) to use with:

                    • $PMTK353,0,1*36: search GLONASS satellites only
                    • $PMTK353,1,0*36: search GPS satellites only
                    • $PMTK353,1,1*37: search GLONASS and GPS satellites

                    The chip reports differently depending on which network(s) are locked, there may be other changes in behaviour due do that. It's possible that depending on the lock it obtained first it will report satellites differently (i.e. only report one set of satellites or the other).

                  • Like all GNSS chips, it needs quite a bit of time when cold starting because it needs to wait for quite a bit of information from the satellites (which send it VERY slowly, and the less satellites are visible, the longer it takes) before it can find them or use them. GNSS chips can save some of the information for later "warm starts" or "hot starts", but many (and I believe it's the case of the L76) use RAM, not flash for this, which means the chip needs to be constantly powered (though it can be in a very low power mode). Some GPS boards include a small battery for this purpose, this is not the case of the Pytrack. I don't know which Adafruit GPS board you are using, but several of those have a battery.

                  A 1 Reply Last reply Reply Quote 0
                  • A Offline
                    Alex Dew @jcaron
                    last edited by

                    @jcaron Thanks for the suggestion. I'll try those out.

                    Another thing I have been looking into is having the GPS only report RMC and GGA and not report the others (i thought that may give faster updates...).

                    I added the following to the init in the L76NSV4 and when I do debug, I'm still seeing other sentences. Is this how (and where) I would also run those commands you suggested?:

                    self.rmc = bytearray('$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0*29\r\n')
                    self.i2c.writeto(GPS_I2CADDR, self.rmc)
                    
                    J A 2 Replies Last reply Reply Quote 0
                    • J Offline
                      jcaron @Alex Dew
                      last edited by

                      @Alex-Dew I believe that should work. You should also be able to use _send_message (which will add the $, *, checksum, and \r\n) or even _query_pmtk which will be able to tell you the return status of the command.

                      To get more updates more quickly you need to increase the update rate.

                      An alternative is to use a different library like https://github.com/inmcm/micropyGPS which parses all data it receives and remembers it, so when you query you get the latest info. You'll need to add a loop to feed it the data from I2C, though.

                      1 Reply Last reply Reply Quote 0
                      • A Offline
                        Alex Dew @Alex Dew
                        last edited by Alex Dew

                        I have done more testing and the call is actually working, I'm just not able to catch the confirmation reply.

                        @jcaron Thanks for the suggestion with the PMTK353. I changed these around and discovered my antenna is not reading anything but GPS. When I turn on Glonass only, I get nothing returned, so I must have a hardware issue.

                        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
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          Last post

                        Pycom on Twitter

                        Pycom