Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Raspberry Pi app - MAPBOX and GPSD Help!

Raspberry Pi app - MAPBOX and GPSD Help!

Scheduled Pinned Locked Moved Solved Mobile and Embedded
9 Posts 3 Posters 3.2k Views 2 Watching
  • 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.
  • L.J.5L Offline
    L.J.5L Offline
    L.J.5
    wrote on last edited by L.J.5
    #1

    Hi all,

    I have limited experience in developing apps, and just wondering if you anybody could help me out a little. I have a Raspberry Pi with a connected GPS Hat that is working. I have installed GPSD and can see all that data in the LX terminal ( lat, long, alt, time etc.....). How can I use the QT location module to interface either with GPSD or the GPS itself to use that to display a location on a map?

    I have designed some maps on MAPBOX, where and what format to I place my mapbox access token details into the QT app?

    Any help or pointers would be great!!!

    Thank you!

    the_T 1 Reply Last reply
    0
    • L.J.5L L.J.5

      Hi all,

      I have limited experience in developing apps, and just wondering if you anybody could help me out a little. I have a Raspberry Pi with a connected GPS Hat that is working. I have installed GPSD and can see all that data in the LX terminal ( lat, long, alt, time etc.....). How can I use the QT location module to interface either with GPSD or the GPS itself to use that to display a location on a map?

      I have designed some maps on MAPBOX, where and what format to I place my mapbox access token details into the QT app?

      Any help or pointers would be great!!!

      Thank you!

      the_T Offline
      the_T Offline
      the_
      wrote on last edited by
      #2

      @L.J.5

      I am not sure about the GPSD Package for RasPi. For "normal" Linux systems it contains a gps.h file (can be found in /usr/include).
      This provides all methods to connect to the GPS Device and read from it.

      -- No support in PM --

      1 Reply Last reply
      0
      • Pablo J. RoginaP Offline
        Pablo J. RoginaP Offline
        Pablo J. Rogina
        wrote on last edited by
        #3

        @L-J-5 would you mind elaborating:
        A. what command you're using in the terminal, as you mentioned you can read data?
        B. Is that terminal local to the RPi or a remote ssh session?
        C. are you able to read data from a serial port as well (i.e. stty -F /dev/ttyXXX ispeed 4800 && cat </dev/ttyXXX)

        For contacting the GPS directly on a serial port, I guess you can use QNmeaPositionInfoSource and QSerialPort.

        And regarding using gpsd you need to contact the daemon by means of a network connection (see gpsd installation page stating "Once gpsd is running, telnet to port 2947" so you may want to use QNetworkAccessManager to directly request data from the daemon, or ideally, you may want to extend Qt Positioning in order to incorporate that network access capability to gpsd and also inheriting all the existing functionaly hidden the specific implementation.

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

        L.J.5L 1 Reply Last reply
        0
        • Pablo J. RoginaP Pablo J. Rogina

          @L-J-5 would you mind elaborating:
          A. what command you're using in the terminal, as you mentioned you can read data?
          B. Is that terminal local to the RPi or a remote ssh session?
          C. are you able to read data from a serial port as well (i.e. stty -F /dev/ttyXXX ispeed 4800 && cat </dev/ttyXXX)

          For contacting the GPS directly on a serial port, I guess you can use QNmeaPositionInfoSource and QSerialPort.

          And regarding using gpsd you need to contact the daemon by means of a network connection (see gpsd installation page stating "Once gpsd is running, telnet to port 2947" so you may want to use QNetworkAccessManager to directly request data from the daemon, or ideally, you may want to extend Qt Positioning in order to incorporate that network access capability to gpsd and also inheriting all the existing functionaly hidden the specific implementation.

          L.J.5L Offline
          L.J.5L Offline
          L.J.5
          wrote on last edited by L.J.5
          #4

          @Pablo-J.-Rogina

          1. The data can be viewed using gpsmon - which does show tcp://localhost:2947
          2. The terminal is local to the RPi.
          3. When running stty -F /dev/ttyXXX ispeed 4800 && cat </dev/ttyXXX, I get some form of data through - it seems to be all random symbols and letters.

          However if I run command cat dev/ttyAMA0 I do get the raw data through as in raw NMEA data.

          How can I get the Pi interfaced with Qt thats running on a Windows OS laptop as the position source??

          Thanks

          1 Reply Last reply
          0
          • Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by
            #5

            @L-J-5
            from answer #1 I guess you already answered yourself: one option you have is to get your Qt app running on Windows as a network client (i.e. using QNetworkAccessManager for instance) working basically the same way gpsmon does...

            Upvote the answer(s) that helped you solve the issue
            Use "Topic Tools" button to mark your post as Solved
            Add screenshots via postimage.org
            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

            L.J.5L 1 Reply Last reply
            0
            • Pablo J. RoginaP Pablo J. Rogina

              @L-J-5
              from answer #1 I guess you already answered yourself: one option you have is to get your Qt app running on Windows as a network client (i.e. using QNetworkAccessManager for instance) working basically the same way gpsmon does...

              L.J.5L Offline
              L.J.5L Offline
              L.J.5
              wrote on last edited by
              #6

              @Pablo-J.-Rogina

              I am rather new at all this, do you have any pointers on the best way of going about this?

              1 Reply Last reply
              0
              • Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @L-J-5 I'm afraid it looks like you want to ride a GP bike without even riding a bicycle before. Anyway, you may want to take a look a tons of examples, i.e. Qt and TCP and Network Programming with Qt for Qt and networking, and I even suggest to read gpsmon source code itself to try understanding how that application communicates with gpsd daemon.

                Good luck!

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                L.J.5L 1 Reply Last reply
                0
                • Pablo J. RoginaP Pablo J. Rogina

                  @L-J-5 I'm afraid it looks like you want to ride a GP bike without even riding a bicycle before. Anyway, you may want to take a look a tons of examples, i.e. Qt and TCP and Network Programming with Qt for Qt and networking, and I even suggest to read gpsmon source code itself to try understanding how that application communicates with gpsd daemon.

                  Good luck!

                  L.J.5L Offline
                  L.J.5L Offline
                  L.J.5
                  wrote on last edited by
                  #8

                  @Pablo-J.-Rogina Thank you for tips! You only live once - sometimes its best to jump in at the deep end!

                  1 Reply Last reply
                  0
                  • Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by
                    #9

                    @L-J-5 if you consider this post finished, please don't forget to mark it as "solved"

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved