locked
Get GPS data from Win Mobile 6 SDK RRS feed

  • Question

  • Hi,
    I'm trying to get just Lat, Long and Date/time info from GPS using the Win Mobile 6 SDK sample. I only need to get this info via Invoke, using GpsPosition and Gps objects without going through event handlers (ie I want to run a method to give me access to the GpsPosition properties).
    I don't want to use LocationChanged EventHandler.
    Many Thanks!
    Tuesday, May 5, 2009 4:03 PM

Answers

  • Hi,

    You can remove the use of the events and then just call the GetPosition method periodically. You will have to Open the GPS object if it is not open, then wait for a fix and then call the GetPosition method.

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    • Marked as answer by Opariti Tuesday, May 5, 2009 4:35 PM
    Tuesday, May 5, 2009 4:08 PM

All replies

  • Hi,

    You can remove the use of the events and then just call the GetPosition method periodically. You will have to Open the GPS object if it is not open, then wait for a fix and then call the GetPosition method.

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    • Marked as answer by Opariti Tuesday, May 5, 2009 4:35 PM
    Tuesday, May 5, 2009 4:08 PM
  • What do i need to test to see if i have a gps fix? latitude = 0.0 longitude = 0.0? or is there a better way?

    Thanks,
    Ben
    Tuesday, May 5, 2009 7:36 PM
  • one of the method is
    while(GPSPositionobj!=null)
    {
    GPSPositionobj=GPSObj.GetPosition();
    }

    This is a kind of dirty solution. Better method is to run a thread which queries for GPS position in background.
    Wednesday, May 6, 2009 6:14 AM
  • Hi,

    I use the check for 0 against the latitude and longitude to determine whether I have a fix, that seems to work for me.

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    Wednesday, May 6, 2009 7:46 AM
  • Hi, everybody.

     I had used GetGpsPosition method and it really did work. But i find that the position information received from the method was very slow than i get directly from com port.

    Generelly, it will take long time to get a position when gps signal is badly. I donnt know why?

    Wednesday, May 6, 2009 9:08 AM
  • Hi,

    The time to fix is related to the start the GPS receiver rather than the method of getting the data.

    The following link explains the differences between the 3 different starts a GPS receiver can perform :-

    http://www.pocketgpsworld.com/ttffcomparisons.php

    Hope this helps.

    Paul Diston
    http://www.smartmobiledevice.co.uk/
    Wednesday, May 6, 2009 9:12 AM
  • To Paul :

    Thanks for your reply.

    Wednesday, May 6, 2009 9:47 AM