Results 1 to 8 of 8

Thread: Accessing GPS device from qt desktop(windows) App

  1. #1
    Join Date
    Oct 2010
    Posts
    16
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Accessing GPS device from qt desktop(windows) App

    Hi...I want develop a qt desktop application which uses the external gps device attached to my desktop(windows xp). My question is can i access the device from a desktop app( I wanted to use qtmobility apis). How qt knows what type of gps it is?or on which ports they are connected.? Will qt handle all these issues sothat i can directly use the apis irrespective of device type ,vendor and type of interface to my desktop.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Accessing GPS device from qt desktop(windows) App

    Quote Originally Posted by newtolinux View Post
    Hi...I want develop a qt desktop application which uses the external gps device attached to my desktop(windows xp). My question is can i access the device from a desktop app
    Yes, you can access a GPS device from a desktop application.

    ( I wanted to use qtmobility apis).
    This will not be possible (most likely). The Qt Mobility libraries use other libraries already on the system such as a driver for the GPS device on the system.

    How qt knows what type of gps it is?
    Qt doesn't know, you need to find that out yourself. See answer below.

    or on which ports they are connected.?
    Qt doesn't know, you need to find that out yourself. See answer below.

    Will qt handle all these issues sothat i can directly use the apis irrespective of device type ,vendor and type of interface to my desktop.
    Qt will not handle GPS devices, except maybe on mobile devices where there are specific api's for that.

    On the desktop you need to install a library (including an api) or device drivers (including an api) that you can use to talk to GPS or other devices.

  3. #3
    Join Date
    Oct 2010
    Posts
    16
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Question Re: Accessing GPS device from qt desktop(windows) App

    Thank you.

    But if i write device specific code , then my application works only for particular gps device.But i want to make my app to support for multiple vendors. Any suggestions?

  4. #4
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Accessing GPS device from qt desktop(windows) App

    If you want them all, you either need to find a common standard or implement them all.

    It would be nice if Qt would provide cross platform and cross vendor api's to everything and the kitchen sink. However, this is not doable.
    The problem is that A uses their own protocols and api's, B uses their own. Hope for some standardisation.

    Maybe there's a generic usb driver for such devices. Try searching for that.

    In the end, this is a question that doesn't have a lot to do with Qt itself but more with the devices you want to use.

  5. #5
    Join Date
    Oct 2010
    Posts
    16
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: Accessing GPS device from qt desktop(windows) App

    Thank you very much for response

  6. #6
    Join Date
    Nov 2007
    Posts
    26
    Thanks
    2
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessing GPS device from qt desktop(windows) App

    delete this, didnt read the question properly...
    Last edited by robertson1; 2nd November 2010 at 14:53. Reason: didnt read the question properly

  7. #7
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Accessing GPS device from qt desktop(windows) App

    The easiest way is to find a GPS which supports the NMEA 0183 standard. A large number of them do, so if your application supports that you can just use something like QextSerialPort or similar to talk to them.

  8. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Accessing GPS device from qt desktop(windows) App

    If you can get the device to talk to gpsd or something similar, it should be fairly easy to implement a QGeoPositionInfoSource subclass for it so that you can use the regular location API from QtMobility.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How to debug code on Windows Ce 5.0 device?
    By hakanaktan in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 12th August 2010, 13:08
  2. QTCreator phonon accessing audio acquisition device
    By rahul2047 in forum Qt Programming
    Replies: 4
    Last Post: 19th February 2009, 06:23
  3. Associate Program Icon for Windows Desktop
    By brent99 in forum Newbie
    Replies: 2
    Last Post: 11th March 2008, 04:22
  4. Draging a non-existing file to the Windows Desktop
    By klaus1111 in forum Qt Programming
    Replies: 13
    Last Post: 20th September 2007, 11:47
  5. Accessing Windows Registry
    By musaulker in forum Newbie
    Replies: 1
    Last Post: 29th March 2007, 00:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.