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

    [SiPy] PyTrack GPS Not Working? (Firmware 0.0.4) [SOLVED]

    Scheduled Pinned Locked Moved Getting Started
    sipypytrack
    8 Posts 2 Posters 2.8k Views 2 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.
    • O Offline
      OPCDF
      last edited by OPCDF

      I'm using what appears to be the latest firmware version available for the PyTrack module. Yaw, Pitch, Roll and Acceleration work perfectly fine on the device. GPS does not. When I try to get the GPS by calling "L76GNSSObj.coordinates()" it'll hang indefinitely if I do not specify a timeout. If I do specify a timeout, it'll stop trying to retrieve the GPS coordinates. Upon printing the results it returns "(None, None)". If I set Debug to True when calling that function, it says "GPS Timed Out." and then on a new line "None". I'm working on a project and I need the GPS to work. Is it not fully implemented yet? I've tried the GPS indoors and beside a window, but so far have been unable to test it outside. However I don't believe the results would be much different.

      I am running a PyTrack V1.0 and I'm using a SiPy V1.0. I've tried another PyTrack board and I've had the same trouble. I have 6 others I could test, but I don't think it's worth it to sift through all of the PyTrack boards.

      Has anyone had this issue? How can I fix it?

      Thanks in advance!

      1 Reply Last reply Reply Quote 0
      • B Offline
        bucknall
        last edited by

        Hi @OPCDF I've been working on the GPS lib to fix a memory issue, I'll check this now for you.

        Can you please share the code you're using to call the GPS?

        Thanks,

        Alex

        Developer Evangelist - Pycom

        O 1 Reply Last reply Reply Quote 0
        • O Offline
          OPCDF @bucknall
          last edited by

          @bucknall Hi. I was out all weekend and didn't get a chance to see this until now. Here is all the code I've been using to call the GPS: https://pastebin.com/vfBF631h

          As I mentioned, when I run this code it just hangs and doesn't actually do anything. When the timeout runs out (in this case 20 seconds) it just returns "(None, None)". I'd imagine this is supposed to return a tuple with latitude and longitude coordinates instead.

          Thanks.

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            bucknall @OPCDF
            last edited by

            @OPCDF I've updated the GPS library to fix an existing bug so it'll be worth updating to it (https://github.com/pycom/pycom-libraries/blob/master/pytrack/lib/L76GNSS.py). However what you are experiencing sounds like intended behavior; if the GPS does not get a location from the satellites before the timeout, it will return (None, None) so as not to block the rest of your code from executing.

            If you don't want this functionality, simply do not pass the timeout parameter into the GPS constructor.

            Thanks!

            Developer Evangelist - Pycom

            O 1 Reply Last reply Reply Quote 0
            • O Offline
              OPCDF @bucknall
              last edited by

              @bucknall Hi. I've updated the GPS library and done some firmware upgrades on my SiPy. However the GPS still returns (None, None). I will try it outside later, perhaps that is the issue. As mentioned I have tried it beside a window facing outside, and that's about as close as I could get as it was raining for a few days. Once I get a chance to try it outside I will get back to you. Thanks again.

              B 1 Reply Last reply Reply Quote 1
              • B Offline
                bucknall @OPCDF
                last edited by

                @OPCDF Let me know how you get on; the GPS (as with most GPS sensors) requires line of sight with the satellites for the best performance.

                Developer Evangelist - Pycom

                O 1 Reply Last reply Reply Quote 0
                • O Offline
                  OPCDF @bucknall
                  last edited by

                  @bucknall I had to move around a bit but eventually I got the GPS to work! I went outside and it didn't work initially, but I moved down a bit and it started returning coordinates! Thanks a bunch. Is there a way to mark this as solved?

                  B 1 Reply Last reply Reply Quote 1
                  • B Offline
                    bucknall @OPCDF
                    last edited by

                    @OPCDF Unfortunately there isn't a way to mark it as resolved (we're looking into other forums that allow you to do it).

                    The best thing you can do right now is to modify the title of this post to add '[SOLVED]' to the end of it!

                    Thanks!

                    Developer Evangelist - Pycom

                    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