×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    How to get speed with location API

    Hi all,

    I have a problem with "QGeoPositionInfoSource".
    All work fine for the positioning but when I try to get the ground speed with QGeoPositionInfo, I always get "1".

    Maybe someone find the solution.

    Thanks for answer.

  2. #2
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,557

    Re: How to get speed with location API

    Just in case... On which device model? And is the device actually moving when you try?

  3. #3
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: How to get speed with location API

    hi petrib,

    I use a 5800 xm, and I try my app when I drive my car. At 70 Km/h, no change always "1".

  4. #4
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to get speed with location API

    I've tried this code:
    Code:
    void LocationWatcher::positionUpdated(const QGeoPositionInfo &info)
    {
        if (info.isValid()) {
            qDebug() << info << info.hasAttribute(QGeoPositionInfo::GroundSpeed)
                     << info.attribute(QGeoPositionInfo::GroundSpeed);
        }
    }
    This is an output:
    QGeoPositionInfo(QDateTime("pe heinä 23 10:25:52 2010") , QGeoCoordinate(60.1643, 24.9171), HorizontalAccuracy=8677.21, VerticalAccuracy=32767.5) false -1

  5. #5
    Regular Contributor
    Join Date
    Dec 2009
    Posts
    71

    Re: How to get speed with location API

    If I understand, we can't get the ground speed with QGeoPositionInfo ?

    Is there another solution? I think to deal with 2 positions and make calculation to find the speed.

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: How to get speed with location API

    If you wait, while sattelites will be found, you will have valid speeds as well.

Similar Threads

  1. Location Based Services - Location API - JSR179
    By aminuddin09 in forum Mobile Java General
    Replies: 9
    Last Post: 2011-02-23, 19:39
  2. location, speed and course
    By Yagiza in forum Mobile Java Tools & SDKs
    Replies: 11
    Last Post: 2009-02-24, 21:52
  3. set api in location acquisition api
    By sravikantk2 in forum Symbian
    Replies: 0
    Last Post: 2007-05-22, 17:09
  4. J2ME Location API vs. Nokia Series 40 Position API
    By keyang_huang in forum Mobile Java General
    Replies: 1
    Last Post: 2005-04-27, 08:39
  5. The Location API
    By ffunus in forum Mobile Java General
    Replies: 0
    Last Post: 2004-02-24, 06:02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×