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. Speed up GPS Location
Qt 6.11 is out! See what's new in the release blog

Speed up GPS Location

Scheduled Pinned Locked Moved Solved Mobile and Embedded
4 Posts 4 Posters 1.3k Views 1 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.
  • H Offline
    H Offline
    hvikstrom
    wrote on last edited by
    #1

    Hi,

    I'm developing a mobile application which requires GPS coordinates. I've tried to use this class : http://doc.qt.io/qt-5/qml-qtpositioning-positionsource.html but it takes ages to update (more precisely 2 minutes).

    I find it very long and I wondered if there was a way to fasten the process.

    Thanks

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

      Hi! You can set the updateInterval property to customize the frequency.

      1 Reply Last reply
      1
      • FerniF Offline
        FerniF Offline
        Ferni
        wrote on last edited by
        #3

        I used once QtPositioning QtPositioning but its update interval is minimum 1 second and that wasn't suitable for my application.
        Then I found this repo and I made a simpler version of this library to connect with GPSD.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          hvikstrom
          wrote on last edited by hvikstrom
          #4

          Thank you guys for answering !

          I found another solution : Since I don't want to have constant updates on my location, I set the PositionSource active property on false. From the documentation I thought that update() would set that property on true for the update and set it back to false afterwards. Maybe that's what it does but I have to wait 2 minutes before receiving the signal onPositionChanged.

          So what I did : I manually enabled the active property before updating and then I set it back to false after the signal. I don't know why but by doing that, I get new coordinates in 20 seconds which is fine.

          However my phone tells me that the application is still searching for GPS signal while it shouldn't. If I find out why, I'll edit my comment.

          EDIT : So in order to stop the application from searching for GPS signal after the update, I had to call stop() out of the onPositionChanged signal handler.

          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