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

    L76 GPS High altitude balloon mode

    Scheduled Pinned Locked Moved Discussion
    l76lgnsspytrackballoon
    3 Posts 3 Posters 551 Views 4 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.
    • T Offline
      tttadam
      last edited by

      I am browsing a the documentaion for L76 GPS. This is what's on the pytrack board if I am correct.
      The sensor working fine and micropyGPS saves a ton of work.
      What I recently found out that L-76 has some kind of ballonmode, which needs to be turn on, if the device travels above a certain altitude. How can I enable this?

      What I found out so far that i should edit this message some how: PMTK_FR_MODE
      I am not sure how to do that because I don't have the knowledge (yet) about this low level stuff.
      Thank you,

      1 Reply Last reply Reply Quote 0
      • C Offline
        crumble
        last edited by

        Have a look into the example. The Pycom sends some kind of init to the GPS with i2c.writeto. They use the bytearray reg.

        You have to build your own sequence and send it to the L76. Somewhere in the L76 manual they tell you how to build the checksum, which is important. It is a simple XOR of each byte between $ and *.

        For some command you may have to read the result and send an ACK message to the L76

        Here is my method to build the sentence. Please note that the checksum extraction is not optimized ;)

        # build a MTK sentence to configure the GPS chip. payload is content between $ and *
            def _buildMtkSentence(self, payload):
                _c = 0 # checksum
                _s = self._reg # buffer of sentence
                _p = 0 # index of actual sentence char
                _s[_p] = ord(b'$')
                _p += 1
                _i = 0 # index of payload
                _l = len(payload)
                while _i<_l:
                    _c ^= ord(payload[_i])
                    _s[_p] = ord(payload[_i])
                    _p += 1
                    _i += 1
                _s[_p] = ord(b'*');  _p += 1
                _s[_p] = ord("{0:02X}".format(_c)[0]); _p += 1
                _s[_p] = ord("{0:02X}".format(_c)[1]); _p += 1
                _s[_p] = ord(b'\r'); _p += 1
                _s[_p] = ord(b'\n')
        

        Example call

        self._reg = bytearray(64)
        self._buildMtkSentence("PMTK001,353,3,1,1,0,3"); # use GPS and GLONASS
        self.i2c.writeto(GPS_I2CADDR, self._reg)
        

        Have fun and tell me how to wake up the GPS, after you send the MTK messages for sleep modes ;)

        1 Reply Last reply Reply Quote 2
        • K Offline
          kuqizz
          last edited by

          Thank you for the information provided, this is very helpful to me.

          1 Reply Last reply Reply Quote 1

          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