Navigation

    M5Stack Community

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. falbriard
    3. Best
    F
    • Continue chat with falbriard
    • Start new chat with falbriard
    • Flag Profile
    • Profile
    • Following
    • Followers
    • Blocks
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by falbriard

    • RE: Invalid values on GPS unit

      M5Stack Core2 and GPS Module (my solution with UIFlow)

      I'm using a stackable GPS unit with external antenna. Under UIFLow I've configured it to TX=14 and RX=13 and its working.

      In order to get decimal return values for location data, which I need to transport into a MQTT publisher protocol, I wrote a conversion function in a “blockly” execute statement interpreted as MicroPython. Yes, yet missing some support for Altitude. Ideas for improvement of the logic are welcome.

      Hope this is helpful (see the code below):

      # GPS location conversion 
      # convert into decimal
      def conversion(inp):
          minus = False
          parts = inp.split('.')
          ddmm = parts[0]
          ss = parts[1]
          last_char = ss[-1]
          if (last_char == 'W') or (last_char == 'S'):
              minus = True
              # remove last character 
              ss = ss[:-1]
          last_two_char = ddmm[-2:]
          mm = last_two_char
          if len(ddmm) == 3:
              dd = ddmm[:1]
          if len(ddmm) == 4:
              dd = ddmm[:2]        
          if len(ddmm) == 5:
              dd = ddmm[:3]
          if minus:  
              dd = int(dd) * -1  
          minf = float(mm + '.' + ss)
          secsmm = minf / 60
          # case South, or West invert 
          if minus: 
              deci = float(dd - secsmm)
          else:
              deci = float(dd + secsmm)
          
          return deci
      posted in Units
      F
      falbriard
    • UIFlow GPS support / Missing Altitude and Function for Decimal Format

      I ‘m using the M5Stack GPS module with external antenna and Core2 module with an additional battery extension and base unit. The basic GPS function delivered by UIFlow are working OK, but there is a missing readout of the Altitude value. It also would be useful if UI could format the values from NMEA data and convert it into an all decimal notation. Is there any sample how to do this using a MicroPython extension code?

      posted in Features Wish List
      F
      falbriard