×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    123

    speed from GPS show wrong value

    Hi.
    I'm writing application that gets latitude, longtidute and speed from GPS. Everything withount speed works great. If I drive a car, speed my GPS speed counter shows incorrect value (error is about 20 km per hour, 20km/h less than it should be). When I'm walking, my application speed counter shows 3-7 km/h, and when I'm standing speed is 0-3 km/h.
    I checked results against Nokia default application. Difference between my speed and speed showed by nokia is about 5 km/sek( so I can accept that difference).
    Here is my code for symbian(nokia n95):

    Every 1 sec i get GPS data:

    Code:
    iPosInfoBase = &iSatelliteInfo;
    iPositioner.NotifyPositionUpdate( *iPosInfoBase, iStatus );
    SetActive();
    and this is RunL()

    Code:
    void CGPSConnect::RunL()
         {
         if(!IsActive())
         {
         ...
         iSatelliteInfo.GetPosition(iPosition);
         ...
         }
         }
    I used to calculate speed
    TPosition.speed(TPosition, speed);
    but with the same result .

    Any idea what can I to do now?


    Samos

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: speed from GPS show wrong value

    are you handling the speed as KM's or as m/s ?

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    123

    Re: speed from GPS show wrong value

    I`ve convert meters pers second on kilometerns per hour.

    Code:
    TCourse course;
    iSatelliteInfo.GetCourse(course);
    TReal32 speed = course.Speed();
    speed = speed * (36/10);

  4. #4
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: speed from GPS show wrong value

    would it change anything if you would use:

    speed = (speed * 36)/10;

  5. #5
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    123

    Re: speed from GPS show wrong value

    It changed nothing, because multiplication doesn't really rely on order of data (only there's problem if there's addition or substraction). the brackets are not changing a thing from mathematical point of view.

    the problem must be somewhere else.

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: speed from GPS show wrong value

    I would at least try that out, since it depends on how the values are handled, and I'm not 100% sure that they would be handled as real, when the values used are not.

  7. #7
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    123

    Re: speed from GPS show wrong value

    speed is TReal32. To display speed I convert it on TBuf:

    Code:
    _LIT(KFormatSpeed," %2.1f km/h");
    ...
    TBuf<255> buffer;
    buffer.Format(KFormatSpeed,aSpeed);
    convert that:

    Code:
    TReal32 a;
    TBuf<255> buf;
    a = aSpeed;
    TRealFormat format;
    buf.Num( a, format );
    with the same result.

  8. #8
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: speed from GPS show wrong value

    Hi,
    I have a similar app but I calculate the speed manually and looks the speed are almost correct.
    For test purpose you could try manually to see the result.

  9. #9
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Smile Re: speed from GPS show wrong value

    Quote Originally Posted by mahbub_s60 View Post
    Hi,
    I have a similar app but I calculate the speed manually and looks the speed are almost correct.
    For test purpose you could try manually to see the result.
    i'm not used GPS before but i freshman
    u can give us some start example about GPS but i hope work fine, also
    can i determine one mobile from another by using GPS by establish a program on a mobile and another in the second and the 1st search to 2nd by IMEI or another thing
    Ahmed Mahfouz
    Researcher
    Handset

  10. #10
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: speed from GPS show wrong value

    Instead of asking for snippets over and over why don't you check the Wiki which is full of such examples, tutorials and reference.

  11. #11
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: speed from GPS show wrong value

    Quote Originally Posted by MobiSecLap View Post
    i'm not used GPS before but i freshman
    u can give us some start example about GPS but i hope work fine, also
    can i determine one mobile from another by using GPS by establish a program on a mobile and another in the second and the 1st search to 2nd by IMEI or another thing
    Could you check wiki and example sections of Forum Nokia web pages. There are some examples there.

    What are you talking about IMEI? From Satellite we can get only location information. We don't have connection from one device to another device directly. But we can built such a services via some server (like location related services work)

  12. #12
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Question Re: speed from GPS show wrong value

    Quote Originally Posted by mahbub_s60 View Post
    Could you check wiki and example sections of Forum Nokia web pages. There are some examples there.

    What are you talking about IMEI? From Satellite we can get only location information. We don't have connection from one device to another device directly. But we can built such a services via some server (like location related services work)
    can we know device location by another device?
    Ahmed Mahfouz
    Researcher
    Handset

  13. #13
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,142

    Re: speed from GPS show wrong value

    Quote Originally Posted by MobiSecLap View Post
    can we know device location by another device?
    Not unless you desing and implement a communication method where the another device locates itself, and then tells you its location. Basically mobile operators can at least in theory locate any device rather accurately, since they own the network and can utilize it as they wish (of course same time following all laws), but those services are usually not given to outsiders.

  14. #14
    Super Contributor
    Join Date
    Mar 2008
    Posts
    1,481

    Re: speed from GPS show wrong value

    Operator can estimate the location roughly based on the tower location. No direct way to locate from another device
    This option is visible in settings as network based.

Similar Threads

  1. Date / time from Internal GPS on E90 wrong?
    By MainMeat in forum Python
    Replies: 5
    Last Post: 2009-01-19, 10:02
  2. Problems of BT GPS connection
    By eling0167 in forum Bluetooth Technology
    Replies: 0
    Last Post: 2008-08-19, 13:46
  3. N93i + TomTom GPS receiver problem
    By wrxch in forum Bluetooth Technology
    Replies: 2
    Last Post: 2008-05-25, 21:48
  4. Replies: 0
    Last Post: 2008-05-12, 09:57
  5. Problems with LAM-1 GPS Accessory
    By pcollins01 in forum General Development Questions
    Replies: 0
    Last Post: 2003-04-09, 14:28

Posting Permissions

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