GPSGetPosition as glorified memcpy()


I've spoken with a number of OEMs & ISVs regarding GPSID and many people assume that a call to GPSGetPosition() will cause the GPS device to be queried for the latest + greatest position.  That's actually not the way that it works (today).  GPSID is designed to work with GPS devices that generate NMEA only.  NMEA GPS devices will always be giving GPSID updates as to position in the background, they do not have any mechanism for an app or driver to call "GiveMePositionNow()".


For the record GPSGetPosition() is a glorified memcpy() of the position fields that GPSID has cached from the most recent position that the GPS driver.  Anyone who's stared at NMEA would probably assume the API worked this way, but the point of GPSID was so that people don't need to stare at NMEA :).  I have asked the documentation team to update the GPSGetPosition() docs to clear up any ambiguity on how it works.  Sorry for the pain this may have caused.


In the future, I'm looking at having GPSID work better with non-NMEA devices that would be smart enough to do an on-demand position determination so that's why I have (today) in comments above about how GPSGetPosition() works.


[Author: John Spaith]

Comments (3)

  1. Nino.Mobile says:

    Software / Hardware SOTI Pocket Controller Professional v5.07 is out Pocket PC Thoughts is reporting

  2. Hagai Ohel says:

    Do you know how it works if the GSPID has not cached any NMEA information yet  (i.e., the first time that you do an open of the GPS device followed by a GPS Get Position operation)?

    If possible, could you reply to Hagai.Ohel@motorola.com?

  3. cenet says:

    If GPSID doesn’t have any data available, when you call GPSGetPosition it returns success (assuming other stuff like handle, param len, GPS device being available is setup right).  But it sets the validFields flag to be 0 to indicate it doesn’t have any data.

    John

Skip to main content