Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. GPS Polling?

GPS Polling?

Scheduled Pinned Locked Moved Ask your questions right here!
9 Posts 4 Posters 1.3k 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.
  • Chuck BokathC Offline
    Chuck BokathC Offline
    Chuck Bokath
    Contributor
    wrote on last edited by
    #1

    Hi, Is it possible to poll the gps programmatically - i.e. open a serial port and read the NMEA sentences, or something like gpsd?

    Thanks in advance!

    1 Reply Last reply
    0
    • Eric KatzfeyE Online
      Eric KatzfeyE Online
      Eric Katzfey
      ModalAI Team
      wrote on last edited by
      #2

      You mean attach an external GPS receiver and talk to it over a UART?

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        If you don't need to manually sample the hardware, voxl-vision-px4 publishes the GPS data to the file system to /run/mpa/vvpx4_gps_raw_int in our MPA format. You can use voxl-inspect-gps to see a viewer friendly terminal output displaying current gps information, and the source serves as a good example of how you could use the information in a c/++ program on voxl.

        Chuck BokathC 1 Reply Last reply
        0
        • ? A Former User

          If you don't need to manually sample the hardware, voxl-vision-px4 publishes the GPS data to the file system to /run/mpa/vvpx4_gps_raw_int in our MPA format. You can use voxl-inspect-gps to see a viewer friendly terminal output displaying current gps information, and the source serves as a good example of how you could use the information in a c/++ program on voxl.

          Chuck BokathC Offline
          Chuck BokathC Offline
          Chuck Bokath
          Contributor
          wrote on last edited by
          #4

          @Alex-Gardner I dont need to manually sample the hardware and it does not have to be extremely precise, I am looking to essentially use the drone system communicating with the cellular component to read cellular metadata via at commands, then tagging the metadata with the x/y/z points, pushing the data to a webserver while in flight to get near time data for analysis. If there was a api call to pull off the xyz that would be great, if not, I'd like to understand if I can use a script to pull off the gps source. Mind you I am just getting into this system and the various API's. Though as I write this, I have taken a step backwards in that I can sync time so I am struggling with the VPN connection back to the webserver, much less getting wwan0 to pull an IP from the carrier. augh. I am not able to locate the voxl-inspect-gps on my system.

          1 Reply Last reply
          0
          • Eric KatzfeyE Online
            Eric KatzfeyE Online
            Eric Katzfey
            ModalAI Team
            wrote on last edited by
            #5

            @Chuck-Bokath Yes, we have done the same things before. Basically log a position and signal strength indication. What platform are you using? Typically, in a PX4 system, that information will be encapsulated in Mavlink messages. On our Voxl board we have an endpoint for all of those messages that come over a serial port that we then forward on over UDP to a ground control station. However, as @Alex-Gardner points out, that voxl-vision-px4 module will dump all of that raw information to a Linux pipe as it is passing through. And, as @Alex-Gardner also pointed out, there is some example code that shows how to listen to that pipe and parse the message.

            Chuck BokathC groupoG 3 Replies Last reply
            0
            • Eric KatzfeyE Eric Katzfey

              @Chuck-Bokath Yes, we have done the same things before. Basically log a position and signal strength indication. What platform are you using? Typically, in a PX4 system, that information will be encapsulated in Mavlink messages. On our Voxl board we have an endpoint for all of those messages that come over a serial port that we then forward on over UDP to a ground control station. However, as @Alex-Gardner points out, that voxl-vision-px4 module will dump all of that raw information to a Linux pipe as it is passing through. And, as @Alex-Gardner also pointed out, there is some example code that shows how to listen to that pipe and parse the message.

              Chuck BokathC Offline
              Chuck BokathC Offline
              Chuck Bokath
              Contributor
              wrote on last edited by
              #6

              @Eric-Katzfey I will take a look and try this.

              1 Reply Last reply
              0
              • Eric KatzfeyE Eric Katzfey

                @Chuck-Bokath Yes, we have done the same things before. Basically log a position and signal strength indication. What platform are you using? Typically, in a PX4 system, that information will be encapsulated in Mavlink messages. On our Voxl board we have an endpoint for all of those messages that come over a serial port that we then forward on over UDP to a ground control station. However, as @Alex-Gardner points out, that voxl-vision-px4 module will dump all of that raw information to a Linux pipe as it is passing through. And, as @Alex-Gardner also pointed out, there is some example code that shows how to listen to that pipe and parse the message.

                Chuck BokathC Offline
                Chuck BokathC Offline
                Chuck Bokath
                Contributor
                wrote on last edited by
                #7

                @Eric-Katzfey Ok. I am new to modalai dev environment. What I have currently is a px4 LTE enabled drone with no camera. The drone is simply to be used to test BLOS capabilities. I have not set the dev environment up, a vendor did so, but now its mine to deal with. As mentioned, its a LTE enabled drone with a VPN back to the lab. The VPN fails at times after the LTE connects, because the time is not set, therefore the certificate is not valid. I used voxl-test-time it seemed to set the time correctly. Though I need the time to set on startup is that as simple as adding a service? Once I get that going, I realized that I dont have the voxl-vision-px4 module to extract the GPS off. It seems logical to need a camera for the vision to work? I do have opkg setup and i pulled the most stable repository. Can I pull some packages off the repository that can provide me the pipe you are talking about? I am just not sure which ones. I can always write a quick script to extract the info I need from the pipe.

                1 Reply Last reply
                0
                • Eric KatzfeyE Eric Katzfey

                  @Chuck-Bokath Yes, we have done the same things before. Basically log a position and signal strength indication. What platform are you using? Typically, in a PX4 system, that information will be encapsulated in Mavlink messages. On our Voxl board we have an endpoint for all of those messages that come over a serial port that we then forward on over UDP to a ground control station. However, as @Alex-Gardner points out, that voxl-vision-px4 module will dump all of that raw information to a Linux pipe as it is passing through. And, as @Alex-Gardner also pointed out, there is some example code that shows how to listen to that pipe and parse the message.

                  groupoG Offline
                  groupoG Offline
                  groupo
                  Regular
                  wrote on last edited by
                  #8

                  @Eric-Katzfey Hey Eric, can you link to this example code?

                  Eric KatzfeyE 1 Reply Last reply
                  0
                  • groupoG groupo

                    @Eric-Katzfey Hey Eric, can you link to this example code?

                    Eric KatzfeyE Online
                    Eric KatzfeyE Online
                    Eric Katzfey
                    ModalAI Team
                    wrote on last edited by
                    #9

                    @groupo This code https://gitlab.com/voxl-public/voxl-sdk/services/voxl-vision-hub/-/blob/master/src/mavlink_io.c?ref_type=heads#L156 sets up a pipe client to listen for Mavlink messages in the voxl-vision-hub application

                    1 Reply Last reply
                    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
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    ModalAI
                    Categories Recent Tags ModalAI.com Docs
                    © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups